Open stephanlachnit opened 4 weeks ago
Thank you for your input. As you mentioned, fontconfig
is a Linux utility, but we also need to support Windows and macOS. Additionally, we aim to achieve the best possible mapping to PostScript and PDF fonts (without loading fonts in PostScript). The font set was carefully chosen to ensure optimal mapping across all these backends. You can also include TPDF
and TPostScript
in the list of files related to fonts. Recently, due to licensing issues with Helvetica, we made some changes to the font files used to render ROOT fonts. Now, ROOT is shifting towards a new graphics system called "Web Graphics," where the latest graphics developments are happening. I believe this request should be considered for implementation in this new context, if feasible.
Feature description
Currently, ROOT loads fonts via the
Root.TTFontPath
. This makes a lot of sense from a ROOT maintainer perspective (simply ship all used fonts), but is a roadblock for a distribution maintainer (embedded files are usually not wished if not otherwise possible).Thus, it would be nice if ROOT would additionally support fontconfig, which is the default way to find fonts on Linux. In particular, the font interface should first look into
Root.TTFontPath
and then fallback to fontconfig. This means that the font-finding interface needs two parameters: the font file name and a fontconfig name as fallback.The current font interface is a bit all over the place. There is at least
graf2d/graf/src/TTF.cxx
,graf3d/gl/src/TGLFontManager.cxx
andgraf3d/gl/src/TGLText.cxx
that handle font names, probably more.Fedora uses this patch from @ellert to get rid of the non-free MS fonts (see also https://github.com/root-project/root/issues/8357), which is a good start but the patch is not really feasible upstream due to Windows/OSX support.
/cc @Axel-Naumann @dpiparo
Alternatives considered
No response
Additional context
No response