I'm opening a document that has an object with an embedded font. The font is not in my system.
I'm creating a new TextShape and trying to resize it. I get an error.
Set s22 = ActiveLayer.CreateArtisticText(0, 0, "Text", , , "Arial", 67)s22.Text.Story.Size = 50 ' error in this string
If you delete an object with an embedded font, save the document, close it, and reopen it, the problem disappears.
The problem may not be solvable. TextShape doesn't have an attribute for embedded TextShape.
Is there any way to get a list of fonts installed on the system and compare them with TextShape font?
I don't see any other way.Application.fontlist sees the missing font.
My task is to create other text shapes and change their properties. But until I find and delete this object, nothing works through the macro.
The file with the problem is attached. font:HuxleyVertical BT [Embedded].
dontwork size2.zip
I found the following solution.
You need to get three properties of the text shape style
set sh =ActiveShapeset shStyle=sh.styleSet kkk = shStyle.GetProperty("character").GetProperty("RTL") arr(0) = kkk.GetProperty("font") Set kkk = shStyle.GetProperty("character").GetProperty("farEast") arr(1) = kkk.GetProperty("font") Set kkk = shStyle.GetProperty("character").GetProperty("latin") arr(2) = kkk.GetProperty("font")
If all three values of array are different, then the font is embedded and is not installed on your system.
Name of this shrift is contained .GetProperty("latin").GetProperty("font")