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

Text Font

Adobe Employee ,
Sep 26, 2022 Sep 26, 2022

Copy link to clipboard

Copied

Using JSX, How to apply Text Font(say Arial) on any text object?

TOPICS
Scripting

Views

76

Likes

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

correct answers 2 Correct answers

Community Expert , Sep 26, 2022 Sep 26, 2022
var idoc = app.activeDocument;
var tframe = idoc.textFrames[0];
tframe.textRange.characterAttributes.textFont = textFonts.getByName("ArialMT");   

Likes

Translate

Translate
Advisor , Sep 26, 2022 Sep 26, 2022

Or

app.selection[0].textRange.textFont = textFonts["ArialMT"];

Likes

Translate

Translate
Community Expert ,
Sep 26, 2022 Sep 26, 2022

Copy link to clipboard

Copied

var idoc = app.activeDocument;
var tframe = idoc.textFrames[0];
tframe.textRange.characterAttributes.textFont = textFonts.getByName("ArialMT");   

Likes

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
Advisor ,
Sep 26, 2022 Sep 26, 2022

Copy link to clipboard

Copied

LATEST

Or

app.selection[0].textRange.textFont = textFonts["ArialMT"];

Likes

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