pygame is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

pygame / pygame http://pygame.org/

Clone this repository (size: 15.4 MB): HTTPS / SSH
hg clone https://bitbucket.org/pygame/pygame
hg clone ssh://hg@bitbucket.org/pygame/pygame

Issues

#106 FontTypeTest.test_set_bold fails on Windows XP

Reported by Lenard Lindstrom

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\font_test.py", 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.

Status: resolved Responsible: Lenard Lindstrom Type: bug Priority: minor
Milestone: 1.9.2 Component: font Version: Development

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Lenard Lindstrom

    written

    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. #2 Lenard Lindstrom

    written

    • Changed status from new to resolved.

    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.

    f8608dd8c478

  3. #3 Lenard Lindstrom

    written

    Issue #77 was marked as a duplicate of this issue.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?