Alternative scalable font type?

Issue #1387 new
created an issue

Because fonts are rasterized, when applying a transform to a font it doesn't scale well like most other draw functions.

For performance reasons rasterizing should be kept, however I propose that an alternative dynamic font which renders characters each frame would be desirable for scaling text.

An argument against this would be that you shouldn't ever be drawing text to the world and should instead be drawing it to the UI at a screen position based on the world.

Comments (1)

  1. Alex Szpakowski

    LÖVE can load BMFont files, and there are tools to produce BMFont glyph atlases which use signed distance fields for the glyphs. You can then write a shader which renders those.

    It might be worth looking into making a shader included by default in LÖVE for that, although I'm not sure how useful that would be since typically you'd want to tailor things a bit to how your game is going to use the distance field font. Some documentation on the wiki about this would be good, in any case.

  2. Log in to comment