[GTK4] How to load a custom ttf font file for text view?

So as the title says I want to know if there is any way to load custom ttf font files for widgets like text view. So far I’ve only managed to change the font through CSS by installing the custom font first and using font-family property. I’m on Windows 10.

I’m using the C++ bindings of gtk4 for my application btw.

AFAIK it’s currently unsupported by gtk on Windows 10.

There is a work-in-progress here related to this feature, maybe check there how it’s done, or just wait till it’s available.

(note: I had the same issue, just installing the TTF file in Windows10 fonts settings solved the problem)

Thanks, I’ll keep track of it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.