|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Font representationHi all!
Is there any method to draw text (using Graphics) that looks like in MS Word? It has another parameters like spacing or char width. There's an idea that it's caused by differences of GDI and GDI+. But what to do with it? Thank you in advance for any comments. Best regards, A. Dzizenko. You'll have to be more specific. You can draw text in all sorts of ways. For
example, the Graphics.DrawString method has several overloads that take a StringFormat instance as a parameter. The StringFormat class is used to tweak the formatting of the string being drawn. The TextRenderer.DrawText method has several overloads that take a TxtFormatFlags parameter that allows tweaking of the text being drawn. -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Chicken Salad Alchemist I recycle. I send everything back to the planet it came from. "Andrey Dzizenko" <A.Dzize***@logicexplorers.com> wrote in message news:op.tbhoygfkdn0034@dzizenko.lei.com... > > Hi all! > > Is there any method to draw text (using Graphics) that looks like in MS > Word? It has another parameters like spacing or char width. > > There's an idea that it's caused by differences of GDI and GDI+. But what > to do with it? > > Thank you in advance for any comments. > > Best regards, > A. Dzizenko. Both DrawString and DrawText don't take as a parameter char width or char
spacing. Ain't I right? On Wed, 21 Jun 2006 13:54:00 +0400, Kevin Spencer <u**@ftc.gov> wrote: Show quote > You'll have to be more specific. You can draw text in all sorts of ways. > For > example, the Graphics.DrawString method has several overloads that take a > StringFormat instance as a parameter. The StringFormat class is used to > tweak the formatting of the string being drawn. The TextRenderer.DrawText > method has several overloads that take a TxtFormatFlags parameter that > allows tweaking of the text being drawn. > No need to ask:
http://msdn2.microsoft.com/en-us/system.drawing.stringformat.aspx http://msdn2.microsoft.com/en-us/library/system.windows.forms.textformatflags.aspx -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Chicken Salad Alchemist I recycle. I send everything back to the planet it came from. "Andrey Dzizenko" <A.Dzize***@logicexplorers.com> wrote in message news:op.tbhrnbtwdn0034@dzizenko.lei.com... > Both DrawString and DrawText don't take as a parameter char width or char > spacing. Ain't I right? > > > On Wed, 21 Jun 2006 13:54:00 +0400, Kevin Spencer <u**@ftc.gov> wrote: > >> You'll have to be more specific. You can draw text in all sorts of ways. >> For >> example, the Graphics.DrawString method has several overloads that take a >> StringFormat instance as a parameter. The StringFormat class is used to >> tweak the formatting of the string being drawn. The TextRenderer.DrawText >> method has several overloads that take a TxtFormatFlags parameter that >> allows tweaking of the text being drawn. >> > "Andrey Dzizenko" <A.Dzize***@logicexplorers.com> wrote: I've found this interesting:> Is there any method to draw text (using Graphics) that looks like in MS > Word? It has another parameters like spacing or char width. > > There's an idea that it's caused by differences of GDI and GDI+. But what > to do with it? http://wesnerm.blogs.com/net_undocumented/2006/06/text_mess_in_ne.html -- Barry Hmm...
Text measures became identical. But a font became... bold or something. But it was really interesting, thank you! On Wed, 21 Jun 2006 14:38:14 +0400, Barry Kelly <barry.j.ke***@gmail.com> wrote: Show quote > "Andrey Dzizenko" <A.Dzize***@logicexplorers.com> wrote: > >> Is there any method to draw text (using Graphics) that looks like in MS >> Word? It has another parameters like spacing or char width. >> >> There's an idea that it's caused by differences of GDI and GDI+. But >> what >> to do with it? > > I've found this interesting: > > http://wesnerm.blogs.com/net_undocumented/2006/06/text_mess_in_ne.html > > -- Barry > |
|||||||||||||||||||||||