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!
drmacro
Veteran
Posts: 9001
Joined: Sun Mar 02, 2014 4:35 pm

Re: default program font size

Post by drmacro »

I change the default font on my installs.


The ProDark.qss has a section:

Code: Select all

/*==================================================================================================
Reset elements
==================================================================================================*/
/* Resetting everything helps to unify styles across different operating systems */
* {
    padding: 0px;
    margin: 0px;
    border: 0px;
    border-style: none;
    border-image: none;
    outline: 0;
    color: #f5f5f5; /* Default color for labels and different text elements that usually use dark colors */
I'll have to rely on others for the source location on other OS'.
You'll need to find the source directory for your install for the stylesheets. It will be in the install directory Gui/Stylesteets
Make a copy of the file and place it in (on Linux...) by a new name: ~/.local/share/FreeCAD/Gui/Stylesheets/
I modify it as follows, in this case 14px to set the font to 14 pixels:

Code: Select all

/*==================================================================================================
Reset elements
==================================================================================================*/
/* Resetting everything helps to unify styles across different operating systems */
* {
    padding: 0px;
    margin: 0px;
    border: 0px;
    border-style: none;
    border-image: none;
    outline: 0;
    font-size: 14px;
    color: #f5f5f5; /* Default color for labels and different text elements that usually use dark colors */
Restart FreeCAD and the sytlesheet should be available is Edit>Preferences>General, General tab, Main window, Style sheet:


Thanks to @obelisk79 for showing me this...
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
Simbioz
Posts: 67
Joined: Tue Mar 30, 2021 2:55 pm

Re: default program font size

Post by Simbioz »

Thanks @onekk , @drmacro!
Non native English speaker.
Carsten
Posts: 1
Joined: Sat Nov 26, 2022 4:22 pm

Re: default program font size

Post by Carsten »

Hi,

I also fought a while with the FreeCAD font size on Linux (using XFCE) and the AppImage.
Thanks to drmacro for the essential hint.

The following is a slightly more foolproof description

Remark: the AppImage mounts itself in /tmp when started

1. Find the stylesheets
1.1 Start FreeCAD:

Code: Select all

./FreeCAD_0.20-1-2022-08-20-conda-Linux-x86_64-py310.AppImage &
1.2 Find mount point:

Code: Select all

mount | grep FreeCAD
=>
FreeCAD_0.20-1-2022-08-20-conda-Linux-x86_64-py310.AppImage on /tmp/.mount_FreeCAXUkPVY type fuse.FreeCAD_0.20-1-2022-08-20-conda-Linux-x86_64-py310.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=100)

1.3 Find stylesheets:

Code: Select all

find /tmp/.mount_FreeCAXUkPVY -name ProDark.qss
=>
/tmp/.mount_FreeCAXUkPVY/usr/share/Gui/Stylesheets/ProDark.qss

2. Copy style sheets to home directory:

Code: Select all

cp -r  /tmp/.mount_FreeCAXUkPVY/usr/share/Gui ~/.local/share/FreeCAD/
3. Add font parameter as described by drmacro 2022-06-26 18:48 above.

Kind regards
Post Reply