How does one "Replace uses of missing font family 'Sans'... "?

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!
Post Reply
User avatar
marc-medley
Posts: 4
Joined: Mon Mar 14, 2022 12:03 am

How does one "Replace uses of missing font family 'Sans'... "?

Post by marc-medley »

What "Sans" font is FreeCAD Sketcher initially looking for?

The initial load of the FreeCAD Sketcher outputs the following to the Report view:
Populating font family aliases took 394 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost.
However, the *.py files in `.../Mod/Sketcher` to not appear to contain either "font" or "sans". And, the Sketcher preference panels do not contain any "font family" settings.

The curious part is that this issue occurs on a macOS x86_64, but is not occuring on a macOS M1 arm64 system. Both are on macOS Ventura 13.2.

x86_64 machine installed from "FreeCAD_weekly-builds-31772-2023-02-05-conda-macOS-x86_64-py310.dmg"

Code: Select all

OS: macOS 10.16  <-- this is from the FreeCAD Menu. however, it's not correct. it should be macOS 13.2
Word size of FreeCAD: 64-bit
Version: 0.21.0.31772 (Git)
Build type: Release
Branch: master
Hash: 87c5b891352580568592cbba0e746269f726c43c
Python 3.10.9, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
M1 arm64 machine installed from "FreeCAD_weekly-builds-31483-2022-12-31-conda-macOS-arm-py311.dmg"

Code: Select all

OS: macOS 13.2
Word size of FreeCAD: 64-bit
Version: 0.21.0.31483 (Git)
Build type: Release
Branch: master
Hash: 588620fd9fd138892b1cd2466f5c87d441493174
Python 3.11.0, Qt 5.15.6, Coin 4.0.0, Vtk 9.2.2, OCC 7.6.3
Locale: C/Default (C)
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: How does one "Replace uses of missing font family 'Sans'... "?

Post by onekk »

marc-medley wrote: Mon Feb 06, 2023 11:01 pm What "Sans" font is FreeCAD Sketcher initially looking for?
..
On Linux font substitution is managed by fontconfig:

https://wiki.archlinux.org/title/Font_c ... figuration

I don't know how on MacOs font substitution is managed, usually if the mechanics is about the same across different systems, implementations are different:

you have at least three type of fallback fonts (call them "appearances"):

- Sans (Serif)
- Serif
- Monospaced (sometimes called Fixed)

and if you use these "defaults" it use the "real font" that your configuration define as "default font" for these "appearances", but then you have even to deal with variants, like "Bold", "italics", "Slanted" and with Size.


Regards

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