overlaid parts of text get transparent GDI+
Asked Answered
P

0

1

I run this code:

graphics.DrawString("( پنج)", new Font(IranNastaliq, 77), ...);

which results in:
enter image description here
As you can see, circled parts are overlaid and turned transparent. Why those parts get transparent and how should I prevent it?

Persse answered 9/9, 2020 at 17:33 Comment(6)
Looks like a Font error to me. - You could try TextRenderer.DrawText(graphics, ...)Sane
@Sane Overlays are caused by font but there are no transparencies in other apps. Also, TextRenderer solved the problem but rendered text needs antialiasing. I can't find how should I enable antialiasing for TextRenderer.Persse
Antialiasing . This ought to be done by setting the properties of the Graphics object it takes. I have a hunch that graphics.DrawString get confused and creates a wrong GraphicsPath in the process. Is it just the holes or is the whole shape wrong? GraphicsPath.AddText would be another option which would let you test tw o WindingMOdes. - TextRenderer is recommended for everything except(!!) printing..Sane
@Sane I set properties of Graphics object like this post. However, TextRenderer still generate jagged texts.Persse
Maybe setting the TextContrast lower would help?Sane
@Sane I changed many properties of my Graphics object but TextRenderer doesn't care at all! It always render the same.Persse

© 2022 - 2024 — McMap. All rights reserved.