0
我喜歡在WPF中構建自己的字符映射。是否有任何最簡單的方法來遍歷真正的字體的所有Unicode字符?WPF中的字符映射
我試過這樣的事情。
FontFamily fontfamily = combo.SelectedItem as FontFamily;
var typefaces = fontfamily.GetTypefaces();
foreach (Typeface typeface in typefaces)
{
GlyphTypeface glyph;
typeface.TryGetGlyphTypeface(out glyph);
if (glyphs != null)
{
mylist.Items.Add(glyph);
}
}
這只是將Glyphs命名空間添加到我的列表框中。在這種情況下,我不確定如何定義我的數據模板。
問候,
Jawahar
http://wpfplayground.blogspot.in/2012/06/character-map-in-wpf.html –