Bug 117305 - Adjust caret slope for italic text
Summary: Adjust caret slope for italic text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.6.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 140694 (view as bug list)
Depends on:
Blocks: Text-Cursor
  Show dependency treegraph
 
Reported: 2018-04-28 02:49 UTC by strata_ranger
Modified: 2021-05-28 08:47 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Ambiguous where the cursor actually is when inside italic text (40.35 KB, image/png)
2018-04-28 02:49 UTC, strata_ranger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description strata_ranger 2018-04-28 02:49:47 UTC
Created attachment 141731 [details]
Ambiguous where the cursor actually is when inside italic text

I originally discovered this while working on a composition in Writer 5.3.4.2, but it is still present in 5.4.6.2 and probably applies outside of Writer as well.

When document text is italic, under certain conditions it can become ambiguous where the cursor actually *is* within the text. See attachment for the example that affects me currently -- due to the displayed size of the text here, it is ambiguous whether the cursor is located before or after the space between two words. (For comparison, at a higher zoom level there is absolutely no doubt.)

Although this is literally a cosmetic issue, it's surprisingly intrusive to my workflow -- i.e. every time I move the cursor somewhere and start editing, I belatedly realize the cursor was one character off from "where it should be" and likewise was whatever edit I juts made. I have to stop, go back, and make a fix.

This could be alleviated if the cursor is displayed using the same angle (normal or italic) as the surrounding text.
Comment 1 Dieter 2018-04-28 06:16:15 UTC
I sometimes have the same problems. So I would support your proposal. But let's also ask design-team.
Comment 2 Heiko Tietze 2018-04-28 10:18:52 UTC
Would be really nice. Looking through the web I found GetCaretMetrics() but not a setter method. And nothing similar on Linux. Caloan, any technical showstopper?
Comment 3 Caolán McNamara 2018-04-28 16:41:53 UTC
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hhea.html documents that there is a Truetype feature in the hhea table caretSlopeRise, caretSlopeRun, caretOffset (and italicAngle in the post table) Checking Caladea-Italic as a random italic font I see it has these values set, so it looks like we could pull the correct slant to use for the cursor out of the font directly (like we do for ascent/descent). Looks initially plausible that we could do something like this.
Comment 5 Adolfo Jayme Barrientos 2021-05-28 08:47:34 UTC
*** Bug 140694 has been marked as a duplicate of this bug. ***