Features


Friday, September 19, 2008

How to get the available fonts on the server - vb.net

This is my first time to get the available fonts on the server using vb.net language.
anyways i create a method that loads up the fonts on the dropdownlist. the code look like this

Private Sub LoadFonts()
Dim installed_fonts As New InstalledFontCollection
Dim font_families() As FontFamily = installed_fonts.Families()

' Display the font families.
For Each font_family As FontFamily In font_families
' font_family.Name & ", "
ddlFontName.Items.Add(font_family.Name)
Next font_family
End Sub

Hope this help you.

No comments: