Skip to content

0.7.2 "The Stars Aligned"

Compare
Choose a tag to compare
@tommyettinger tommyettinger released this 10 Sep 06:08
· 1091 commits to main since this release

This release consists mostly of polishing the rough positioning code, but also adds 3 hand-written-looking fonts to KnownFonts (2 versions of a script font Tangerine, and a hasty-looking font Caveat). Positions are much more consistent now between TextraLabel and TypingLabel (they should be identical now, if stacked), and fonts tend to stay within their reported bounding boxes much more reliably.

There is a possible issue with the approach used now to ensure fonts stay the right size: creating a Font with a BitmapFont (or a style from a Skin) is more likely to need some adjustment on y (the second of four floats in Font's constructor). This adjustment could range from -20 to 20, or even to larger values for fonts with a large line height. I haven't found any 100% foolproof way to handle line height, baseline, strikethrough position, underline position, cap height, cap height with accents, and so on... So the best way is to allow users to control the font metrics themselves, I think. You can also just use KnownFonts or see how it configures the yAdjust. Right now, all of the fonts in KnownFonts act suitably regarding their position, which hasn't been the case very frequently before.

You should consider updating the .fnt , .png , and license files if you use KnownFonts, since some files have changed slightly, and a few more fonts have been added.