Retrieving Font Information


Below is the code for retrieving font information:

  foreach (Font font in Application.ActiveDocument.Fonts)


    //Display information about the fonts




The Font object represents a typeface that is either applied to text in a document or available for use on the system.

A Font object maps a name (for example, “Arial”) to the font ID (for example, 3) that Microsoft Visio stores in a Font cell in a Character section of a shape that contains text formatted with that font. Font IDs can change when a document is opened on different systems or when fonts are installed or removed.

  //Call the diagram constructor to load diagram from a VDX file

 Diagram vdxDiagram = new Diagram(@"E:\Aspose\Aspose Vs VSTO\Aspose.Diagram Vs VSTO Visio v1.1\Sample Files\Drawing1.vdx");

 foreach (Aspose.Diagram.Font font in vdxDiagram.Fonts)


    //Display information about the fonts



Download Sample Code

Download Running Code