Hi all,
I’ve just started to try GTKmm 4 with a simple example.
I need to change the font of a label using an external ttf file.
Googling around I found this lines of c++ code:
@font-face is not supported by Gtk (see CSS reference here and here).
The available fonts are reported by Pango, and their detection is not generic, it depends on each platform’s backend (Linux, Windows, …) so giving a font file name directly from CSS is anyway impossible (see this issue for details).
If you don’t care about portability, you may try to load the TTF manually with native APIs (probably fontconfig on Linux), then from the CSS just give the family name: