Font size anomaly in character styles?

I’ve noticed strange behavior when using character styles.

Say I have the Text Body paragraph style set to 14 points. I select a word and apply the Emphasis character style to it. The word appears in Italics and the font size remains at 14 points.

If I go to modify the Emphasis character style, however, I find the font size in the Font tab reads 12 points.

Now, I change the font size of the Emphasis character style to 16 points and click OK. The word with the Emphasis character style appears in 16 point type. While the rests of the text remains 14 points.

Now, I go back and change the font size of the Text Body paragraph style to 20 points and click OK.

All of the text in the paragraph appears in 20 point type except the word with the Emphasis character style which remains at 16 points.

When I originally applied the Emphasis character style, it seemed the font size of the Text Body character style took precedence. After changing the font size of the Emphasis character style, however, the font size of the character style seemed to take precedence. This seems to be an inconsistency.

Can anyone explain to me why this happens?

I’m using LibreOffice 7.2.7.2 (x64) on a Windows 11 machine.

When you Modify a style, as soon as you set an attribute it breaks the link between it and the parent style, in other words it becomes fixed.

Right-click on Emphasis character style and select Modify. In the dialogue that opens press the button Reset to Parent it will reset the style as a child of Default Character style, then under the Font tab, change only the font style from Regular to Italic for the listed languages, then OK.

1 Like

Thank you for the reply EarnestAl.

While I had thought something along that line, I still wondered why changing the font size in the Body Text did not change the font size in the Emphasis dialog.

Experimenting further, I came to the conclusion that the Emphasis character style can only have one font size showing in the style’s dialog although it can be used in two paragraphs using different paragraph styles with different font sizes.

Therefore the font size listed in the Emphasis character style remains unchanged though its display in the different paragraphs varies.

As you say, this linking of the Emphasis character style and differing paragraph styles remains until the font size of the Emphasis character style is changed manually and all links are broken.

Once the links are broken, all words with the Emphasis character style use the same font size no matter what varying paragraph styles font sizes are set to.

This also seems true of the other style attributes of the character style.

Thank you again for your response. It set me off in the right direction to better understand what was going on.

I wonder if it would help make this linking more clear if the attributes originally showed as “Automatic” like The Font color does in the Font Effects tab.

The Organiser tab is very useful to see what changes have been made and what the Parent style is. The Help button from the Organiser tab links to useful information but you might consider having a look at the Styles chapter in the Writer Guide downloadable from English documentation | LibreOffice Documentation - LibreOffice User Guides

2 Likes

The story is a bit more complicated.

  • Paragraph and character styles

    They live in different spaces (in fact different layers) and have no relation to each other.

    Paragraph styles can be hierarchically organised in an ancestor-children relationship. This relationship is “closed”, meaning there is always an ultimate ancestor, be it Default Paragraph Style. Displayed font size will always reflect the effective size.

    Character styles can also be hierarchically organised among themselves. They have no relation to paragraph styles (when character styles are created). Contrary to paragraph styles, they may have no ancestor (totally independent style).

  • Attribute values and layers

    Style definition is also “incomplete” in the sense you are not required to set all attributes. Some of them may remain in an indeterminate state, which I call “transparent”. Set (or forced clear) attributes override those in ancestor styles when applied, while transparent do nothing.

    This means toggling attributes can have 3 values: set, cleared and transparent. Enumerated attributes (such as font face or size) have one more value than those shown: transparent.

    This transparent value comes into play in inheritance inside style category (paragraph or character) and also across category when layers are taken into account: paragraph styles are in the lower layer, then character style in the middle layer and direct formatting in the upper layer.

There is a dramatic limitation in Writer style definition dialog: it can’t display transparent state. This is particularly important in the Font tab (though the problem exists also in the other tabs but seems less critical). Never trust the font face, variant or size. Check in the Organizer tab as recommended by @EarnestAl to see which attributes have been explicitly changed.

4 Likes

Thank you EarnestAl.
I woke up this morning thinking I should take a more intense look into what the Write Guide says about character styles.

Thanks for the lengthy explanation ajlittoz.

Finally, I better understand the purpose of the lower portion (Contains) of the Organizer tab. This is useful.