libretro / libretro-lutro

An experimental lua game framework for libretro following the LÖVE API
https://lutro.libretro.com
MIT License
156 stars 46 forks source link

newImageFont assigns unchangeable 1 pixel of extra spacing #234

Open ericabxy opened 2 years ago

ericabxy commented 2 years ago

Fonts created with love.graphics.newImageFont automatically have 1 pixel of extra spacing. This is different from the default behavior of LÖVE which is 0 extra spacing. Furthermore, Lutro does not recognize the extraspacing argument, so there is no way for content to correct this behavior.

RobLoach commented 2 years ago

Could you provide a test for this?

ericabxy commented 2 years ago

Yes. I wrote a test using a font meant for uniform -1 kerning, demonstrating the results of constructing the font with several different "extraspacing" arguments.

extraspacing.zip

kivutar commented 2 years ago

You're right, I need to fix this.

ericabxy commented 2 years ago

This issue appears to have been fixed by https://github.com/libretro/libretro-lutro/commit/e9395ab4549b74670598d811ca8094be513c4c5c Running the test file with the latest code using Lutro and LÖVE results in the same behavior in all four test cases. I'm trying to upload a slightly updated test file in case anyone else needs to test.

ericabxy commented 2 years ago

extraspacing.zip Here is the new test file. It has no subfolder so be careful when extracting, or simply rename it to extraspacing.love or extraspacing.lutro to use it.