Blurry Fonts

Hey all,

I’m using the DirectGUI for onscreentext and directbutton. However, if I make the text large, the font gets progressively blurrier. I’ve tried to enable anti-aliasing and a bunch of stuff but nothing seems to have any effect. The code below shows the imports to have the ability to anti-alias but I removed the antialiasing in the code because it had no effect. Any idea on what I can do to make the font not blurry. BTW, I don’t have TTFs installed. At least, I don’t think I do because when I tried to load arial, it said it wasn’t found.

from direct.gui.OnscreenText import OnscreenText
from direct.gui.OnscreenImage import OnscreenImage
from pandac.PandaModules import * 
from direct.gui.DirectGui import *
loadPrcFileData("", "framebuffer-multisample 1")
import direct.directbase.DirectStart
# Add some text

bk_text = "Game Menu"
textObject = OnscreenText(text = bk_text,  pos = (0,0,.5), 
scale = 0.2,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)

# Callback function to set  text
def setText():
        bk_text = "Game Started"
# Add button
b = DirectButton(text="Start Game", clickSound = None, command=setText, text_fg=(1,1,1,1), scale=.15, pos = (0,0,-.5), relief=None)
c = OnscreenImage(parent=render2d, image="background.png")
# Run the tutorial

Hi, - check the “Font Quality” part.


Thanks! I had already found that before but I was not aware that I actually had to put the font in the running directory. I thought it would use the OS font library. It’s working now though.

Hi there,

I haven’t got any ideas, but I was wondering if you ever got a solution
as I would like to do the same thing. Cheers!