Ask Your Question
1

Which font does Writer use when the selected one is missing?

asked 2018-05-08 17:41:19 +0200

Usserr gravatar image

updated 2018-05-08 20:35:32 +0200

ajlittoz gravatar image

As a year-long user of M$ Word, I'm used to the fonts Calibri and Cambria - the former for documents' content and the latter for titles. However, in LibreOffice on OpenSuSE Leap 42.3, I don't have them. Nonetheless, despite the default font being Liberation Serif, when I type Calibri in the Font field, my text turns to something that looks much better. It's another sans serif font, of which I don't know the name, because the word Calibri remains up in the Font field. So it seems like LibreOffice knows that Calibri is a sans-serif font, and defaults to a different sans-serif one. My question is, how can I check which font it is?

On the other hand, when I type Cambria, there comes something that looks nothing like it, but I guess I will have to install some extra fonts and go through them in order to find a replacement.

EDIT (ajlittoz)

Follow-on question for you wise developers who happen to read these Q&A

Where is located the substitution rule for Calibri and Cambria? Is it hard-coded in the source? Is it hidden in the advanced configuration? Are there other rules for yet other fonts?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-05-08 18:43:38 +0200

ajlittoz gravatar image

updated 2018-05-08 18:47:51 +0200

From experimenting and comparison, it looks like Carlito is substituted for Calibri and Caladea for Cambria.

After that, I looked in Wikipedia (Crosscore fonts) which confirmed my observation.

If this answer helped you, please accept it by clicking the check mark ✔ to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

edit flag offensive delete link more
0

answered 2018-05-09 01:51:06 +0200

LibreTraining gravatar image

updated 2018-06-12 21:50:44 +0200

The only way to check which font has been substituted is to export to PDF, and look at the fonts.
Beyond stupid ... sigh ... I need to move on now ...

Where is located the substitution rule for Calibri and Cambria? Is it hard-coded in the source? Is it hidden in the advanced configuration? Are there other rules for yet other fonts?

UPDATE (2018-06-12)
Found the font substitutions in the Advanced Settings.
Search for "FontSubstitutions" Then find your language code.
You will then see the substitutions for various styles and uses.


Yes, there are rules for many different fonts.
Where are the substitution rules located? See the following ...

I have LO 6.0.3.2 running on Windows 7 x64.
The font substitution rules are located in the following file:
C:\Program Files\LibreOffice\share\registry\main.xcd
That is a compacted XML file which is huge, but only 284 lines long.
It is not human-readable in that format.

Use a code editor to PrettyPrint format the XML to make it easy to read.
Notepad++ (FOSS) has an XML Tools plug-in which will do this.
I used UltraEdit. Any code editor will do.
After formatting the file is now 52,853 lines long.

Search for "FontSubstitutions"
Line 41937 looks like this: <node oor:name="FontSubstitutions">
That line starts the Font Substitutions section.
Just look for Calibri (line 42593) and Cambria (line 42612).

calibri > carlito
cambria > caladea

Font Replacement Table
You can specify the replacements for any font in the Font Replacement Table.
Press Alt+F12 to open Options.
Then go to: LibreOffice > Fonts
Read the Help 3-4 times and it will make sense.

edit flag offensive delete link more

Comments

Thanks. I already use the Font Replacement Table. I assume it takes precedence over the buit-in rules.

For information, in Fedora, file is located in /usr/lib64/libreoffice/share/registry/main.xcd

Since it has strong influence on final result, is there a handy way to display the rules so that we are not surprised? In some collaborative situations, it may be necessary to use locally unavailable fonts but we need be warned about metrics diferences.

ajlittoz gravatar imageajlittoz ( 2018-05-09 08:18:04 +0200 )edit

Yes, the Font Replacement Table takes precedence over the hidden default rules.
Thanks for the Fedora file location. Will add it to the LO Fonts Guide I am working on.
No, there is no easy way to display the rules. That is really dumb.
You are right this affects users everyday, causes annoying issues, and it is a black hole to users.
How does anyone even know if the rules are actually working as expected?
I plan on adding a summary to the Fonts Guide.
Diff. warnings? You're funny.

LibreTraining gravatar imageLibreTraining ( 2018-05-09 20:12:45 +0200 )edit

Diff warning: I just meant some caveat somewhere (in your Fonts Guide?) to draw attention of casual user about potential unexpected results (supposing casual reads manuals, which I doubt often considering the depth of many questions here).

ajlittoz gravatar imageajlittoz ( 2018-05-09 22:40:28 +0200 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2018-05-08 17:41:19 +0200

Seen: 108 times

Last updated: Jun 12