eglaysher / rlvm

RealLive clone for Linux and OSX
http://rlvm.net
GNU General Public License v3.0
150 stars 25 forks source link

Font metrics sometimes broken in Text rendering #53

Closed eglaysher closed 10 years ago

eglaysher commented 10 years ago

renderGlyphOnto().x will sometimes return a different value than charWidth(). This means that the

Practical example: the charWidth (using TTF_GlyphMetrics()) for 't' is 6 pixels, while the character width rendered through renderGlyphOnto() (using TTF_RenderUTF8_Blended()) returns 7 pixels in the font TakaoPGothic.ttf, which is the default Japanese font on my Ubuntu install.

eglaysher commented 10 years ago

This breaks the rendering of " No data", dropping the final 'a' in Clannad FV in Japanese.

(Also, DejaVuSans has correct font metrics, so this probably doesn't show up when using the English patch.)