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

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



Hey Charlie, I'd be happy to run your scripts (I'm reposting your font and test script again for the benefit of others who wish to run the script as well). Looks like my Mac and Windows systems agree with your windows system (both running pygame 1.8.1) . I would think the next logical step would be to run a little c program that uses SDL_ttf directly to get the numbers your test script does, and see if it confirms the same glyph metrics as the pygame script. The purpose there being to determine if pygame is affecting results.

My Windows Vista box:
----------------
(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 OS X 10.5 (i.e. unix)
---------------
(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)]
----------------

 


On Tue, Sep 2, 2008 at 3:19 AM, Charlie Nolan <funnyman3595@xxxxxxxxx> wrote:
4. We could rapidly narrow down the list of possibilities if a couple
people would take 5 minutes (if that) to run the test I gave and see
who's affected by it.  I have confirmation from my end that it's
appeared on at least three separate Windows systems, so other *NIX
results would be particularly useful, and not, I would think, terribly
hard to come by here.


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

#!/usr/bin/env python
import pygame
pygame.font.init()
f = pygame.font.Font("acknowtt.ttf", 21)
print f.size("6")
print f.size("7")
print
print f.render("66", True, (0,0,0,255))
print f.render("67", True, (0,0,0,255))
print
print f.metrics("66")
print f.metrics("67")