|
-
Apr 14th, 2011, 01:33 AM
#1
Thread Starter
Addicted Member
Re: How to Get Font Name and it's Own Styles.?
 Originally Posted by jmcilhinney
There's no property or method that will give you the list you want. What you have to do is, once you've got a Font, get its FontFamily first and then call IsStyleAvailable on that for each FontStyle value. Note that you're going to have to call it for composite values as well as discrete, e.g
vb.net Code:
Dim availableStyles As List(Of FontStyle)
If myFontFamily.IsStyleAvailable(FontStyle.Bold) Then
availableStyles.Add(FontStyle.Bold)
End If
If myFontFamily.IsStyleAvailable(FontStyle.Italic) Then
availableStyles.Add(FontStyle.Italic)
End If
If myFontFamily.IsStyleAvailable(FontStyle.Bold Or FontStyle.Italic) Then
availableStyles.Add(FontStyle.Bold Or FontStyle.Italic)
End If
You can make it nicer than that but you get the idea.
Yes..!..Yes..! this is i am expecting one .......
but different fonts has different Styles Name ...
how can i find that Mr.jmcilhinney
-
Apr 14th, 2011, 01:33 AM
#2
Re: How to Get Font Name and it's Own Styles.?
 Originally Posted by medsont
Yes..!..Yes..! this is i am expecting one ....... 
but different fonts has different Styles Name ...
how can i find that Mr.jmcilhinney
I just told you how.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|