Could someone help me and explain how the fontID value (in ShapeSheet cell Character – Font) is determined? Is it based on the template, or can different computers have different fontIDs even when using the same template? For example, is the Arial fontID (number value) always the same in documents, which use the same template? If I put programmatically a style's fontID value to "4" (on my computer 4 = Arial) in a template, is the style font “Arial” in this template on all computers? It seems that even on the same computer the value of Arial fontID varies in different documents (using different templates)?

Thank you for quick response ! I use now Visio 2016 version. The problem is that I have already made the code, and now I am wondering that is it a problem, although it seems to work right at least on two different computers. But I was wondering how the font number is determined, because in some other drawing (based on other template) the Arial fontID is different. I just don't understand how this goes.

I was also wondering, if the FONTTOID() is a good way to set the font, is it somehow slower for Visio?

Yes, I know now that I should have written it differently.But the question is, that is it a problem that I have written the value "4" instead of "Fonttoid(\"Arial\")" to the cell, if it always uses the same template?Does the fontID remain always the same (Arial = 4) in the same template?

But if you used the same template as I, would you then have the same fontID? When I use this specific template, the Fonttoid("Arial") value is 4, but if I open a new blank Visio drawing, then Fonttoid("Arial") has value 21.

In most cases, the font identifier is system-specific. Although the font remains established once used in a file, the FONT function provides consistent access to a particular font across systems and versions of Visio. It is recommended that you use the FONT function to assign fonts instead of referring to font identifiers directly.

I must admit I've never understood the whys and wherefores of using a font ID rather than the font name, no other software I know of does such a thing. Some time ago I created some shapes for a company and they specified a certain font (a corporate thing), the font came out 1 off from what they wanted, to them it came out as Algerian or something!

Logged

Electronic and Electrical engineering, business and software stencils and applications for Visio -

I found the cause of the problem: when I save the drawing.vsd to drawing.vsdx, the fontID changes when the drawing is opened next time. The font name remains the same ("Arial"), but its ID in the Font cell changes (from 4 to 21). Otherwise it seems to remain the same in the same drawing / template, but it changes when the format changes. Thank you for helping me find this out!