1
\$\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\$
  • 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 '18 at 8:49
  • 2
    \$\begingroup\$ Are you sure this is legal? \$\endgroup\$ – Bálint Feb 8 '18 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 '18 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\$ – ratchet freak Feb 8 '18 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 '18 at 18:52
5
\$\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\$
  • \$\begingroup\$ Thank you very much for your response. First link was the one the helps me doing what I want. \$\endgroup\$ – jaloplo Feb 9 '18 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.