Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Set Font Fall Through

New Here ,
Jan 11, 2017 Jan 11, 2017

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?

TOPICS
Scripting
230
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2017 Jan 16, 2017
LATEST

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")

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines