我使用C#开发的字符映射工具来模仿windows字符映射。我需要禁用一些字符加载到我的字符图中。如何限制字符加载到地图?
FontFamily font = fonts.SelectedItem as FontFamily;
foreach (Typeface typeface in font.GetTypefaces())
{
typeface.TryGetGlyphTypeface(out glyph);
if (glyph != null)
{
characterMap = glyph.CharacterToGlyphMap;
}
int index = characterMap.Keys.ElementAt(i);
char c = Convert.ToChar(index);
view.charcter.Text = c.ToString();