Search code examples
c++fontssfmlfreetypefontforge

Testing font files with freetype


I have a bitmap .FON font I made with softy (a font editor), it seems to open fine with fontforge, I generated bdf, otf, fnt and otb files with it. The font looks a lot like profont, except it's proportional (not monospace). The glyph height is thus quite small (less than 15 pixels), so I don't know if ttf might work well...

SFML can't display any one of them, any advice ?

Code:

sf::Font font;
font.loadFromFile("filename");
text.setFont(font);

I checked, the font is opened. I know nothing about fonts with fontforge and freetype, and what format is better or might have more odds to work.


Solution

  • It's actually not possible. SFML actually requires font to have an unicode charset, which no bitmap font format supports.