Is there a way to decide whether a font is used as "default font" for a document?
Or a simple way to see whether a font is used at all?
The actual problem is that InDesign server (CS5 ver. 188.8.131.523) returns the "default font" along with all other used fonts, when looping through the document.fonts collection. This becomes a problem when the default font is never used in the document, and is also not present. Then the (name of) the default font may also become meddled by a style that does not even exist for that very font.
This is indicated as a problem in our application... as a missing font, just as the call to InDesign server reports back. But the font (with that style) doesn't even exist.
Running the same script on an desktop InDesign CS5 (ver 7.0.4) the unused default font of the same document is not returned at all.
To get the default font, just check:
Obviously this didn't solve the problem, since InDesign server has made up a font name that is reported as missing... and it's not equal to the default font. So there is some lack of logic in my previous description.