Wrong font when an inline element occurs in a paragraph whose default font is determined by a first-paragraph rule

Adobe Community Professional ,
Sep 13, 2017

Copy link to clipboard


I have just filed bug FRMAKER-3398 titled "Wrong font when an inline element occurs in a paragraph whose default font is determined by a first-paragraph rule". If you want to see the sample files, you can download them from the bug report.

The two provided files are a structured document and its EDD. The EDD is provided for information only, although you can import element definitions from the EDD into the sample document to confirm the claims made below. These files were created in FM12, but they illustrate a problem that still occurs in FM2017. The problem is that an inline element uses the wrong font when:

1) The format rules for the inline element do not change the font, so

that the inline element should use the default paragraph font.

2) The containing paragraph's font is set by a first paragraph rule.

In this situation the inline element's font is incorrectly determined by the font that would be used without the first paragraph rule instead of the font specified by the first paragraph rule.

The situation is illustrated by FontIssue.fm. It has three paragraphs. The first one uses paragraph format Body which is 20pt bold. The other two use paragraph format

Bulleted which is bulleted, red, and 12pt regular.

All three paragraphs contain text and an inline Quotation element that inserts surrounding quotation marks as a prefix and suffix but does not set font properties.

Notice that the Quotation in the first and third paragraphs use the default paragraph font, but the Quotation in the middle paragraph does not. The significant difference is the way the paragraph formats are applied:

1. The EDD does not apply any formatting to the root element, so the first paragraph uses the default paragraph format, Body.

2. The second paragraph is in an ExplanationFirst element, which applies paragraph format Bulleted in a first paragraph rule.

3. The third paragraph is in an ExplanationAll element, which applies paragraph format Bulleted in a text format rule.

These results suggest that FM applies Bulleted to the second paragraph after formatting the Quotation but applies Bulleted to the third paragraph before formatting the Quotation. FM must apply all the relevant text format rules first, which will determine where the paragraph breaks are, and then go back and apply any first paragraph rules. In other words, it must format the Quotation in the second paragraph before applying the first paragraph rules since if the Quotation winds up in its own paragraph, the first paragraph rule won't apply to the Quotation. Unfortunately, once FM applies the first paragraph rules, it should but does not reformat the text ranges within the first paragraph.









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

Have something to add?

Join the conversation