[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
SysFont wrongly italicizes text on XP, was Re: [pygame] BUG: SysFont hangs when loading certain fonts (with cause and fix ideas)
- To: pygame-users@xxxxxxxx
- Subject: SysFont wrongly italicizes text on XP, was Re: [pygame] BUG: SysFont hangs when loading certain fonts (with cause and fix ideas)
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Fri, 26 Aug 2011 20:29:28 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 26 Aug 2011 14:29:37 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=NkzfNclaNIqRweiIvTggBxpaTw3DM3Vz5ljO0HHIzsI=; b=KhFiD8KAvjNxlVCPqJH9iAAlsCMSorU8gYCNa5dnRVzK7z+MAZJ2MsTuNFnuWvQdXe y8E+yr8EAlvyeetA15OdC4tgzrGmTK72Polqh0VRp14Z90qxZ1OBqpSIX6mTwC1JGTlu LuJr5VHWnE/h6HbS1W66nlveBgW6NmuQ32EFc=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
I noticed another SysFont issue is the issue tracker:
"SysFont wrongly italicizes text on XP"
https://bitbucket.org/pygame/pygame/issue/64/sysfont-wrongly-italicizes-text-on-xp
Is anyone on Windows XP able to confirm that the script below shows italic fonts when ran?
The screen shot here sure does look like they are italic:
http://www.pygame.org/old_bug_attachments/39/test_fonts.PNG
#!/usr/bin/env python
# coding: cp1251
import sys
import os
import pygame
font_names = [
'Courier New',
'Verdana',
'Tahoma',
'Times New Roman',
'Lucida Console',
'Comic Sans MS',
'Garamond',
]
pygame.init()
screen = pygame.display.set_mode((640, 480))
background = pygame.Surface(screen.get_size()).convert()
background.fill((255, 255, 255))
top = 0
for font_name in font_names:
font = pygame.font.SysFont(font_name, 32)
text = font.render(font_name, 1, (0, 0, 0))
textpos = text.get_rect(left = 0, top = top)
top += textpos.height
background.blit(text, textpos)
screen.blit(background, (0, 0))
pygame.display.flip()
clock = pygame.time.Clock()
running = True
while running:
clock.tick(60)
screen.blit(background, (0, 0))
pygame.display.flip()
for event in pygame.event.get():
if (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE) or (event.type == pygame.QUIT):
running = False
pygame.quit()