Remove font completely from template


I am in the process of basing my documents fully on pre-defined Templates and I would like to use only one font family to get a consistent look (and rebase the templates on libertinus instead of libertine).

But when I look in the content.xml I see a lot of other fonts mentioned as well.

Is there a way to remove fonts completely from a Template and replace them by another?

Thank you very much for your help.

Best wishes

I use the default PARAGRAPH STYLE on my DEFAULT TEMPLATE to manage my default Font selection. Would this give you what you want?

Not completely, there seem to be some styles still being dependent on old fonts (particularly I’m trying to replace libertine with libertinus). I see this if I’m inspecting the content.xml from the template.

Using the PARAGRAPH STYLE /DEFAULT TEMPLATE is the worst solution.

Normally you use the “Body Text” template for the text. It is derived from DEFAULT.

If you have selected the paragraph styles in the sidebar, switch to View hirarchical at the bottom.

So if you change “Text body” according to your wishes, it will affect all the hirarchical templates below it.
Unless you have explicitly changed them in the font.

You can also change other paragraph templates according to this principle.

And remember not to use any direct formatting in the text.

Templates are storage for styles and initial file content.

Therefore define your styles to use only your preferred fonts. The best organisation is hierarchical dependency of styles.

Base all of them on an “ultimate ancestor”. This role is devoted to Default paragraph Style. This is where you set your defaults. However, some descendants of Default Paragraph Style may get their default font from another source: Tools>Options, LibreOffice Writer>Basic Fonts (Western). These styles are themselves ancestors of sub-hierarchy; so define also their font face. They are:

  • Heading, ancestor of all styles involved in headings and titles
  • Index, ancestor of all styles for TOC, indexes, tables of xxx, …
  • List, ancestor of style families List n and Numbering n
  • Caption, ancestor of the caption styles

If you want to avoid bypass of your customisation through Tools>Options, you must force the font face (and size) in these intermediate styles.

Note: to see the style hierarchy, use the Hierarchical view in the style side pane.

Of course, this does not prevent direct formatting where you can do anything and are not limited by your style set. This is why template-assisted writing should always be undertaken with a strict procedure: you forbid yourself from using anything outside your style set. This means you must think ahead when you design your styles. Remember also you can customise the built-in styles and make them compliant with your scheme. This is even highly recommended because some built-in styles have properties which cannot be granted to full-user styles.

From experience, you need ~40 paragraph styles (including customised built-in ones like Heading n and Contents n, the most important of all being Text Body), 10-20 character styles, a few frame styles, ~5 page styles (including customised built-in ones) and perhaps 1-2 list styles (which are not paragraph styles but formatting of the counter/bullet to associate to a paragraph style).

Among this total, only the paragraph styles should be analysed for font face/size. Don’t change face not font in character styles otherwise you’ll go into trouble one day or another. The exception is Source Text where you set a monospace font face (built without changing font size!).

When you play with hierarchical organisation of styles, pay special attention to the fact that if you don’t touch an attribute, it inherits its value from its ancestor(s). As soon as you modify it, it becomes an “overriding” attribute. Even if you reset it to its previous value, it remains an overriding attribute which no longer inherit from the ancestor. To revert to inheritance, you must press the Standard button which erases all attributes in the displayed tab.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

Thank you for your detailed answer. I guess I will set up a new thoughtful template :slight_smile: