Bug 146439 - Enabling italic causes a wiggle at different zoomlevels
Summary: Enabling italic causes a wiggle at different zoomlevels
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
: 146879 (view as bug list)
Depends on:
Blocks: Kerning
  Show dependency treegraph
 
Reported: 2021-12-27 18:51 UTC by Telesto
Modified: 2023-10-13 06:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.36 KB, application/vnd.oasis.opendocument.text)
2021-12-27 18:53 UTC, Telesto
Details
Screencast (1.04 MB, video/mp4)
2022-01-14 21:32 UTC, Telesto
Details
Example file 2 (variant with kerning and right outlining) (10.03 KB, application/vnd.oasis.opendocument.text)
2022-01-14 21:42 UTC, Telesto
Details
Screencast (1.73 MB, video/mp4)
2022-01-14 21:43 UTC, Telesto
Details
Screencast (713.45 KB, video/mp4)
2022-01-14 22:13 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-12-27 18:51:20 UTC
Description:
Enabling underline/italic causes a wiggle at different zoomlevels

Steps to Reproduce:
1. Open the attached file
2. Double click pressing
3. Press CTRL+I

Zoom 100/110/130/160

Actual Results:
Wiggle of himself

Expected Results:
Stable


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in master

and in
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 587c530d13a5427ea6610d68d3db3fde27f50725
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL

and in
4.4.7.2

and in
Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)

and in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 Telesto 2021-12-27 18:53:00 UTC
Created attachment 177159 [details]
Example file
Comment 2 Telesto 2021-12-27 19:12:35 UTC
1. Open the attached file
2. Double click pressing
3. Press CTRL+I
4. CTRL+Z
5. CTRL+Y (and go on with the CTRL+Z/Y dance)


Tried every glyph positioning in Tools -> Writer -> View kerning. It's never good


ClassicInspired is pretty stable. But if you turn on Formatting marks you can notice wiggling on any zoomlevel. Font start to move at 160%

Also found in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

FWIW ClassicInspired is currently my favorite, based on how kerning looks. But kerning quality is really depending on zoomlevel. 

The part I'm less getting is how 'zoom' works. It apparently triggers a full re-rendering of all glyphs. I would sometimes think why not simple scale full canvas, instead of re-rending the glyphs. But what do I know about glyphs, zoom & canvas..
Comment 3 Telesto 2021-12-28 13:14:12 UTC
Also in OpenOffice 2.2.0
Comment 4 Ezinne 2021-12-30 16:20:04 UTC
Reproducible in:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 9e8c1da64fa8a520730ce0aea0f7199cd75c892f
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Telesto 2022-01-01 15:57:57 UTC
FWIW
This does also occur in comment box and textbox however zoom-level to trigger does variate a little
Comment 6 Caolán McNamara 2022-01-14 16:06:49 UTC
Turning on italic/non-italic means you really get a different font, the one from file LiberationSerif-Italic.ttf instead of LiberationSerif-Regular.ttf for regular. So if the problem is only (when view formatting marks is enabled) that the paragraph marker moves in and out between italic/regular because the regular version is wider than the italic then I think that's ok and there's nothing that needs to be done.

If there's poor positioning of glyphs within the run of text, see if  tools, options, writer, view, "Layout & Match Render" makes an improvement.
Comment 7 Telesto 2022-01-14 21:32:44 UTC
Created attachment 177554 [details]
Screencast

There is surely an improvement: No dancing glyphs within the word 'himself'

The whole word 'himself' does wiggle depending on zoom-level (like 90% 140% or 180%). There are stable situations; for me 100% 110%/160%) Sometimes the formatting marks indicator wiggles (120%) with Liberation Serif, 12 pt

Calibri has more of the wiggling with formatting mark indicator (180% and 200%) at 12 pt

The behaviour appears to depend on mixture of zoomlevel + fontsize or character spacing an zoom-level.

I'm not really against something shifting when pressing Italic, but it's more the seemingly irregular pattern. 

But maybe I'm nitpicking.
Comment 8 Telesto 2022-01-14 21:42:01 UTC
Created attachment 177555 [details]
Example file 2 (variant with kerning and right outlining)
Comment 9 Telesto 2022-01-14 21:43:21 UTC
Created attachment 177556 [details]
Screencast

Screencast for example 2
Comment 10 Telesto 2022-01-14 22:13:56 UTC
Created attachment 177557 [details]
Screencast

Fine with STR of comment 0

In the screencast slightly different variant. Where kerning of certain glyphs apparently slightly affected when typing if content is aligned right.

FWIW, don't get me wrong.. results are impressive :-) and all the efforts appreciated! 

I see it as my 'job' to 'stress test' rendering in attempt to find 'flaws' and report those :-). So raising awareness of the existence. But maybe it's minor enough to skip. 

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 45dee329c30f5548b0ba57cc1457c73f2fc870a3
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 11 Caolán McNamara 2022-01-15 21:46:41 UTC
In comment #9 if the text is explicitly split into two runs, by selecting the space and the following text "himself" and clicking "Russian" in the statusbar and picking another language for the text; then the text will be laid out and rendered as two separate runs. Then this right aligned case is stable when the "pressing" has its font changed.

So the issue is that the starting point that the 2nd run of text is rendered at is different to what the glyph position that the space before h is set to when it's just one run of text. Let me try something there.
Comment 12 Commit Notification 2022-01-16 11:23:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#146439 retain precise base start pos when using ResolutionIndependentLayout

It will be available in 7.4.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 13 Caolán McNamara 2022-01-18 21:01:18 UTC
If we're agreed that the right aligned case is stable wrt the positioning of the right edge of the text against the right border then I'd call this fixed. The other case involves changes the underlying font which can have "real" width changes (and/or splitting a run which is back to the tdf#146453 comment #13 case)
Comment 14 Telesto 2022-01-18 21:53:24 UTC
(In reply to Caolán McNamara from comment #13)
The initial problem is fixed.. so it should be marked as fixed anyhow :-).
Comment 15 Caolán McNamara 2022-01-19 08:55:52 UTC
ok, lets do that then
Comment 16 Stéphane Guillou (stragu) 2023-10-13 06:23:17 UTC
*** Bug 146879 has been marked as a duplicate of this bug. ***