Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bitmap Fonts  (Read 1719 times)

0 Members and 1 Guest are viewing this topic.

Sui

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://www.suisoft.co.uk/
Bitmap Fonts
« on: July 17, 2011, 10:34:51 am »
Is it possible to create a font bitmap from a TTF (via Font::LoadFromFile), export the bitmap, modify it then recreate the font from the updated bitmap?

Ideally I would like to save off the bitmap then reload the font from the bitmap without the TTF being present. This would allow me to use fonts that are royalty free but can't be redistributed as a TTF.

I can see that there's an option to get the bitmap image from a font (via GetImage) but I can't see a way to load a font from bitmap data.

I appreciate this might not be possible, if the font metadata isn't included in the bitmap.

(Hope this makes sense!)

Thanks,
Gary
Gary Marples, Developer of games and other stuff.
www.suisoft.co.uk/games/BlogTwitter

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Bitmap Fonts
« Reply #1 on: July 17, 2011, 10:49:19 am »
Laurent Gomila - SFML developer

Sui

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://www.suisoft.co.uk/
Bitmap Fonts
« Reply #2 on: July 17, 2011, 11:07:12 am »
Thanks Laurent.

I suspected there wasn't an easy answer but thought I would ask.

The library is excellent by the way. Very elegant and clean. I had something working on PC and Mac very quickly, even though my Mac experience is very limited.
Gary Marples, Developer of games and other stuff.
www.suisoft.co.uk/games/BlogTwitter