I means, how to get ALL SUPPORTED CHARATCTERS by a font(Font class)?
That's the first question.
I have found the solution:
var families = Fonts.GetFontFamilies(@"C:\WINDOWS\Fonts\Arial.TTF");
foreach (var family in families)
{
var typefaces = family.GetTypefaces();
foreach (Typeface typeface in typefaces)
{
GlyphTypeface glyph;
typeface.TryGetGlyphTypeface(out glyph);
IDictionary<int, ushort> characterMap = glyph.CharacterToGlyphMap;
foreach (KeyValuePair<int, ushort> kvp in characterMap)
{
Console.WriteLine(String.Format("{0}:{1}", kvp.Key, kvp.Value));
}
}
}
BUT,What's the charaterMap(that IDictionary) contains?
That's the second question.
Thanks.