I am trying to recreate my tiny python/pygame project to include multiple languages, and one of the problems I have encountered is the fact that for some reason the accents, tildes etc. are being cropped from the top so only 1 or 2 pixels of them are visible. This applies to most of the ‘accented’ uppercase letters in ie. French, Polish, Spanish, German, etc.
This happens both in python 2.7.2 and python 3.2, using default pygame font.
Trying to render the following string:
‘ÀÂÉÈÊËÎÏÔÙÛÜŸ’
results in the rendered image like this:

I guess, I am using the standard rendering/blitting technique:
# -*- coding: utf-8 -*-
#...
value = 'ÀÂÉÈÊËÎÏÔÙÛÜŸ'
if sys.version_info < (3, 0):
try:
val = unicode(value, "utf-8")
except UnicodeDecodeError:
val = value
text = font.render("%s" % (val), 1, font_color)
else:
val = value
text = font.render("%s" % (val), 1, font_color)
self.image.blit(text, (300,300))
#...
anyone have had this problem before? any workarounds? or is it just that pygame.font.render creates too small surface to accommodate the extra space needed at the top? Maybe some way to set the line height, but I haven’t found that anywhere…
Try specifying a font rather than the one youa re using (are you using the default one?) – it is most likely a problem in the font. – It worked for me with all fonts I tried in my system.
For full games, an ideal solution is distributing the font file alongside your project – since Pygame open fonts given the “.ttf” file name.
For using a system font, you have to chain calls pygame.font.get_fonts()- to get font names, to
pygame.font.match_fontto actually get the path to the font file given the font name, and finally pygame.font.Font passing that path and a point-size to get a usable font object (with therendermethod)