1

My problem originates in videogame development. My friend is creating bitmap fonts for our game in a PNG format. The font is 8-bit style (low res), just to mention.

I have to implement these fonts into Unity Engine, but the problem is that Unity likes to work with vector fonts and doesn't have the best support for bitmap fonts. To work with bitmap fonts you need to create another separate file that defines the locations and such of each character in the PNG. So now, just to have a font, I need two separate files instead of just one file.

What I'm trying to find out, is if TTF and OTF have support for holding images and thus also containing all of the positional data that I mentioned above, in one file.

If this is not the right path I should be taking, and there is another file format that best suits my situation, please let me know.

Thank you.

  • 2
    check this at first colorfonts.wtf – user287001 Apr 22 at 8:24
  • @user287001 This looks like an interesting lead and seems like it may be interesting in a slightly more elaborated answer than a comment :) – curious Apr 29 at 14:27
  • @user136242 I'm a bit confused with your question vs the title of your question. Are you really looking to make a TTF/OTF that uses png images or are you wondering "if TTF and OTF have support for holding images and thus also containing all of the positional data ... in one file" or are you just trying to find the proper workflow to make a font from images, and which can be supported by Unity (which you say prefers vectors)? – curious Apr 29 at 14:31
  • @Emilie the question is clear. The questioner has a dream. He hopes that TTF or OTF could somehow carry his raster images and his game platform would place them like it places the usual vector shapes inside traditionally constructed TTF or OTF fonts. He wants us to tell him if his platform doesn't fullfill its part of his dream and if it does, then how to construct those raster image based TTF or OTF fonts . – user287001 Apr 30 at 9:34
  • @Emilie (continued) but I haven't his platform to test the dream nor any tools to create raster image based TTF or OTF fonts. All I know about the subject is based on ads and other writings, not on experience. – user287001 Apr 30 at 9:41
0

Without knowing a lot of details around the technicals of your problem, if I'm understanding it correctly and had to solve it myself I would take the "8-bit" versions of the font (I'm guessing a set of 8x16 arrays of boxes (pixels) for each character) and render those in AI as actual rectangles/squares laid out side by side.

So literally you will have a vector version (boxes) of your bitmap (pixels) which you can then use to create your font characters from. You could even selectively round the corners a bit on the characters to improve readability at different renderings.

The advantage here is that then you can still scale the character to any size and still retain the original form as well as map it into any regular app that handles otf/ttf. Hope that helps... sorry if I misinterpreted the question.

0

Have you tried Calligraphr? Real easy .. and free for one font at a time https://www.calligraphr.com

Using Callligraphr you can build your own TTF or OTF based off a scan or a vector. As long as you can separate each character, and size them individually, then you can create your own font. You place each character onto a PDF template and then upload.

  • This doesn't answer the question – Luciano Apr 24 at 9:18
  • 1
    Using Callligraphr you can build your own ttf or otf based off a scan or a vector. As long as you can separate each character, size them individually then you can create your own font.. the ttf or an otf. You place each character onto a PDF template whic you can scan or do digitally and then upload. Sorry if my previous answer was a bit vague – Pam Shoulder Apr 24 at 10:52
  • You can edit your answer to add these details, but still the question is not about creating a TTF or OTF; it's about how to implement bitmap fonts in Unity. Read the question again. – Luciano Apr 24 at 11:56
  • As far as I understood it user does not want to use a bitmap font - so the suggestion of using the PNG (bitmap) to create an otf or ttf gets around that issue. But agree .. may be more technicalities we aren't aware of. – Pam Shoulder Apr 25 at 13:10
  • Hi @PamShoulder, I edited your answer to add your comment in. Adding in that new information along with adding a comment might spare you from getting more downvotes. Thank you for your contribution! – curious Apr 29 at 14:22

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