Copy link to clipboard
Copied
I am scripting something that uses some set paragraph and character styles. These are using fonts that cannot change in general, but sometimes I run into special characters that do not appear in the font. How do I set it so the text defaults to one font but falls through to another if the character is not available?
Copy link to clipboard
Copied
Here is a sample solution of replace missing characters font.
app.findGlyphPreferences = null;
app.findGlyphPreferences.glyphID = 0; //glyphID 0 = Missing Character
app.findGlyphPreferences.appliedFont = app.fonts.item ("TARGET_FONT");
var targetCharacters = app.findGlyph(); // targetCharacters : Array of Characters
for (var i=0;i<targetCharacters.length;i++) targetCharacters.appliedFont = app.fonts.item("REPLACE_FONT")