FontTypeTest.test_set_bold fails on Windows XP

Issue #106 resolved
Lenard Lindstrom created an issue

=== Environment ===

Windows XP\ Pygame changeset [[|0ca386dee6c1]]\ Python 2.7.2\ SDL_ttf 2.0.11 hg changeset d9a600fa3c4a\

=== Description ===

The pygame.font unit tests fail as follows:


F:\local\lenard\pygame\temp>python -m pygame.tests font loading pygame.tests.font_test ........................F... ======================================================= FAIL: FontTypeTest.test_set_bold

Traceback (most recent call last): File "F:\Python27\lib\site-packages\pygame\tests\", line 398, in t est_set_bold self.failIf(f.get_bold()) AssertionError: None

Ran 28 tests in 2.359s

FAILED (failures=1) }}}

=== Conjecture ===

The TTF_Quit() / TTF_Init() combination fails to reset the style flags.

Comments (8)

  1. Lenard Lindstrom reporter

    The way SDL_ttf handles styles changed with changeset 55157da58804, pre 2.0.10. Before, the initial style of a newly opened TTF_font was TTF_STYLE_NORMAL. After, it was determined by the opened font. Also, SDL_ttf refuses to make a native bold font even more bold. This affects the default Pygame freesansbold.ttf which is bold.

  2. Lenard Lindstrom reporter

    Close issue 106

    In the fsSelection field of the OS/2 table set the bold flag (bit 5) 0 and the Regular flag (bit 6) 1. This now makes the font appear as a normal weight font to FreeType2, and therefore to SDL_ttf as well.


  3. Log in to comment