View Full Version : Custom Story Font name tag?
MacDork
January 27th, 2020, 19:14
What's the font name for Story Text (bold and regular) ? I tried
<font name="reference-r"> and
<font name="reference-b"> , but i believe those are for reference manuals, and not Story entries. I don't see anything obvious on the developer wiki
Is it as simple as
<font name="story-r"> and
<font name="story-b">?
LordEntrails
January 27th, 2020, 20:09
What ruleset?
EnSabahNur
January 27th, 2020, 21:11
Sorry -- 5E
Talyn
January 27th, 2020, 21:36
Look in CoreRPG graphics\graphics_fonts.xml and scroll down to the Formatted Text Fields section.
reference-h == header text font
reference-r == regular body text font
reference-i == italic body text font
reference-b == bold body text font
reference-bi == bold italic body text font
reference-b-large == sounds like large bold body text but I don't recall ever actually seeing this put to use in body text, so it's probably used for something else in the various window definitions?
The term 'reference' is used a LOT in various places within FG and 99% of it has nothing whatsoever to do with reference manuals. :)
MacDork
January 27th, 2020, 22:52
I noticed this at the top:
<!-- Note: FGF tags processed first for FG Classic, and TTF tags processed first for FGU -->
I'm using TTF, and not FGF and Fantasy Grounds Classic.
Is there a way to over-ride the default font face without converting the font to FGF? The size and color are used, but not the weight and face.
Trenloe
January 27th, 2020, 22:55
Is there a way to over-ride the default font face without converting the font to FGF?
Remove the fgffile entry from the font definition to force FG Classic to convert the TTF in the font definition to FGF at runtime.
Talyn
January 27th, 2020, 23:02
Is there a way to over-ride the default font face without converting the font to FGF? The size and color are used, but not the weight and face.
FGC uses TTF fonts perfectly fine, just has a very slightly longer load time. Notice it says FGC "processes" the FGF font definition first, not that it requires it. It's just a way to define fonts per client if you need to.
MacDork
January 27th, 2020, 23:09
Remove the fgffile entry from the font definition to force FG Classic to convert the TTF in the font definition to FGF at runtime.
Remove the fgffile from the custom font extension I'm creating, or from CoreRPG?
Trenloe
January 27th, 2020, 23:14
Remove the fgffile from the custom font extension I'm creating, or from CoreRPG?
Assuming your extension will be overriding the font definitions we're referring to, then you'll do that in your extension. It is very, very rare (I mean *very* rare) that you will be modifying the actual ruleset.
MacDork
January 28th, 2020, 00:14
Hm.. Everything you've said is as i expected, and yet the font face is not changing. I'll share it and screenshots later. Prepping for a session right now :)
MacDork
January 28th, 2020, 00:33
31347
Ok, I snapped a screenshot. I'm creating a JetBrainsMono font set (man i love this new font), and noticed that the uppercase "I" character in FG (highlighted in the screenshot above my IDE) is not JetBrainsMono.
I copied that text and pasted it into the IDE (in the comments; green) to compare the way the font *should* appear. Note that the same extension works properly in FGU, while FGC doesn't.
Also -- styles aren't showing up:
31348
Talyn
January 28th, 2020, 01:00
Here, I grabbed that font and quickly popped it into an extension and ran it in multiple rulesets just fine. Here's the 5E desktop:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=31349&stc=1&d=1580173028
One thing you'll notice right away is that the reference-r font definition isn't only used in Story and Refpages—it's also the main Library window font, among other things, just like the reference-h isn't just header text, it's the library categories. So you have to be very careful with what point size you choose with your font definitions, as they frequently get used in more places than you'd initially think about.
Here I chose 16pt for all the regular fonts and 20pt for the header, that way it looks fine in all the pages but also the Library window and all the others too.
Talyn
January 28th, 2020, 01:40
Here's another example of the same extension, this time in the Savage Worlds ruleset. Same as the 5E desktop above, you'll notice the reference-r font gets used all over the place (highlighted in yellow here), which is one of the main things to watch for. Highlighted in blue is the reference-h definition, and hot pink is the reference-page-header definition, which is only used on refpage header blocks, but it's something that theme authors need to start paying attention to as more DLC Developers get up to speed on using the refblocks. I used 36pt for that, which is probably bigger than necessary but it sure makes the point. :)
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=31351&stc=1&d=1580175588
Talyn
January 28th, 2020, 02:38
Extension posted in this thread. (https://www.fantasygrounds.com/forums/showthread.php?53508-JetBrains-Mono-font-theme)
MacDork
January 28th, 2020, 10:35
Good lookin out -- thank you!
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.