[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] BUG: Inconsistent font behavior between Windows and Linux
- To: pygame-users@xxxxxxxx
- Subject: [pygame] BUG: Inconsistent font behavior between Windows and Linux
- From: "Charlie Nolan" <funnyman3595@xxxxxxxxx>
- Date: Fri, 22 Aug 2008 14:04:23 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 22 Aug 2008 15:04:29 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=Yo0fAsYN/a8dlk5mhSSQeEB7Xi/Dl8eUyutHvgr9H9A=; b=Tv+5fw3kNMkwLhhLcJGK1f4nhodsKn6kUmSyZo6bHkcNans2Mw1zX+ba1choGJem3n xQY7Ho/LYgCUDPXvgOT+JjCiFmCFKxzNWpu3NnT0r1lozYvaMov10jiaUjlVmZspcCqK mL3WVPY+zbj0ownJAuU2Kr/ocGd2gESGdPwqY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=kcBfsGuoQhFVYx4A4+qIdafupR4SECXo0zBW/jmMEmQ/vUI74OoyRfpvalEKZxaqde 68keBuimrHUrid5hQ6dXgYzLckWbtZX4vJSFbOyU6xs0yWWVosJRQ4cg+4iU/+H0a4mj 8Asg/+YJHr//wGuw/Kyx6Rok5C6Md3qPteccM=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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