PDA

View Full Version : Integrating custom fonts into FG



Xlerb
June 6th, 2020, 17:23
I'm trying to find a way to add some custom fonts for my game, but I'm getting confused as to how to add them. I find a few threads that mention a text editor and even an extension or two, but I thought it would be easier to just add a ttf file to a folder and go from there. Am I doing something wrong or can this even be done?

Zacchaeus
June 6th, 2020, 17:38
Yes, you would need to add additional fonts as an extension which overwrites the existing ones. You don't say what ruleset you are interested in but I've linked one which is useable in CoreRPG which you could have a look at and figure out from that how to do it yourself https://www.fantasygrounds.com/forums/showthread.php?25600-Using-FG-at-the-tabletop&p=227962&viewfull=1#post227962

Xlerb
June 6th, 2020, 17:43
Well my players are using 3.5/PF. I've been trying to see if any of them would want to switch to 2e, I know Pathfinder has a lot of content to go through and it will take quite a while for Smiteworks to catch up. Also I know when it comes to homebrew I can't expect my answer to be cut and dry or obvious.

mattekure
June 6th, 2020, 18:00
Well my players are using 3.5/PF. I've been trying to see if any of them would want to switch to 2e, I know Pathfinder has a lot of content to go through and it will take quite a while for Smiteworks to catch up. Also I know when it comes to homebrew I can't expect my answer to be cut and dry or obvious.

When adding fonts to FG, there are typically two different use cases. One is to add a font to replace an existing font in the ruleset. So to make story entries, reference manuals or other elements of the interface use a different font than the default. The other use case is to add new fonts that can be used when using the languages feature in the chat. There are examples of both types of font extensions out there.

Here is an example of a font extension that adds new font options to the languages.
https://www.fantasygrounds.com/forums/showthread.php?49069-Sign-Language-Finger-Spell-Fonts

and here is several that add fonts to replace the default fonts in various parts of the interface.
https://www.fantasygrounds.com/forums/showthread.php?57197-Fonts-from-Google-Fonts

What use case are you thinking of?

Xlerb
June 6th, 2020, 18:31
I'd like to use both eventually, but in this case I want to add new font options to the languages.

mattekure
June 6th, 2020, 18:39
I'd like to use both eventually, but in this case I want to add new font options to the languages.

If you extract the sign language font extension I linked to. you can see how to add a new language. download and extract the extension (its just a zip file with the file extension renamed to ext).

Inside you will see an extension.xml file, and 2 folders. copy your ttf into the fonts folder. you will need to edit the extension.xml file, and the scripts/languages_extension.lua file. Add new entries using the exact same formatting as whats there.

extension.xml file you would add


<font name="fontname">
<ttf file="fonts/fontname.ttf" name="fontname" size="36" />
<color value="#000000" />
</font>


and in the scripts/languages_extension.lua file you would add a new entry for your language.



GameSystem.languagefonts["fontname"] = "fontname"


then rezip up the files and change the file extension back to ext.

DaddieCat
July 15th, 2023, 22:13
Would this still work in FGU today?

I'm looking to add Aurek-Besh from Star Wars, and this looks simple enough if it's still applicable.

mattekure
July 15th, 2023, 22:14
Would this still work in FGU today?

I'm looking to add Aurek-Besh from Star Wars, and this looks simple enough if it's still applicable.

Yes, this still works with FG Unity

DaddieCat
July 15th, 2023, 22:15
Perfect. Thanks for the quick reply.

DaddieCat
July 15th, 2023, 23:18
Worked like a charm. Thanks a ton. 58214