Mysterious borders on text and card textures


I’ve finally given up all my hopes for running panda3d on VS2013 and decided to go the python way.
(Il)logically, I started with the UI and hit some issues. Here’s an image:

If you zoom in a little, you can see that where rounded corners end, there are small whiteish borders. I have achieved the rounded corners by generating images with alpha=0 background, but I don’t think the problem resides in my textures, as the same lines can be seen between and on the top the characters of the text…

Do you have an idea what could be a possible cause for this? What could I do to get rid of them?
(I just tried all of the antialiasing modes if they couldn’t fade them away, but it didn’t help.)

class Image(IDrawable):
	def __init__(self, width, height, texture):	
		maker = CardMaker('a maker')
		maker.setColor(1, 1, 1, 1)
		maker.setFrame(-0.5*width, +0.5*width, -0.5*height, +0.5*height)
		self.node = NodePath(maker.generate())

^^ a relevant piece of code.

This looks like a classic cross-border filtering issue. It is mentioned at the bottom of this page: … Wrap_Modes

The solution is to set your texture wrap mode to WM_clamp.

Thank you, it helped.

But what about the text? I use a standard TextNode, and I guess wordwrap has nothing to do with wrapping of individual characters :slight_smile:

Hmm, no, this looks like the same issue, but with the underlying font renderer. Very strange. What kind of font are you using? A custom one that was loaded via loader.loadFont? Does type(font) return StaticTextFont or DynamicTextFont?

It’s a custom one loaded from a .ttf file, and from what I’ve read I believe it’s a dynamic one.

Hmm, it could simply be that because the font is so dense it happens to be more likely to cause this type of issue. Could you attach or e-mail your font file, with possibly some simple code to reproduce it (could be as simple as just something that creates a TextNode and shows it)?

You could try tweaking this configuration variable:

Also make sure you have “text-minfilter” and “text-magfilter” both set to “linear”.