Background font property not reported as Character Property Change

Adobe Community Professional ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

frameexpert_0-1629829984079.png

I discovered an annoying ExtendScript bug. Background text is not reported as a character property change in ExtendScript. To see it, create a single paragraph and apply a Background color as an override. Click anywhere in the paragraph and run this code. It will show 0 in the alert dialog. It should show 2.

 

#target framemaker

var doc, pgf, textList;

doc = app.ActiveDoc;
pgf = doc.TextSelection.beg.obj;
textList = pgf.GetText (Constants.FTI_CharPropsChange);

alert (textList.length);
TOPICS
Scripting

Views

84

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
Adobe Community Professional ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

re: …create a single paragraph and apply a Background color as an override.

How is that done as an override?
I see "Background:" as a property in Paragraph & Character designer, but not on any Format pull-down.

 

Background is a relatively recent enhancement to FM. Do we suppose that support for it got overlooked in all possible tools?

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
Adobe Community Professional ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Just set it in the Character Designer without a format name. That is what I mean by an override.

@Russ Ward Russ, do you know if this is also an issue in the FDK? 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
community guidelines
Mentor ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

Hi @frameexpert, it definitely seems to be. I tested it on FM2019 with the following code:

 

  tr = F_ApiGetTextRange(FV_SessionId, docId, FP_TextSelection);

  ti = F_ApiGetText(docId, tr.beg.objId, FTI_CharPropsChange);

  F_Sprintf(chars, "ti.len - %d", ti.len);
  F_ApiAlert((StringT)chars, FF_ALERT_CONTINUE_WARN);

 

It reports 0 with a background color override. It reports 2 with any other type of override, including a foreground color.

 

Russ

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
Adobe Community Professional ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

Thank you very much for checking Russ. I will file a bug report.

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
Adobe Community Professional ,
Aug 28, 2021 Aug 28, 2021

Copy link to clipboard

Copied

I submitted a bug report. Please upvote it.

https://tracker.adobe.com/#/view/FRMAKER-10717

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
Enthusiast ,
Aug 28, 2021 Aug 28, 2021

Copy link to clipboard

Copied

Hi Rick,

for me, it works. The offset of the start is the offset of the blank before "friend" (in your example)

Tested with FM2020 and FM2019

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
Enthusiast ,
Aug 28, 2021 Aug 28, 2021

Copy link to clipboard

Copied

LATEST

SORRY!

Of course it doesn't work.

In my first test I've changed the text color not background.

 

 

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