libretro-lutro icon indicating copy to clipboard operation
libretro-lutro copied to clipboard

newImageFont assigns unchangeable 1 pixel of extra spacing

Open ericabxy opened this issue 3 years ago • 5 comments
trafficstars

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.

ericabxy avatar May 29 '22 00:05 ericabxy

Could you provide a test for this?

RobLoach avatar May 30 '22 00:05 RobLoach

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

ericabxy avatar May 31 '22 05:05 ericabxy

You're right, I need to fix this.

kivutar avatar Jun 25 '22 19:06 kivutar

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 avatar Oct 19 '22 18:10 ericabxy

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.

ericabxy avatar Oct 19 '22 18:10 ericabxy