Soreepeong / FFXIV-FontChanger

Apache License 2.0
43 stars 1 forks source link

Misaligned glyphs #11

Open endervad opened 2 years ago

endervad commented 2 years ago

I've noticed this behavior with both FreeType, and DirectWrite, playing around with hinting and rendering didn't help.

image

On the upper half of the screenshot is FontChanger preview. EN font is taken from the game, RU font was half-made by me, half-taken from the original font (not from the game). On the lower half of the screenshot is the same RU font in MS Word. I've highlighted some of the more apparent cases where the space between letters differs from the FontChanger's preview. And this is how one of the problematic glyphs looks like:

image

It seems like it happens only with glyphs that go outside of their declared width. My guess is that they are being re-aligned to 0px, or to the positive value of X (+30px in the above case). Glyphs where X >= 0 seem to be unaffected.

Soreepeong commented 2 years ago

If you need to use negative left side bearing, then you'll have to use horizontal offset to make them go positive, since the game does not support negative lsb.