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

Set Font Fall Through

New Here ,
Jan 11, 2017 Jan 11, 2017

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?

TOPICS
Scripting

Views

201

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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