Change kerning in System.Drawing.Graphics.DrawString ()

I pass text to an image using the System.Drawing.Graphics class and the DrawString () method.

I need to generate text for this image in a very specific way so that it exactly - pixel for pixel - matches the existing image.

The problem is that the text generated by DrawString () has different kerning for the text in the existing image (my best guess is about 0.5-1 pixels per letter).

Can someone tell me if it is possible to change kerning when using this namespace and method?

In addition, this is a custom font that we use, and we had to convert it from open-type (the source image used) to true-type. Perhaps kerning was changed at this point?

+5
source share
1 answer

http://blog.stevex.net/rendering-text-using-the-net-framework/

The problem is that text kerning is measured differently - more accurately - but so often it is incompatible with how application developers want to use these features.

Decision:

ExtTextOut , , . ,.NET framework - , , - P/Invoke ExtTextOut GDI.

.. , !

+3

All Articles