You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with TrueType fonts (OpenSans, Courier New, Fira Code) on MacOS. And it seems that the font is rendered to small in comparison to the tile size.
As far I've gotten the best option is to exclude the width (use a width of 0) of the font, then the font loader will automatically pick the width with the best fit. If you pick both a width and height then the font will be scaled down to fit without stretching it. The best results will come from fonts designed to be used as monospace fonts.
There's no options for fine tuning the font size, but now is a good time to make suggestions.
It would be cool to set an anchor point for the tiles where the bounding box of the font sits. Something like upper_left, bottom_right, etc. Which could enable nice effects like distinguishing small and big items for example?
A new example using FreeType to generate a tileset can be found here.
This example builds the font from Python so it's easier to modify. It's recommended to use ttf.py if the tileset generated by tcod.tileset.set_truetype_font is too small or narrow.
Hey! :)
I was playing around with TrueType fonts (OpenSans, Courier New, Fira Code) on MacOS. And it seems that the font is rendered to small in comparison to the tile size.
Is it possible to control the size of the font inside a tile?
There is also an issue with Fira Code (it doesn't render correctly). But I think that might be the custom glyphs they included in the font?
The text was updated successfully, but these errors were encountered: