0 out of 3 rated this helpful - Rate this topic

Graphics.DrawString Method

Draws the specified text string at the specified location with the specified Brush and Font objects.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method DrawString(String, Font, Brush, PointF) Draws the specified text string at the specified location with the specified Brush and Font objects.
Public method DrawString(String, Font, Brush, RectangleF) Draws the specified text string in the specified rectangle with the specified Brush and Font objects.
Public method DrawString(String, Font, Brush, PointF, StringFormat) Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
Public method DrawString(String, Font, Brush, RectangleF, StringFormat) Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
Public method DrawString(String, Font, Brush, Single, Single) Draws the specified text string at the specified location with the specified Brush and Font objects.
Public method DrawString(String, Font, Brush, Single, Single, StringFormat) Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
Top
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Graphics.DrasString() could not render khmer script correctly
I'm trying to send Khmer script(unicode) string to printer using PrintDocument class provided by .NET framework.

Unfortunately it seems to me that the Graphics.DrawString() does not render Khmer script correctly.

Platform: Windows 7 Ultimate
IDE: VS 2010 Ultimate + .NET framework 4

Here is the sample code:
http://paste.ideaslabs.com/show/3yyS0Jmm54

Expected: "សួស្តី"
But display: "សួស្​តី"
Better alternatives exist
Consider using TextRenderer instead of this method. See http://msdn.microsoft.com/en-us/magazine/cc751527.aspx