DynamicTextFont With Outline Has White Spots?

I’m using a DynamicTextFont in my current project, and applying the built-in “outline” effect to it. For the most part, this works well. However, at the edges of the text I’m finding that there is an unsightly pale “halo”. (See the screenshot below for an example.)

I’ve tried setting the “feathering” parameter of the “setOutline” method to “0”, to no avail.

I’ve also checked whether this might be the background colour showing through the transparent edges of the text, and it seems to not be so.

What might be causing this, and how might I get rid of it…?

Screenshot from 2022-02-14 12-44-34

Probably not any help but maybe an idea of where it’s coming from… is it showing through from the foreground color of the text? Same idea you have but instead of bkg leaking through, it’s the base font color?

Anyway, again, sorry, not a solution. Just a thought outloud.

No, I see nothing to apologise for! Even if you don’t have a solution to offer, your suggestion might aid in diagnosing the problem!

Speaking of which…

Based on a quick experiment, you are in fact correct! The undesired colour does in fact appear to be the foreground colour of the text!

In which case, this would seem to be an engine-bug; I may open an issue for it on GitHub, presuming that no-one has insight that points in a different direction.

my inkscape stroke paint alpha channel experience has paid off!

I just thought it might be something you didn’t check yet. Hope you can find a solution.

I’m definitely always hoping to make a positive to the community and try to avoid adding noise. Wasn’t sure if I was helpful so I added the disclaimer. I’m quite pleased it’s got you moving in a direction that may be fruitful.


I’ve created an issue for this over on GitHub:

A reply on GitHub from rdb provides a workaround:

To work around the problem, set the background colour to the colour of the outline, but with zero alpha:

font.setBg((0, 0, 0, 0))

1 Like