Bug 107249 - Rendering of system font vertically cramped or cropped in dialog labels and controls in 5.3+
Summary: Rendering of system font vertically cramped or cropped in dialog labels and c...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.0 target:5.4.2 target:5.3.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Rendering Dialog Regressions-Universal-Line-Spacing
  Show dependency treegraph
 
Reported: 2017-04-18 19:16 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-10-02 17:33 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
5.2 vs 5.4 (36.33 KB, image/png)
2017-04-18 21:48 UTC, Yousuf Philips (jay) (retired)
Details
cramped text on ubuntu mate 16.04 (81.53 KB, image/png)
2017-04-18 23:01 UTC, Yousuf Philips (jay) (retired)
Details
5.3 vs. 5.4 (27.64 KB, image/png)
2017-04-19 20:02 UTC, Heiko Tietze
Details
5.2 gtk2 vs 5.4 gtk3 (56.39 KB, image/png)
2017-04-28 12:00 UTC, Yousuf Philips (jay) (retired)
Details
5.2.7.2 vs. 5.4 (31.04 KB, image/png)
2017-04-28 12:13 UTC, Heiko Tietze
Details
Heiko's screenshot aligned properly (26.56 KB, image/png)
2017-04-28 13:11 UTC, Yousuf Philips (jay) (retired)
Details
cropped labels (43.74 KB, image/png)
2017-05-08 16:09 UTC, Yousuf Philips (jay) (retired)
Details
5.2 vs 5.4 mac (116.31 KB, image/jpeg)
2017-06-05 22:08 UTC, Telesto
Details
5.2 vs 5.4 mac (116.31 KB, image/jpeg)
2017-06-05 22:09 UTC, Telesto
Details
comparison Libreoffice 4.4 and LibreOffice 6.0 (Linux/gen) (39.33 KB, image/png)
2017-08-21 17:34 UTC, Xisco Faulí
Details
comparison Libreoffice 4.4 and LibreOffice 6.0 (win) (39.47 KB, image/png)
2017-08-21 17:35 UTC, Xisco Faulí
Details
tools -> options dialog better line spacing master > 20170906 (22.54 KB, image/png)
2017-09-06 13:25 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-04-18 19:16:55 UTC
Steps:
1) Open LO
2) Tools > Options or Tools > Customize > Menus > Menu Content
3) See cramped text in the tree view or listbox

Version: 5.4.0.0.alpha0+
Build ID: 04edc5c796c1b96e5228d0c1fcf73bcf52465b66
CPU threads: 2; OS: Linux 3.19; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-15_03:25:45
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-04-18 19:26:34 UTC
Could you please attach a screenshot ?
Comment 2 Yousuf Philips (jay) (retired) 2017-04-18 21:48:12 UTC
Created attachment 132669 [details]
5.2 vs 5.4
Comment 3 ⁨خالد حسني⁩ 2017-04-18 22:15:43 UTC
Not a HarfBuzz issue. That is related to the new line spacing strategy which is more faithful to the font and more spec complaint. If the font has narrow line spacing then because it was built that way.
Comment 4 ⁨خالد حسني⁩ 2017-04-18 22:16:21 UTC
What is your UI font?
Comment 5 Yousuf Philips (jay) (retired) 2017-04-18 23:00:25 UTC
(In reply to Khaled Hosny from comment #4)
> What is your UI font?

Noto Sans on Linux Mint 17.3 Mate. It looks even worse on my Ubuntu Mate 16.04 installation which uses Ubuntu font.
Comment 6 Yousuf Philips (jay) (retired) 2017-04-18 23:01:20 UTC
Created attachment 132670 [details]
cramped text on ubuntu mate 16.04
Comment 7 ⁨خالد حسني⁩ 2017-04-18 23:54:01 UTC
Hmm, the fonts look fine (at least the versions of the fonts I have here). Do you get the same tight spacing if you use the fonts in Writer documents?
Comment 8 Yousuf Philips (jay) (retired) 2017-04-19 00:42:41 UTC
(In reply to Khaled Hosny from comment #7)
> Hmm, the fonts look fine (at least the versions of the fonts I have here).
> Do you get the same tight spacing if you use the fonts in Writer documents?

The only time i notice this issue is in dialogs.
Comment 9 ⁨خالد حسني⁩ 2017-04-19 10:56:22 UTC
(In reply to Yousuf Philips (jay) from comment #8)
> (In reply to Khaled Hosny from comment #7)
> > Hmm, the fonts look fine (at least the versions of the fonts I have here).
> > Do you get the same tight spacing if you use the fonts in Writer documents?
> 
> The only time i notice this issue is in dialogs.

No idea what is going on then; a line spacing change should show up everywhere.
Comment 10 Yousuf Philips (jay) (retired) 2017-04-19 19:02:04 UTC
(In reply to Khaled Hosny from comment #9)
> No idea what is going on then; a line spacing change should show up
> everywhere.

The system font isnt used within my documents, its is in widget controls.
Comment 11 Heiko Tietze 2017-04-19 20:02:27 UTC
Created attachment 132698 [details]
5.3 vs. 5.4

background:
Version: 5.3.2.2
Build ID: 5.3.2-1
CPU Threads: 8; OS Version: Linux 4.10; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group

foreground:
Version: 5.4.0.0.alpha0+
Build ID: 80be4d22afd99c72ea6887e3f2dac86f5e80f75c
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group

LXQt/Kwin/Breeze/Noto Sans
Comment 12 Buovjaga 2017-04-27 17:36:27 UTC
GTK2 only?
Comment 13 Yousuf Philips (jay) (retired) 2017-04-28 12:00:52 UTC
Is anyone running Ubuntu or one of its derivatives to test this on?
Comment 14 Yousuf Philips (jay) (retired) 2017-04-28 12:00:59 UTC
Created attachment 132931 [details]
5.2 gtk2 vs 5.4 gtk3

(In reply to Buovjaga from comment #12)
> GTK2 only?

GTK3 as well.
Comment 15 Cor Nouws 2017-04-28 12:06:45 UTC
I see the same difference comparing e.g. 4.4.7 and Version: 5.4.0.0.alpha0+
Build ID: 74ccd02eda2d6325a27266fd935aba29b3d75020
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-27_23:51:14
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 16 Heiko Tietze 2017-04-28 12:13:08 UTC
Created attachment 132932 [details]
5.2.7.2 vs. 5.4

Old version in the background / left, master in front at right
Comment 17 Cor Nouws 2017-04-28 13:01:27 UTC
(In reply to Cor Nouws from comment #15)
> I see the same difference comparing e.g. 4.4.7 and Version: 5.4.0.0.alpha0+
> Build ID: 74ccd02eda2d6325a27266fd935aba29b3d75020
> CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
> TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
> 2017-04-27_23:51:14
> Locale: nl-NL (nl_NL.UTF-8); Calc: group

Using Ubuntu 17.04
Comment 18 Yousuf Philips (jay) (retired) 2017-04-28 13:11:30 UTC
Created attachment 132936 [details]
Heiko's screenshot aligned properly

(In reply to Heiko Tietze from comment #16)
> Created attachment 132932 [details]
> 5.2.7.2 vs. 5.4

So i lined things up better in your screenshot and the issue isnt showing up in your system. The first 6 child entries only need to be compared as 'Colors' and 'Online Update' arent in the list in 5.4.
Comment 19 raal 2017-05-04 17:49:04 UTC
bisected:
author	Khaled Hosny <khaledhosny@eglug.org>	2016-11-09 13:22:43 (GMT)
committer	Khaled Hosny <khaledhosny@eglug.org>	2016-11-22 15:32:11 (GMT)
commit 34d7602954d4483b3bc9db700e7df2c15348947a (patch)
tree 8dcfb93fc29815fd89481a7840d64d6c187534db
parent c855aec445628f96d3d32cfde6efd4e51e4489c9 (diff)
tdf#55469 Consistent line spacing across platforms
Comment 20 Yousuf Philips (jay) (retired) 2017-05-08 16:09:54 UTC
Created attachment 133161 [details]
cropped labels

So the issue also affects dialog labels
Comment 21 Yousuf Philips (jay) (retired) 2017-06-04 14:01:48 UTC
@Alex, @Steve, @Telesto: Can either of you guys confirm this on Mac?
Comment 22 Telesto 2017-06-05 15:30:09 UTC Comment hidden (obsolete)
Comment 23 Yousuf Philips (jay) (retired) 2017-06-05 21:46:06 UTC
(In reply to Telesto from comment #22)
> I don't see any difference between 5.4 and older versions (on Mac &
> Windows). It always looked cramped.

Can you give a screenshot of 5.2 vs 5.4 for the options dialog on Mac.
Comment 24 Telesto 2017-06-05 22:08:30 UTC Comment hidden (obsolete)
Comment 25 Telesto 2017-06-05 22:09:48 UTC
Created attachment 133870 [details]
5.2 vs 5.4 mac

I was wrong; there is a difference between 5.2 and 5.4. Sorry for the inconvenience
Comment 26 Volga 2017-06-24 04:54:56 UTC
This bug would also making conveniences for Windows touch screen devices, especially Surface.
Comment 27 Dale 2017-06-26 05:08:07 UTC
See my Bug 108710 for Writer - which I suspect is a directly related problem.
In Writer I observed a significant line spacing reduction from version 5.3 
BUT ONLY when in Web View.
Also the line spacing there changes significantly as the zoom is changed. 100% seems to have the smallest line spacing.
Comment 28 Xisco Faulí 2017-08-21 17:34:41 UTC
Created attachment 135709 [details]
comparison Libreoffice 4.4 and LibreOffice 6.0 (Linux/gen)
Comment 29 Xisco Faulí 2017-08-21 17:35:13 UTC
Created attachment 135710 [details]
comparison Libreoffice 4.4 and LibreOffice 6.0 (win)
Comment 30 Caolán McNamara 2017-09-05 11:39:10 UTC
https://gerrit.libreoffice.org/#/c/41933/ makes this problem better as far as I can see
Comment 31 Commit Notification 2017-09-05 13:05:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e2159061db8e266a3fe9f31773c676887168b254

Resolves: tdf#107249 round ascent/descent/extleading on conversion to int

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 32 V Stuart Foote 2017-09-05 13:43:53 UTC
(In reply to Caolán McNamara from comment #30)
> https://gerrit.libreoffice.org/#/c/41933/ makes this problem better as far
> as I can see

Cool now protecting ascent/descent from truncation of the "external leading" by taking it explicitly through round().

But does the mnHeight need to be similar? Is the mnHeight at line 448 for calculating the "internal leading" (mnIntLeading) unrounded and also unscaled?

And down the road, does all this integer font sizing get dropped when bug 103322 gets some attention?
Comment 33 V Stuart Foote 2017-09-05 13:46:22 UTC
(In reply to V Stuart Foote from comment #32)

> Cool now protecting ascent/descent from truncation of the "external leading"
> by taking it explicitly through round().
> 
 through round() after scaling as float
Comment 34 Commit Notification 2017-09-05 14:17:54 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93786f7c79b3ae61feed42d397cbbdbd8107d152

Revert "Resolves: tdf#107249 round ascent/descent/extleading on conversion to int"

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 35 Commit Notification 2017-09-05 18:38:26 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0c8b749e602b6743857a9bc4efb24b6183690311

Resolves: tdf#107249 round ascent/descent/extleading on conversion to int

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 36 Aron Budea 2017-09-05 19:50:45 UTC
Thanks, Caolán!
Comment 37 Commit Notification 2017-09-05 23:27:13 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60eed46d4b24b9b9eaa1ebd0a8f185900176aed5&h=libreoffice-5-4

Resolves: tdf#107249 round ascent/descent/extleading on conversion to int

It will be available in 5.4.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 38 Commit Notification 2017-09-05 23:30:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e0ea7df25faeaae9f98ebde32f49eec92603d629&h=libreoffice-5-3

Resolves: tdf#107249 round ascent/descent/extleading on conversion to int

It will be available in 5.3.7.

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

Affected users are encouraged to test the fix and report feedback.
Comment 39 V Stuart Foote 2017-09-06 13:25:19 UTC
Created attachment 136061 [details]
tools -> options dialog better line spacing master > 20170906