Author Topic: how to list fonts used in my VSDX?  (Read 458 times)

0 Members and 1 Guest are viewing this topic.

sunnyimran

  • Jr. Member
  • **
  • Posts: 52
how to list fonts used in my VSDX?
« on: April 25, 2020, 01:40:37 PM »
Hi there,

I have a visio drawing containing 32 pages. there are a few textboxes and rectangle shapes with text. some of those rectangle are used to display barcode.

Q. Is there a ways to get a list of all fonts used in my VSDX drawing. fonts relating to textboxes and shapes that contain text ?

regards

sunnyimran

  • Jr. Member
  • **
  • Posts: 52
Re: how to list fonts used in my VSDX?
« Reply #1 on: April 26, 2020, 07:06:21 AM »
OK I got it the hard way.

I opened my VSDX file as XML and beneath hierarchy I found Page..XML files. each represents the page on vsdx. This file have entries for all drawing objects used in that page including its font name

I aggregated a complete list of fonts by finding and filtering "fonts" word in each XML

that's the way I did it !!

Surrogate

  • Hero Member
  • *****
  • Posts: 1030
    • ShapeSheet™ Knowledge Base
Re: how to list fonts used in my VSDX?
« Reply #2 on: April 26, 2020, 11:33:02 AM »
I did not opened xml for find fonts in vsdx-document. There used font's named stored as font IDs or font names?

In other thread you can find my post. Where i write how font stored in ShapeSheet.

sunnyimran

  • Jr. Member
  • **
  • Posts: 52
Re: how to list fonts used in my VSDX?
« Reply #3 on: April 26, 2020, 02:26:21 PM »
There is a lot of stuff buried in XML.
I found my required font info by searching/filtering and lot of manual work observing the XML

shape-sheet is obvious way when working inside visio (Main app is executing) while XML can be observed without even touching visio App.

you are right each registered font has an ID that is registered by OS and becomes part of system enumeration entity means any app can call a font by that ID. But I think font ID will be different on different PC/different OS. I am sort of sure on this but not yet confirmed.

I am attaching a portion of XML that's how a shape is represented in XML of a Visio page. There is a lot of stuff above this portion and a lot more below this portion. but searching for keyword 'font' returned similar portions

Please have a look at attachment 

Actually I was looking for a VBA script module that will go through all shapes in all pages of current drawing and then list out the fonts that are in use in this drawing. anyways at the moment I got it inside XML. Some other time I will try to getting it through VBA script.
« Last Edit: April 26, 2020, 02:30:28 PM by sunnyimran »

Nikolay

  • Hero Member
  • *****
  • Posts: 958
    • UnmanagedVisio
Re: how to list fonts used in my VSDX?
« Reply #4 on: April 26, 2020, 05:26:07 PM »
As an idea to get the list of fonts:

- Save your Visio file to PDF.
- Open the PDF with Adobe Reader, go to Properties => Fonts. This should show you all fonts used in the drawing.