Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Icey on Wed 23/03/2011 06:03:52

Title: How do I import this font?
Post by: Icey on Wed 23/03/2011 06:03:52
I found this font and I wanted to know how could I add this to my game?
(http://www.spriters-resource.com/other_systems/DissidiaFF/DissidiaFont.png)
Title: Re: How do I import this font?
Post by: Gilbert on Wed 23/03/2011 06:15:25
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 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23881)).

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.
Title: Re: How do I import this font?
Post by: Icey on Wed 23/03/2011 10:19:41
Ok,Thanks Iceboty.
Title: Re: How do I import this font?
Post by: monkey0506 on Wed 23/03/2011 20:34:56
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.
Title: Re: How do I import this font?
Post by: Icey on Thu 24/03/2011 01:14:57
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.
Title: Re: How do I import this font?
Post by: Khris on Thu 24/03/2011 02:47:44
Just to be clear, did you check out SSH's BitmapFont module?
Title: Re: How do I import this font?
Post by: Icey on Thu 24/03/2011 02:58:43
No I haven't. Can you give me a link?
Title: Re: How do I import this font?
Post by: Khris on Thu 24/03/2011 03:07:34
Iceboty already linked you to it in his post.

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23881
Title: Re: How do I import this font?
Post by: Icey on Thu 24/03/2011 03:19:36
Oh, It's named different. However I still dont understand it. Can you show me an example code please?
Title: Re: How do I import this font?
Post by: Khris on Thu 24/03/2011 03:27:46
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.
Title: Re: How do I import this font?
Post by: Icey on Thu 24/03/2011 04:46:45
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.