Heya, was wondering if you guys could help.
Project i'm working on has need of fonts, however most text rendered seems to be coming out a little.. 'blobby'. Not sure really how to put it, so here's a picture:
The font is Gotham-book
This is the "Text" class i'm using to handle fonts etc:
class Drawable(object):
def render(self, win, offset=Point(), camera=Point()):
self.SetPosition(self.x+offset.x-camera.x, self.y+offset.y-camera.y)
win.Draw(self)
class Text(sf.String, Drawable):
def __init__(self, text, font, size):
self.font = GetFont(font, size)
sf.String.__init__(self, text, self.font, size)
self.x = 0
self.y = 0
fontCache = {}
def GetFont(loc, size):
try:
fnt = fontCache[loc]
old_size = fnt.GetCharacterSize()
if size < old_size:
return fnt
except KeyError: pass
Font = sf.Font()
if not Font.LoadFromFile(loc, size):
return None
fontCache[loc] = Font
return Font
If you need more, please feel free to ask ^_^
thanks in advance