Bug 162750 - Formatting: Small-Caps Conflict with Font Ligature Resulting in Hidden Characters
Summary: Formatting: Small-Caps Conflict with Font Ligature Resulting in Hidden Charac...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.8.0 target:25.2.0.0.beta2 t...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Effects
  Show dependency treegraph
 
Reported: 2024-09-02 15:22 UTC by zaakari
Modified: 2024-12-07 19:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example document with error descriptions (19.13 KB, application/vnd.oasis.opendocument.text)
2024-09-02 15:22 UTC, zaakari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zaakari 2024-09-02 15:22:23 UTC
Created attachment 196186 [details]
example document with error descriptions

The font KJV1611 by ctrlcctrlv (downloadable from here: https://github.com/ctrlcctrlv/kjv1611) has quite a few extra features; one of which (standard ligatures) is to automatically small-caps the latter parts of the words "LORD", "GOD" and "JEHOVAH". However, I am noticing in 24.8.0.3, that when typing the word "Lord" and setting the "Font Effects > Effects > Case" for the last three characters to Small capitals, LibreOffice hides the characters--not even giving them any width. The characters are still there as searching for "lord" will still match the word, and the cursor seems to "hang" when moving across them with the arrow keys, indicating that they are indeed still there, just not displayed.

Steps to reproduce:
1 - Download and install the KJV1611 font from https://github.com/ctrlcctrlv/kjv1611
2 - Open the attached example document -> See the issue in the second set.
OR
2 - Switch the font to KJV1611.
3 - Type the word "Lord"
4 - Select the last three characters ("ord") and enable their small-caps font effect.

I assume the reason for this error is that the manual application of the small-caps effect is colliding somehow with the font's feature of automatically applying small-caps to the word "LORD". I'm guessing this would also happen with other fonts, but I don't know of any that have a similar feature to the KJV1611 font.

Possibly Related:
Given ctrlcctrlv's git-hub page, it also seems that the endings of the capitalized words "GOD" and "JEHOVAH" should also automatically be small-capped (like "LORD" is). This is not currently happening, though I don't know if it is related or if it's just a bug with the font (I kind of think they used to work, but I don't remember exactly).

Severity:
For me, this is a big issue (as I have used this font for lots of documents), but I doubt most users would ever notice it, so I just chose minor severity.
Comment 1 zaakari 2024-09-14 12:16:55 UTC
It turns out that setting the font spacing on the small caps "ord" characters to something other than zero (like -0.1), avoids the issue.

I think the reason for this is that setting a custom spacing cancels the font's standard ligature feature--thereby avoiding the collision.

So, not a fix, but a pretty decent work-around.
Comment 2 Buovjaga 2024-11-26 18:14:23 UTC
Bibisected with linux-64-24.8: the issue has two states. The first one manifests so "ord" is visible, but crunched up. This is caused by: 30d376fb7ded4c96c85ad1112a0e44b5929657c9
tdf#61444 Correct Writer text layout across formatting changes

The current state appeared with: ab0a4543cab77ae0c7c0a79feb8aebab71163dd7
tdf#124116 Correct Writer text shaping across formatting changes
Comment 3 Commit Notification 2024-12-05 08:58:02 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dfa81bdb3a7956d631c8ccb1e00166289d37993e

tdf#162750 sw: Fix layout with small caps inside ligatures

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Buovjaga 2024-12-05 12:47:56 UTC
Verified, thanks

Arch Linux 64-bit
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 139bb786bb4fe5cf2554f6016095ff1588f3994f
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 5 December 2024
Comment 5 Commit Notification 2024-12-06 13:05:21 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/e267882ffedd074d6b0308517b88d988e84b82c3

tdf#162750 sw: Fix layout with small caps inside ligatures

It will be available in 25.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-12-07 19:37:59 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/1221b01653240a515fc8a88c70ae2e06fc5ef57b

tdf#162750 sw: Fix layout with small caps inside ligatures

It will be available in 24.8.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.