Writer: what is exactly *Default Style* character style?

First, I am perfectly aware thet character style Default Style is a fake style. It is an internal device to reset all attributes to their value defined or inherited in the current paragraph style.

I know also, as a consequence of its definition stated in the previous paragraph, that it can’t be modified or deleted (because it does not exist as an explicit style).

However, I’m wondering if it would make sense to defined character styles derived from Default style so that the variations would be relative to the paragraph style.

Presently, character styles may only be linked with other character styles to define a hierarchy of styles (just like paragraph styles can define a hierarchy with a few “master” styles controlling some aspects of dependent styles, like Heading controls all heading-related style such as Heading n). But this not as useful.

The current implementation of dependency in character styles presents shortcomings.

One of the most bothering of them occurs when mixing different font faces in a paragraph (for example, having a Source Text sequence within a Text Body paragraph). More than often, the x-height of the fonts are not equal and the line looks ugly. To mitigate this effect, the font size in the character style has to be adjusted.

But the character style may be used in different contexts, e.g. in Text Body and Footnote paragraphs where the base font sizes are different. Consequently, the font size adjustment does not fit both cases.

If character styles could be derived from Default Style, one could use %-sizes to specify the adjustment.

My questions are:

  • What in ODF does prevent character styles from being dependent on paragraph styles (through the Default Style character style dependency)?

  • Internally, would any design specification forbid such a cross dependency between style categories?

  • Would such a feature be useful to users?

Note: this is not a feature request (not yet), only an introspection with a call for comments.

Technically, having no parent style for a character style is the same as inheriting from default. And actually, you could create an own actual empty style, and inherit your actual style from it, to have those percent sizes - if that works (can’t test at the moment). But the real issue here is different: that you cannot define e.g. font face without defining a font size, isn’t that? The problem is that as soon as you modify anything on a property page, all settings there are applied. I’d think that something like checkbox next to each setting telling if it’s modified or not would already solve the question?

No, font face, size and weight/angle are independent; My Source Text only defines face. Size is automatically taken from the current value in the paragraph.

You must be very cautious when setting partial attributes in a tab. I usually first Standard so that all attributes are in “neutral form” (inherited). Then I click only on the attributes I want to change. Thus, eventhough a size is shown as selected, as long as I don’t click in the size list, size is not set. That’s tricky because you have no visual feedback about what has been forced and what is not.

I’ll experiment with a duplicate of Default Style and report here.

Does not work: right-click on Default Style and New. This creates a full-fledged character style with no attribute set. If a derive another character style from it and set font size to 200%, the font size is computed from the parent size. Since it was not set, it is taken from Tools>Options, LibreOffice Writer>Basic Fonts (Western), Default. The size is computed at style creation time and remains the same afterwards. This is as per the specification, nothing to complain about.

If I change font size in the paragraph style, the sequence with the character style is not affected.

Conclusion: Default Style is indeed an internal device, not a real style.