Trying to set the font to “Arial Black” from code but it defaults to “Arial”, Works Ok in the UI…
-
I am using the following code to generate a list of font names. When I select “Arial Black” and I assume others it will not set the font in a new DimStyle. When I select "Arial: and others it works fine.
-
I am trying to set the PreSelectItem to “Bahnschrift” and this name is not selected in the List Box when it comes up. I think this is the way it should work. Please let me know if I am missing somthing.
InstalledFontCollection installedFontCollection = new InstalledFontCollection();
Object preselectItem = new FontFamily("Bahnschrift");
Object selectedFontFamilyName = Dialogs.ShowListBox("Names","Select",installedFontCollection.Families.Select(font => font.Name).ToList(),preselectItem);
if (selectedFontFamilyName == null)
{
return;
}
defaultFontFamilyName = Convert.ToString(selectedFontFamilyName);
Best:
Steve