I am currently working on a small font organization / preview for myself, however, it is difficult for me to get the information I need.
I found that I can load an external font by simply creating a new FontFamily object with the location of the font file as its source. However, I cannot find a way to return the font of the font. I know that I can use FontFamily.FamilyNames to get the name of the font family, but this is useless to me when I have multiple fonts with the same family that is displayed. I would like to display a specific name for a particular font.
Is there any way to do this? I am currently displaying the file name, but it is incredibly messy because I have to iterate over each file in the directory and call Fonts.GetFontFamilies () for each so that I can get the actual file name (the FontFamily Source property gives only the temporary WPF family -name instead of something useful).
rossisdead
source share