When writing a word in Writer and changing the background of a part of that word the font renders differently.
Steps to Reproduce:
1. Write the word "Von" using the font "Liberation Serif"
2. Change the background color of "on" to some color
3. Now the kerning does not work anymore.
The letter "o" stands apart from the "V".
The Kerning between the letters "V" and "o" should still be adjusted for a visually pleasing result.
User Profile Reset: No
Created attachment 150305 [details]
Example of missing Kerning
In the attachment you can see what happens after taking the steps.
I confirm it with
Version: 184.108.40.206 (x64)
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win;
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Correction of step 2:
choose a highlight color for "on" (not background color)
This is not a bug. When you select text from a span and apply direct formatting, or equally a style (e.g. emphasis), you are breaking the text span.
Formatting/kerning drawn from font metrics is not expected to apply in that use case--nor can it.
Here is a clip from a Flat ODT, showing the span with direct formatting or style applied.
<text:p text:style-name="P1"><text:span text:style-name="T3">V</text:span><text:span text:style-name="T4">on</text:span> <text:span text:style-name="T3">V</text:span><text:span text:style-name="Emphasis"><text:span text:style-name="T3">on</text:span></text:span> <text:span text:style-name="T3">Von</text:span></text:p>
Possible enhancment for typographic support, but IMHO not worth the dev effort to implement what would be needed to apply different formatting/style within a string.
Created attachment 150325 [details]
spans with DF, style, and with kerning
the document page for the XML snippet.
The Emphasis style was changed from italic but a yellow highlight added to match the Direct Formatting's yellow highlight.
Point being the text span will always be broken--kerning can't be applied.
That is actually a bug. There is a number of formatting changes that shouldn’t break layout, color (foreground and background) is one of them. However, it is a known limitation of current LibreOffice code and I don’t think anyone is working on it. It is possibly a MS Office-compatibility issue as well, since it gets this right.
*** This bug has been marked as a duplicate of bug 61444 ***
I understand that kerning between two different font styles will not work as there are two different fonts in most cases and there is no character based kerning mapping between fonts.
I found out about that bug as I was reading a bigger document and wanted to highlight some things and suddenly the whole document relayouted itself. Paragraphs broke at different positions, whole tables moved to other pages, and so on.
It did not found bug 61444 before which formulates the same issue in a more general way. Now that I know about it I am a bit shocked about the fact that it was already reported six years ago.