PDA

View Full Version : FGC Fonts



Pharo
January 24th, 2021, 20:39
Quick question - I thought I read that FGC could use TTF fonts so upgraded my extension to use only TTF but now when I load in FGC all fonts revert to default.

Did i miss read? Are FGF fonts mandatory for FGC and TTFs only FGU?

Pharo
January 24th, 2021, 21:05
Think i figured it out but this has me even more confused...

This is my line
<font name="sidebar">
<ttf file="graphics/fonts/Robofan-CAP-Condensed.ttf" name="Robofan Free" size="19" />
<color value="#ff0000" />
</font>

In FGC "name" appearently must be the same as the TTF name inside of the TTF file or it seems to ignore it.

FGU doesnt seem to care as much.

Unfortunately, its pretty common for TTF varients of the same text, bold, regular, italic, to be different files with the same "name" inside the TTF. Guess ill have to open them up with an editor and rename them.

Moon Wizard
January 24th, 2021, 21:48
It's a limitation of the old Windows engine for font loading in the Win32 API. You basically load the font file; and request the font. Then, the Win32 API returns whatever it wants to that it thinks best matches your request. So, it has to be exact.

Regards,
JPG