When I open a .cel file, I'm greeted by the following message:
File ...\Organization\cell\SRS_ToolCells.cel could not find TrueType font [SRS TT]. Replaced missing TrueType font [SRS TT] with [Arial]. Some text may not display correctly. Make sure that the appropriate True Type font file (*.ttf) is installed on the system, or in a directory specified in MS_FONTPATH.
I am attempting to find where that font may be used (in which cell model). I run this bit of VBA code:
Sub DumpFontsInDesignFile() Dim oFont As Font Do Set oFont = ActiveDesignFile.Fonts.Find(msdFontTypeWindowsTrueType, "*SRS*", oFont) If oFont Is Nothing Then Exit Do Debug.Print oFont.Name Loop End Sub
and the output does not include "SRS TT". So, where may it be hiding and how would I find the occurrences?
Interestingly, when I use only a wildcard for the Find(msdFontTypeWindowsTrueType, "*", oFont), I (seem to) get all the fonts in the active design file (?) and the missing "SRS TT" is NOT in that list either.
Bruce
Hi Bruce,
a question is whether VBA does not hide some internal aspects how fonts information are stored, e.g. it shows only fonts really used, not fonts recorded e.g. in FontMap?
Does "DELETE UNUSED FONTS" provide any info in Message Center?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan Šlegr said:Does "DELETE UNUSED FONTS" provide any info in Message Center?
Yes - it did ! The Message Center reported "5 Fonts removed". I was unaware of this key-in. It seems to have resolved the issue.
Answer Verified By: Bruce Reeves SRNS
It confirms the assumption VBA API does not provide full access to FontMap, but only to fonts currently used.
Regards,