Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

How fonts travel in Visio

John Goldsmith's profile image

John Goldsmith

21 January 2011
  • General Use
  • ShapeSheet
  • Themes, Styles and Formatting

FontsInVisio

When you select a particular font in a Visio document, what you are really doing is adding a reference to a font that’s resident on your system.  What you don’t always know is that anyone else who opens your document will have the same font on their system and therefore that they will see the document as you intended…

I’m currently in the process of putting together some Visio shapes for a Windows Phone wireframing post and have been thinking about the best approach for enabling dynamic fonts (ie a single shape that changes its font based on Shape Data.  I have to admit that the way in which Visio handles fonts wasn’t something I completely understood so I thought I’d hit up the Visio team with a question and jot down what I learnt.

Font by ID

One factor in handling fonts in Visio is that they are referenced by an ID number and this may differ from system to system.  You can see the ID by opening the ShapeSheet (have a look at the just for starters post if you’ve not come across this before) of a shape and scrolling down to the Character section.  In the image below, for example, you can see that the shape I’ve selected has a font called ‘Buxton Sketch’ and, on my system, its ID is 58:

ShapeSheetFontID

If I now remove the ‘Buxton Sketch’ font from my system then ID 58 no longer refers to ‘Buxton Sketch’, but another font – in this case ‘Californian FB’:

ShapeSheetFontIDv2

So if you can’t trust that the same ID will refer to the same font on two different systems then how does Visio deal with this?  Well the answer is a hierarchical solution.

FaceNames

The first time you add a new font to your shape Visio stores a reference to it at document level.  You can see this by saving the document in xml format (.vdx) and looking for the FaceNames tag:

FaceNames

If you then send your document to a colleague who opens it on their system, Visio will see that one or more shapes reference a font with ID 58 and try to resolve this against a font.  It first hunts through the FaceNames to work out which actual font the ID is referring to and then whether it can find it on the system.  Continuing with the above example, if Visio is able to locate ‘Buxton Sketch’ on the target system then of course it uses it, but if it can’t then it then steps down to the next level, which is to try an find a reasonable equivalent.

Enter the Panose System.

Panose

The Panose font matching and classification system enables fonts to be placed into various categories such as Family, Serif Style, Weight etc. and this means that you can identify a visually similar font based on its Panose digits (see the Panos attribute in the xml above).  If you’re interested in this system then have a look at the wiki link above and also the image below (click for the original pdf), which is a nice visualisation of the Panose categories:

Panose

FontToID

This is all fine if you’ve used your fonts in advance, but what happens if you either don’t want to use each font, or are not dealing with document level objects (perhaps you have an add-in that pushes font ID’s into the respective cell)?  Well here you have the FontToID ShapeSheet function, which appeared in Visio 2007.  This function takes a string as a parameter and returns, as you might expect, an ID.  For example:

=FONTTOID(“Buxton Sketch”)

The documentation for the FontToID function isn’t very extensive, so bear in mind that a) the string is case sensitive and b) if the font name is not found the function returns a #VALUE error. (Thanks to MVP Scott Helmers for those two.)

So I hope that helps those, who like me, hadn’t quite grasped the intricacies of font handling in Visio.

Note that FONTTOID was superceded by the FONT() function in Visio 2013, and you should now use this function instead. Example usage would be:

=FONT("Buxton Sketch")

Change log

  • 24 April 2024 Added note on prefered function FONT() in 2013 onwards.

Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

Visio Blogs

  • Bill Morein (via Wayback Machine)
  • Chris Castillo (via Wayback Machine)
  • Chris Hopkins (via Wayback Machine)
  • David Parker
  • Eric Rockey
  • Jesse Phillips-Mead
  • John Marshall
  • Michel LAPLANE (FR)
  • Nikolay Belyh
  • Saveen Reddy (via Wayback Machine)
  • Visio Guy
  • Visio [Product] Blog
  • Visio Insights (via Wayback Machine)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon