PDA

View Full Version : Font sizes



bmos
March 5th, 2022, 12:05
I have a couple font replacement extensions.
After the new updates, the fonts are showing up much larger than before.
Did something change about how font sizes are parsed?

Moon Wizard
March 5th, 2022, 17:05
There was some font work; but mostly around positioning of carets and underlines though there was a lot of consolidation too.

Do you have examples of the fonts that I can look at?

Regards,
JPG

bmos
March 5th, 2022, 17:50
https://www.fantasygrounds.com/forums/showthread.php?62617-CoreRPG-OpenDyslexic2-Font-Extension-Unity

bmos
March 6th, 2022, 13:31
Before: https://forge.fantasygrounds.com/images/0ff315fc0119b06f0e3980db9fefd55b.jpeg
After: https://i.imgur.com/rusCPAH.png

Honestly the font numbers correlate much better to the font size I see on my screen now, so it's not a bad thing.
I just want to know whether this is a bug and will be reverted to the old behavior (if so I don't want to waste my time changing all the font numbers)

Moon Wizard
March 6th, 2022, 22:55
Yeah, I need to look at it closer; but part of the fix was to remove some of the inconsistencies and one-off code from the previous version (as you can somewhat see in your Before screenshot)

It has something to do with that specific font; but that's why I need to dig deeper this week.

Regards,
JPG

Moon Wizard
March 7th, 2022, 16:24
I took a look at this in more detail with the font metadata and reviewing the old/new client code, including the portion that apparently changed what you are seeing. I think that the new client code is actually better suited for font rendering in general; so I plan to leave in place as is. The number was always supposed to be an approximation of the number of pixels (display units) for the line height; and it looks like that font was calculating differently than the others.

If you can adjust the font sizes down in your extensions, that would be the best resolution.

Regards,
JPG

bmos
March 7th, 2022, 17:51
Great! Thanks for confirming that.
I agree that the new font sizes are much more intuitive.