sysl-dev/SYSL-Text

Is there a way to scale the text?

Absolpega opened this issue · 3 comments

In my game I need to scale the text based on the screen.
I would expect something like a scale that I would pass to the draw function.
No other ways seem to work for me.

So, the way this works is using the Love2D text object one character at a time. You could do this a few ways:

  • You could define fonts for each size of the screen that you have, and then recreate the text object when the screen size changes.
yourbox = Text.new("left", 
{ 
    font = -- This is what you would redfine for each size
    })
  • You could draw to a canvas and scale that canvas
  • You could inject the [scale=number] tag based on your screen size

There is no way to make this library scale for you as Love2D does not scale fonts dynamically.

I need to be able to change the scale for each frame so fonts and scale tag won't work.
The canvas would make the text blurry.

Sorry, I use the default love font system, so unless you are able to do it with set font and love graphics print; my library can't do it.