default program font size

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
wmayer
Founder
Posts: 20302
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: default program font size

Post by wmayer »

There is no parameter in the settings where font size can be changed. But with a little Python hacking you can try this:

Code: Select all

from PySide import QtGui
f=QtGui.QApplication.font()
f.pointSize() # returns e.g. 8
f.setPointSize(10)
f=QtGui.QApplication.setFont(f)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: default program font size

Post by sgrogan »

Big_Text.JPG
Big_Text.JPG (207.39 KiB) Viewed 3163 times
@wmeyer You've addded 20 years to my career :D
"fight the good fight"
BCBaldwin
Posts: 1
Joined: Thu Aug 17, 2017 4:44 am

Re: default program font size

Post by BCBaldwin »

I am having the same issue. Just downloaded the program and reading the initial documentation and going through the individual steps to learn the program and the font is really small. I have tried to make adjustments in the preferences and also on windows. It increases the sizes of everything else but the documentation. I have provided screenshots for comparison. I can understand why OP decided to not use the software if this simple detail has been neglected. It makes it really hard to read.

I have 20/20 vision btw

I would add an image but I cannot figure out how to do that either. lol If someone wants to tell me the steps to add a few screenshots to this post I will do that as well.

Thanks in advance!

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: default program font size

Post by bejant »

Hi BCBaldwin. and welcome!


BCBaldwin wrote: Thu Aug 17, 2017 5:00 am Just downloaded the program and reading the initial documentation and going through the individual steps to learn the program and the font is really small. I have tried to make adjustments in the preferences and also on windows. It increases the sizes of everything else but the documentation.
If you downloaded the 0.16 FreeCAD Manual in .pdf format I think you would "zoom in" instead of using changing the text size. I use the + key to zoom in, although in the Edit > Zoom pull-down menu of my document viewer it says to use the Ctrl and + keys together (I'm using Linux instead of Windows). There should also be a GUI only method in your document viewer but I don't know what that might be as I'm now not using Windows.

If you are referring to the FreeCAD pull-down menu Help > User Documentation item, that opens in your web browser and so you would zoom in just as you would do with any other web page (for me this keyboard shortcut is done by pressing the Crtl and + keys).


BCBaldwin wrote: Thu Aug 17, 2017 5:00 am I would add an image but I cannot figure out how to do that either. lol If someone wants to tell me the steps to add a few screenshots to this post I will do that as well.

A screen grab would help us see what you're facing. Item 5 in the first post here gives info and a link on how to use the Snipping Tool in Windows:
https://forum.freecadweb.org/viewtopic.php?f=3&t=2264

To attach an image to your post:
After you have saved your image, as you are typing your forum reply and want to add an image, click on the Attachments button which is below the window where you type your message:
20170817a.png
20170817a.png (21.47 KiB) Viewed 2957 times


Next, click on the Add Files button:
20170817b.png
20170817b.png (21.14 KiB) Viewed 2957 times

navigate to wherever your image is located, select it, and click the Ok (or Open) button (or press the Enter key). After the file appears under the Add Files button, you can click the Place Inline button:

20170817c.png
20170817c.png (20.15 KiB) Viewed 2957 times
to place it at a specific location inside your reply (which is what I did here), otherwise it will appear in your post after the text portion.


blue and strike-through = edit
giddyup
Posts: 1
Joined: Thu Oct 03, 2019 1:38 pm

Re: default program font size

Post by giddyup »

wmayer wrote: Wed Feb 11, 2015 9:19 am There is no parameter in the settings where font size can be changed. But with a little Python hacking you can try this:

Code: Select all

from PySide import QtGui
f=QtGui.QApplication.font()
f.pointSize() # returns e.g. 8
f.setPointSize(10)
f=QtGui.QApplication.setFont(f)
I have a high rez monitor and the above helped me greatly.

Is there any way to save these somewhere so that it does this every time I open the software by default. I have attached a before and after image.
Attachments
Untitled.png
Untitled.png (133.68 KiB) Viewed 2621 times
Untitled2.png
Untitled2.png (158.6 KiB) Viewed 2621 times
wmayer
Founder
Posts: 20302
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: default program font size

Post by wmayer »

The very easiest would be to create your own FreeCAD module. If you have write access to your FreeCAD installation then go to Mod and create a sub-directory e.g. HighRezMonitor. If you don't have write permission go to %APPDATA%\FreeCAD\Mod and create the directory there.

Inside HighRezMonitor create the file InitGui.py and copy the above code snippet into it.
User avatar
pl7i92LCNC
Posts: 208
Joined: Tue Mar 12, 2019 3:03 pm
Location: RLP DE

Re: default program font size

Post by pl7i92LCNC »

is this somwhere mentioned on Wikipedia to get this better published
as im using this for education on a near 10meter beamerprojektion i woudt have known this in 2015+
User avatar
Simbioz
Posts: 67
Joined: Tue Mar 30, 2021 2:55 pm

Re: default program font size

Post by Simbioz »

The provided python script works partially on 0.19, menu fonts are affected but combo view fonts are not.

freecad-size.png
freecad-size.png (144.03 KiB) Viewed 1753 times
OS: Arch Linux (sway/sway)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24415 (Git)
Build type: Release
Branch: makepkg
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.10.5
Qt version: 5.15.4
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
Non native English speaker.
Bance
Veteran
Posts: 4250
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: default program font size

Post by Bance »

FC 0.19 is not the current release version. Try in 0.20 or dev.
User avatar
onekk
Veteran
Posts: 6202
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: default program font size

Post by onekk »

Bance wrote: Sun Jun 26, 2022 7:24 am FC 0.19 is not the current release version. Try in 0.20 or dev.
Yes this is true, but the code snippets from @wmayer is from 2019, so I suppose it will work on 0.19 too.

To try to answer:

Not every fonts are controlled by the code above, some part of FC have some "font size" specified in other ways.

Being a Qt applications, there are many ways of specifying "font size" even in "each widget" definition or using "stylesheets" so sadly there is not a "unique set to tune".

Something could respond to settings made in the "Editor" Tab under Preferences >> General that although controlling explicitly only the Editor fonts it seems to control even the "Python Console" and "Report View" windows font size.

Probably making some "Feature Request" could help at least for the main FC, Addons and other WB could or not could be affected, depending if they try to guess the actual FC font size value and replicate it on the added "Qt Widgets", or if they reuse to interact with the user standard "FC Widgets".

I know that there is some confusion, but the whole mechanics behind FC Gui is difficult to guess as there is no (hoping "not yet") a "complete documentation" on modifying or interacting with Gui parts of FC.

Any informations or findings will be appreciated.

Hope it help.

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply