[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG: Inconsistent font behavior between Windows and Linux



I suspect this will just get passed upstream to SDL, but someone will
need to translate for them.

The "7" glyph in the attached font at size 21 behaves inconsistently
on Windows (XP SP2) and Linux (Gentoo).  Running the test script on
the two systems, I get these results:

Linux:
(11, 16)
(12, 16)

<Surface(22x16x32 SW)>
<Surface(22x16x32 SW)>

[(0, 9, 0, 8, 11), (0, 9, 0, 8, 11)]
[(0, 9, 0, 8, 11), (-1, 9, 0, 8, 11)]


Windows:
(11, 16)
(12, 16)

<Surface(22x16x32 SW)>
<Surface(23x16x32 SW)>

[(0, 10, 0, 8, 11), (0, 10, 0, 8, 11)]
[(0, 10, 0, 8, 11), (0, 11, 0, 8, 12)]


My interpretation of this is that the 7 is behaving a bit screwy at
that size.  It renders as 12x16, but has an X offset of -1, for an
effective size of 11x16.  On Windows, the X offset appears to be lost,
thus causing the glyph to incorrectly have an extra pixel of padding
on the left.

I'm also puzzled as to why maxx is one larger on Windows, but that
part doesn't seem to cause a problem.

-Charlie Nolan

Attachment: font_test.py
Description: Binary data

Attachment: acknowtt.ttf
Description: application/font-ttf