2
\$\begingroup\$

I'm doing a clone of Colonization and I'm trying to use the same font type as the original game. I'm able to get the pixels from the original font files (.ff) using the application from this thread https://forums.civfanatics.com/threads/colonization-picture-viewer.256665/page-2 but the outcome is a PNG file.

The question is how I can convert this PNG file to a True Type Font that I can load on my MonoGame application? Is there a way to do that? Do I have to consider using one texture per letter rather than a font type? If this has sense, how can I set different font sizes using textures?

\$\endgroup\$
6
  • 2
    \$\begingroup\$ You sure it just doesnt create bitmap fonts? There should be an additional file that contains the uv mapping. One texture per letter is bad btw, that should be avoided. \$\endgroup\$
    – Sidar
    Feb 8, 2018 at 8:49
  • 2
    \$\begingroup\$ Are you sure this is legal? \$\endgroup\$
    – Bálint
    Feb 8, 2018 at 8:55
  • \$\begingroup\$ It is just for personal use. I will not make money with that and I suppose authors don't be afraid of that. I'm talking about first Colonization of 1994. In any other case, I have my ears totally opened. \$\endgroup\$
    – jaloplo
    Feb 8, 2018 at 10:04
  • 1
    \$\begingroup\$ Truetype is based on the description of the outlines of the glyphs in beziers and line segments, converting bitmaps fonts back to truetype format is not trivial. \$\endgroup\$ Feb 8, 2018 at 10:19
  • 1
    \$\begingroup\$ I have found the open source tool mpskit which is capable of decoding .ff (from Colonization among other games) to .png. By inspecting the source code, I can tell that the .ff file format is a bitmap format. With this knowledge, you should either author a new TrueType font or use a bitmap font. Basically CobaltHex's answer. \$\endgroup\$
    – Theraot
    Feb 8, 2018 at 18:52

1 Answer 1

6
\$\begingroup\$

Truetype fonts are vector based. So you would have to trace the glyphs with a vector editor and then use a program like FontForge (which also is a vector editor) to build a font from that.

That said, You do not need to use TTF fonts in MonoGame since it just renders the font to a texture at compile time.

There are many bitmap font programs/examples available for XNA/MonoGame: https://blogs.msdn.microsoft.com/shawnhar/2007/04/26/bitmap-fonts-in-xna/ https://craftworkgames.github.io/MonoGame.Extended/MonoGame.Extended/BitmapFonts/

\$\endgroup\$
1
  • \$\begingroup\$ Thank you very much for your response. First link was the one the helps me doing what I want. \$\endgroup\$
    – jaloplo
    Feb 9, 2018 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .