Blurry fonts when scaled small?

I find that when I scale the fonts beyond a certain point, individual letters like ‘i’ start to loose defination and become greyed out. Why is this happening? Is there anyway to prevent this? (I’ve tried increasing setPixelsPerUnit and font.setPageSize, but it doesn’t seem to help.)

import direct.directbase.DirectStart
from pandac.PandaModules import TextNode

font = loader.loadFont('times.ttf')
font.setPixelsPerUnit(60)
font.setPageSize(512,512)
font.setNativeAntialias(False)

text = TextNode('node name')
text.setText("Every day in every way I'm getting better and better.")
textNodePath = aspect2d.attachNewNode(text)
textNodePath.setScale(0.03)

run()

Questions like this come up from time to time, try searching for “pixel perfect fonts” in the forums. For instance, this recent thread more or less discusses this subject, even though the code examples are in C++ instead of Python: https://discourse.panda3d.org/viewtopic.php?t=7488

David

Ah, I completely missed that discussion thread. Thanks for the pointer!