Update Font Name Field for Inherited Styles

So I had a voice conversation with ChatGPT about this and we were going through the steps involved in editing styles. In a template, I have set the font for the default paragraph style to Arial. Now Heading is set to inherit from default paragraph style, but when I check the fonts under Heading in the Styles sidebar, they are all set to Liberation Sans. The headings are also set to inherit from Headings and Headings inherits from default paragraph style, so shouldn’t the fonts have changed from Liberation Sans to Arial, or is it just that the value shown in the font field in the dialog doesn’t update? To fix this, I specifically set the font to Arial in Headings and this updated the font shown when I checked the edit dialog for each heading.

This is the version information:

Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-IE (en_IE); UI: en-GB
Calc: threaded

In the “General” tab of the style, you can see what is modified with respect to the style it inherits from.

1 Like

Yes, but even though Headings inherits from default paragraph style, in General, it still says that Liberation Sans is the font used. Similarly when I check General in Edit Style for headings 1, 2, 3, etc. Maybe I need to click on “Reset to Parent” to refresh the settings (should be “Set to Parent” if that’s what it does).

I changed the default paragraph style font to something distinctive and all the inherited styles refreshed in the Style sidebar. As you can see, the Headings didn’t change, even though they inherit from default paragraph style (and I tested this by typing DPS text and then some text with a heading style.

If you look at Heading style, it is set to Liberation Sans, change it there to change it for all Heading styles.

Alternatively, you can change it in Tools > Options > LibreOffice Writer > Basic Fonts (Western).

Better to read chapter 20 of the Writer Guide, download from English documentation | LibreOffice Documentation - LibreOffice User Guides

1 Like

Yes, that’s what I ended up doing.

As you can see in the hierarchical view, styles are organised in a tree-like structure. Default Paragraph Style (DFS) is the ultimate root from which all others inherit. But there are also “sub-roots”, such as Body Text or Headings (more generally all those with an expand/collapse control). When you change an attribute in these sub-roots, you create an override and break the inheritance chain.

This is the case for Heading where font face is factory-configured for Liberation Sans while DFS is Liberation Serif.

Tools>Options, LO Writer>Basic Fonts (Western) provides a quick access to several sub-roots font choice for you to tailor the look of your documents. Finer-grained control is done with individual style customisation.

@mariosv gave you the tip to see the overrides created by the style. Reading may be a bit difficult.

1 Like

As a explanatory note, on the inheritance of properties

  • If a property has changed in a child style, that property of the father style will not inherit.
  • To re -activate the inheritance of a property, you must:
  1. Check if that property is changed in the son style.(@mariosv 's tip )
  2. Use the style properties dialog and use the Reset to parent button
    .
  • Keep in mind that this button only reset the properties of the active tab
1 Like

But why is the font setting for “Heading” not changing and staying at Liberation Sans, even though Heading inherits from DPS? Or should it? When I edit the settings for Heading, it’s explicitly indicated in the settings that it inherits from DPS, but the summary also shows Liberation Sans as the font being used. Is Heading a branch off DPS or is it a separate branch with children? I changed the font in Heading as a workaround and that fixed things.

Inheritance plays on each attribute separately. When you change font face in Heading, this cuts the face attribute from DPS. But all other unmodified attributes are still inherited, e.g. font size or indents.

When you “touch” any attribute, this cuts the inheritance chain at this level. Children will inherit the modified attribute because they no longer “see” the corresponding one in DPS.

And if you make up your mind, wishing to revert to initial state, e.g. you want the font face to be the same as DPS, don’t set it manually to Liberation Serif. Apparently, this is the same, but as you “touched” the setting, it is now an override. If you change it in DPS, the change will not propagate past Heading. What you need to do is set the attribute to “transparent” (inheriting state). This is done only by pressing Rest to Parent which also resets everything in the current tab to “transparent”. So, you have to recreate the other desired overrides.

Unfortunately, there is a weakness in the GUI: transparent state is not specifically tagged. You must check General tab to get the list of overridden attributes (but this list is quite difficult to read for some attributes).