Dave's Brain

Browse - Programming Tips - How can I stop GDI+ from padding text when I draw it?

Date: 2015apr27
OS: Windows
Product: GDI+

Q.  How can I stop GDI+ from padding text when I draw it?

A.  Use StringFormat::GenericTypographic() like this:

StringFormat format = StringFormat::GenericTypographic(); graphics.DrawString( ...., ..., ..., ..., &format, ...);

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.