Highlighted

Default paragraph font not found in character catalog

New Here ,
Sep 16, 2015

Copy link to clipboard

Copied

Hi all,

I'm wondering if there's a way to get the default paragraph font as a character format via ExtendScript. I currently have a script that records all the character formats in the active doc.

var arr = new Array;

var tag = active.FirstCharFmtInDoc;

var tagname = tag.Name;

var count = 0;

while (tag.ObjectValid()) {

     arr[count] = tagname;

     tag = tag.NextCharFmtInDoc;

     tagname = tag.Name;

     count++;

}

return arr;

In FrameMaker, this list looks like:

Default Font

Emphasis

EquationVariables

Hypertext

But when iterating through the character formats in the script, it omits the default font. Any ideas on how to stop this omission or why it occurs?

Most Valuable Participant
Correct answer by Arnis_Gubins | Most Valuable Participant

The "Default Font" tag is actually not in the stored Catalog of a document. It's just a hardwired reset that strips off all applied character formats and/or tags.

TOPICS
Scripting

Views

574

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

Default paragraph font not found in character catalog

New Here ,
Sep 16, 2015

Copy link to clipboard

Copied

Hi all,

I'm wondering if there's a way to get the default paragraph font as a character format via ExtendScript. I currently have a script that records all the character formats in the active doc.

var arr = new Array;

var tag = active.FirstCharFmtInDoc;

var tagname = tag.Name;

var count = 0;

while (tag.ObjectValid()) {

     arr[count] = tagname;

     tag = tag.NextCharFmtInDoc;

     tagname = tag.Name;

     count++;

}

return arr;

In FrameMaker, this list looks like:

Default Font

Emphasis

EquationVariables

Hypertext

But when iterating through the character formats in the script, it omits the default font. Any ideas on how to stop this omission or why it occurs?

Most Valuable Participant
Correct answer by Arnis_Gubins | Most Valuable Participant

The "Default Font" tag is actually not in the stored Catalog of a document. It's just a hardwired reset that strips off all applied character formats and/or tags.

TOPICS
Scripting

Views

575

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
Sep 16, 2015 0
Most Valuable Participant ,
Sep 18, 2015

Copy link to clipboard

Copied

The "Default Font" tag is actually not in the stored Catalog of a document. It's just a hardwired reset that strips off all applied character formats and/or tags.

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
Reply
Loading...
Sep 18, 2015 0
New Here ,
Sep 18, 2015

Copy link to clipboard

Copied

I see, that makes sense. Thanks!

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
Reply
Loading...
Sep 18, 2015 0