Click here to Skip to main content
13,043,491 members (52,340 online)
Rate this:
Please Sign up or sign in to vote.
See more:

Can we show/hide installed fonts in Windows OS using C# in Windows Forms
Is there any class through which we can access a font say "Arial" and hide/show it.

We can manually show/hide a font by right click on the font in the Windows fonts folder
Posted 5-Dec-12 19:24pm
John d. Bartels 15-Dec-12 12:08pm
There is a "FontDialog" class that will show the installed fonts

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I don't know if I understand your question right.
If you just want to get the installed fonts, there is a class "InstalledFontCollection" derieved from "FontCollection"

string familyName;
string familyList = "";
FontFamily[] fontFamilies;
InstalledFontCollection installedFontCollection = new InstalledFontCollection();
// Get the array of FontFamily objects.
fontFamilies = installedFontCollection.Families;
// The loop below creates a large string that is a comma-separated
// list of all font family names.
int count = fontFamilies.Length;
for (int j = 0; j < count; ++j)
    familyName = fontFamilies[j].Name;
    familyList = familyList + familyName;
    familyList = familyList + ",";

Hope this is what you wanted to know.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100