Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Font representation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrey Dzizenko - 21 Jun 2006 10:36 GMT
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.
Kevin Spencer - 21 Jun 2006 10:54 GMT
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.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.

> Hi all!
>
[quoted text clipped - 8 lines]
> Best regards,
> A. Dzizenko.
Andrey Dzizenko - 21 Jun 2006 11:34 GMT
Both DrawString and DrawText don't take as a parameter char width or char  
spacing. Ain't I right?

> You'll have to be more specific. You can draw text in all sorts of ways.  
> For
[quoted text clipped - 3 lines]
> method has several overloads that take a TxtFormatFlags parameter that
> allows tweaking of the text being drawn.
Kevin Spencer - 21 Jun 2006 16:35 GMT
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

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.

> Both DrawString and DrawText don't take as a parameter char width or char
> spacing. Ain't I right?
[quoted text clipped - 6 lines]
>> method has several overloads that take a TxtFormatFlags parameter that
>> allows tweaking of the text being drawn.
Barry Kelly - 21 Jun 2006 11:38 GMT
> 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

Signature

http://barrkel.blogspot.com/

Andrey Dzizenko - 21 Jun 2006 14:09 GMT
Hmm...

Text measures became identical. But a font became... bold or something.

But it was really interesting, thank you!

>> Is there any method to draw text (using Graphics) that looks like in MS
>> Word? It has another parameters like spacing or char width.
[quoted text clipped - 8 lines]
>
> -- Barry

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.