How do I import this font?

Started by Icey, Wed 23/03/2011 06:03:52

Previous topic - Next topic

Icey

I found this font and I wanted to know how could I add this to my game?

Gilbert

#1
If all you have is a bitmap (texture) image you need to make a TTF or a SCI font yourself (or to use a module/plugin that loads a bitmap as fonts; I think it exists but I'm too lazy to look it up such as this).

Note that if you want to display more than 256 symbols (say the Kanji) you are screwed. Typically AGS supports only up to 256 symbols for a TTF and 128 symbols for a SCI font set.

Icey


monkey0506

I just want to note that in fact AGS fonts only support 255 characters for TTF fonts and 127 characters for SCI fonts, because slot 0 is unusable (AGS Strings/string-literals are null-terminated, so you can't even manually insert character 0 into a String in AGS).

If you did need more characters than that, you could script it manually by using multiple fonts and the DrawingSurface+DynamicSprite functions (and some way of specifying mid-string which font the character exists in, which would potentially require a lot of work..). The short and simple answer would be that it would be impossible, but it would actually just be pretty difficult. :P

If you're not using any (or only using some) of the extended characters from that font though, I'd recommend just using Radiant's FontEdit to make an SCI font with the needed characters.

Icey

I dont understand how to make a font out of these with given script. However I think I will use this app o make it into a TTF.

Khris

Just to be clear, did you check out SSH's BitmapFont module?

Icey

No I haven't. Can you give me a link?

Khris


Icey

Oh, It's named different. However I still dont understand it. Can you show me an example code please?

Khris

Figure it out yourself. That's all part of the experience. SquareEnix only employ people who can figure stuff out themselves, you know.

I assume you did look at the manual? What's not to understand?
http://ssh.me.uk/moddoc/SpriteFont

Split up the picture into single sprites with the same height but crop them horizontally. Then assign them to a View in order. It doesn't get simpler than that, it's just tedious.

Icey

Hum in that case I need to really study more.

That does sound long, However I do want this font so I have to do it.

SMF spam blocked by CleanTalk