PDA

View Full Version : Change default font *size* within an extension, but not the font itself?



zuilin
April 20th, 2020, 01:56
Any way to have an extension change the size of the default fonts rather than replace them as so many font extensions do?

I just want to make all the default ones bigger.

damned
April 20th, 2020, 06:58
Any way to have an extension change the size of the default fonts rather than replace them as so many font extensions do?

I just want to make all the default ones bigger.

Yes. You could easily do that.

Valyar
April 20th, 2020, 07:37
As damned said, it is easy. You need to make extension that overrides the default font name setting and load it. For example if in my ruleset I have the following code in graphics_fonts.xml, you can create extension with just this statement and it will override the chatfont everywhere.


<font name="chatfont">
<fgffile name="graphics/fonts/IMFellGrPrimer-Normal.fgf" />
<ttf file="graphics/fonts/FeGPrim2.ttf" name="IM FELL Great Primer" size="12" />
</font>

zuilin
April 20th, 2020, 07:44
I understand how to change a font completely. I want to leave the default fonts in place, just change the sizes.

Trenloe
April 20th, 2020, 07:49
Change the size parameter in the font definition.

https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4162481/font

Note that many sheets (PC sheet, combat tracker and party sheet in particular) have very tight placement of controls and text. Changing the size of the font used in these can result in the text overwriting other controls or being truncated.

zuilin
April 20th, 2020, 08:05
Change the size parameter in the font definition.

https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4162481/font

Note that many sheets (PC sheet, combat tracker and party sheet in particular) have very tight placement of controls and text. Changing the size of the font used in these can result in the text overwriting other controls or being truncated.

I'm not following. If I have a TTF file, I know how to use those parameters linked. I've cracked a bunch of the more popular font extensions and even written a couple on my own with some fonts I found. The problem is that all the fonts I've found don't look very good (and I've tried many).

I'd prefer to use the built-in font, just change the size. From the link above, it seems, again, I'd have to completely override the font definition.

Perhaps I'm wrong...but I'm a learn by example kind of programmer. Any chance you could swing me one simple example of just changing the definition for the existing font?

Thanks.