Open oatmealine opened 2 years ago
Possibly related - a game I'm working on has text input, and the text input constantly strips out any spaces in the web version (not other versions). Could it be that the problem isn't with getWidth but instead with how spaces are treated in general?
Which version of love.js are you running? On the 11.4 version compiled with the compatibility flag I get the same width for a space both on the web version and the native version.
@kristinalustig Concerning spaces captured using the textinput
handler, love.js overwrites the browsers default use of spaces and arrow keys (in index.html). Note that space is still captured in the keypressed
handler.
See title:
This does not replicate the behavior when using
Font:getWidth
in love.js orText:getWidth
natively, both of which return 8 (or whatever the size of a space in the font is).