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"
        textObject.setText(bk_text)
 
# 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)
b.setTransparency(1)
c = OnscreenImage(parent=render2d, image="background.png")
# Run the tutorial
run()

Hi,

panda3d.org/manual/index.php/Text_Fonts - check the “Font Quality” part.

Coppertop

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!