PDA

View Full Version : Adding more language fonts



JimSocks
August 15th, 2020, 06:03
Hiya!

The Classic Version extension for adding additional language fonts says it does not work for unity. Is there another process for adding these in unity? I would like to add a bunch!

mattekure
August 15th, 2020, 14:44
Hiya!

The Classic Version extension for adding additional language fonts says it does not work for unity. Is there another process for adding these in unity? I would like to add a bunch!

I think there may be some confusion, so let me clarify a bit. In FG, there are 2 main ways that fonts are used. Both require an extension to add, but how they do it is slightly different. The filetype of the font file (TTF/FGF) is a separate issue I'll describe below.

Font Extension types
1. Interface. In CoreRPG and other rulesets, they define the various fonts used in things like the chat window, labels, and elsewhere in the interface. You can override those to make those interface elements look the way you want using extensions like these. https://www.fantasygrounds.com/forums/showthread.php?57197-Fonts-from-Google-Fonts You can browse through how they are constructed for adding new fonts and overriding the existing ones.
2. Language Fonts. This appears to be what you are looking for. Language fonts are also added through an extension, but they require a slightly different approach since you are adding something new to the game rather than just redefining something that already exists. Here is an extension example of how to do that. https://www.fantasygrounds.com/forums/showthread.php?49069-Sign-Language-Finger-Spell-Fonts It does require some basic LUA script to add the new language fonts into FG, but you can do so in a way that either overwrites the existing, or just adds to it.

Font File Types
Originally in Classic, the only supported font file type was the "fgf" filetype. As was discussed on the other thread, this was a custom format that required a converter to go from TTF to the FGF type so it could be read and used. Classic eventually added the ability to use both FGF and TTF font file types.

Unity no longer supports the FGF font file. Going forward, you should only need a TTF file, as that is supported by both classic and unity currently. So there is no need to convert over. Unfortunately, there doesnt seem to be a way to convert FGF back to TTF.

JimSocks
August 19th, 2020, 14:32
Ah ok, so I can use the FGC extension adding additional fantasy language fonts in Unity, since they are interchangeable?
Or do I need to make my own using the link you provided under item 2 above?

Thanks for your detailed response on this by the way! Super helpful!

mattekure
August 19th, 2020, 17:38
You can certainly use the ones I linked as a reference for making your own. just extract the contents and edit how you like.

Since the underlying methods are the same for both Classic and Unity, any extension you produce using these as templates should work in either. You might notice that I do have separate versions of my font extension for Unity and Classic, its only because of differences in the text sizes between clients, I tweaked them slightly differently for easier reading (to me).