Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: 'Blobby' fonts  (Read 3976 times)

0 Members and 1 Guest are viewing this topic.

AClockWorkLemon

  • Newbie
  • *
  • Posts: 20
    • View Profile
'Blobby' fonts
« on: December 08, 2011, 01:13:43 pm »
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:

Code: [Select]

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 :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
'Blobby' fonts
« Reply #1 on: December 08, 2011, 01:31:40 pm »
Laurent Gomila - SFML developer

AClockWorkLemon

  • Newbie
  • *
  • Posts: 20
    • View Profile
'Blobby' fonts
« Reply #2 on: December 08, 2011, 09:17:05 pm »
Quote from: "Laurent"
http://www.sfml-dev.org/forum/viewtopic.php?p=36367#36367

My apologies.

I think i've got it sorted now, i was unaware that loading a font at a larger size than was needed would have adverse effects on quality. If that does not fix it, i'll make sure to provide a proper example that reproduces it properly :)

Sorry again, ACWL

 

anything