msdfgen icon indicating copy to clipboard operation
msdfgen copied to clipboard

Outline effect is not good on some glphys

Open sry948749099 opened this issue 1 year ago • 4 comments

like this: aaa

sry948749099 avatar Aug 29 '23 08:08 sry948749099

Post the font and all parameters used to generate the SDF.

Chlumsky avatar Aug 29 '23 15:08 Chlumsky

Post the font and all parameters used to generate the SDF.

Font file: example.zip

Mode: MSDF pxRange: 6 font size: 32 render size: 200 shader: 20230830-083459

sry948749099 avatar Aug 30 '23 00:08 sry948749099

The issue is that there are these tiny edge segments in the corners which are causing that three different edges occupy a very small area in the SDF, which cannot be encoded properly at the target resolution. Removing them would solve this. I might also have an idea how these edges could be ignored in msdfgen without the need to modify the geometry, will try that out in the weekend.

image

Chlumsky avatar Sep 01 '23 20:09 Chlumsky

The issue is that there are these tiny edge segments in the corners which are causing that three different edges occupy a very small area in the SDF, which cannot be encoded properly at the target resolution. Removing them would solve this. I might also have an idea how these edges could be ignored in msdfgen without the need to modify the geometry, will try that out in the weekend.

image

Thanks for your response, look forward to your good news!

sry948749099 avatar Sep 02 '23 06:09 sry948749099