Created attachment 140711 [details] Bugdoc When using the font DIN Light, the font height is calculated too small. See attachment. This worked fine in LO 5.2, regression since 5.3 (on Windows). On Linux this is wrong at least since 5.0. You can download the affected font "Din Light" from here: https://www.dafontfree.net/freefonts-din-f59477.htm
Created attachment 140712 [details] Incorrect line height (LO 5.3)
Created attachment 140713 [details] Correct line height (LO 5.2)
MS Office 2013 & 2016 do display this correctly (as it was in LO 5.2).
Regression from bug 55469 (commit 34d7602954d4483b3bc9db700e7df2c15348947a )
Not a regression. The font metrics are odd; bad font metrics ≈ bad results.
(In reply to V Stuart Foote from comment #5) > Not a regression. The font metrics are odd; bad font metrics ≈ bad results. What is wrong with the font metrics?
Works fine on LO 6.0.2.1. Installed the font. Used your bug doc. Applied the font to the text. Looks fine.
(In reply to LibreTraining from comment #6) > (In reply to V Stuart Foote from comment #5) > > Not a regression. The font metrics are odd; bad font metrics ≈ bad results. > > What is wrong with the font metrics? See the screenshots. The font is not vertically centered in a table as it was before.
If this is specific to this (I guess commercial) font, than that should be in the title.
no repro with Version: 6.1.0.0.alpha0+ Build ID: 3102b8c8b52845ca4584579a7ad2154488943855 CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: x11;
(In reply to raal from comment #10) > no repro with Version: 6.1.0.0.alpha0+ > Build ID: 3102b8c8b52845ca4584579a7ad2154488943855 > CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: x11; Did you install the font with the filename "din-light.ttf"? I still see the issue with master from today: Version: 6.1.0.0.alpha0+ Build-ID: eb5976d3fbed81789df2131434272b56ec6cd44e CPU-Threads: 8; Betriebssystem:Linux 4.13; UI-Render: Standard; VCL: x11;
For reference, this is (was) my attempt to fix this: https://gerrit.libreoffice.org/#/c/51782/
Difference in LibreOffice font table parser vs. the Windows GDI one - not a good thing. Perhaps related: bug 117411
(In reply to Samuel Mehrbrodt (CIB) from comment #4) > Regression from bug 55469 (commit 34d7602954d4483b3bc9db700e7df2c15348947a ) Adding the keywords accordingly.
(In reply to Samuel Mehrbrodt (CIB) from comment #8) > (In reply to LibreTraining from comment #6) > > (In reply to V Stuart Foote from comment #5) > > > Not a regression. The font metrics are odd; bad font metrics ≈ bad results. > > > > What is wrong with the font metrics? > > See the screenshots. The font is not vertically centered in a table as it > was before. The difference in how it looks is obvious. Duh. But that was not the question. It was stated that the font metrics are bad. So I asked what is supposedly wrong with the metric settings within that font file. It would be nice to specifically identify and document issues which may be present in other fonts users may use in LibreOffice. Based on the follow-up comments it appers the issue is not the font metrics.
As a test, I’ve dropped that (pirated copy) font into FontBakery’s checker. It returned, e.g., > com.google.fonts/check/042 Checking OS/2 Metrics match hhea Metrics. > FAIL OS/2 sTypoAscender and hhea ascent must be equal > com.google.fonts/check/041 Checking Vertical Metric Linegaps. > WARN OS/2 sTypoLineGap is not equal to 0. There you go, the font is buggy.
(In reply to Adolfo Jayme from comment #16) > There you go, the font is buggy. As we do for other broken stuff (Office, documents, APIs), we tend to work around things if it benefits our users. My yardstick is: this worked before on Windows, now it broke - and there's a fix. :)
(In reply to Samuel Mehrbrodt (CIB) from comment #0) > You can download the affected font "Din Light" from here: > https://www.dafontfree.net/freefonts-din-f59477.htm Obviously this isn't the right version to test, as it identifies itself as "DIN" in the font name box (only the Character dialog shows "Light" in the style list box). So by default the bugdoc uses some fallback font. And if then I select the text and manually apply the "DIN" font (or by using the font replacement table), the text remains vertically centered. Also, searching the net for "din-light.ttf", revealed several other variations with different file sizes. Some of them listed as "DIN Light" but don't show the bug, and one (of 62.5 KB) that shows the bug in *both* LO and Word 2016 (except that in Word it's listed as "DIN-Light" instead of "DIN Light").
(In reply to Maxim Monastirsky from comment #18) > (In reply to Samuel Mehrbrodt (CIB) from comment #0) > > You can download the affected font "Din Light" from here: > > https://www.dafontfree.net/freefonts-din-f59477.htm > Obviously this isn't the right version to test, as it identifies itself as > "DIN" in the font name box (only the Character dialog shows "Light" in the > style list box). So by default the bugdoc uses some fallback font. And if > then I select the text and manually apply the "DIN" font (or by using the > font replacement table), the text remains vertically centered. > > Also, searching the net for "din-light.ttf", revealed several other > variations with different file sizes. Some of them listed as "DIN Light" but > don't show the bug, and one (of 62.5 KB) that shows the bug in *both* LO and > Word 2016 (except that in Word it's listed as "DIN-Light" instead of "DIN > Light"). Ah so I didn't know there were different versions out there, attaching the affected version now.
Created attachment 141994 [details] din-light.ttf
The content of attachment 141994 [details] has been deleted for the following reason: Unclear provenance
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f529db909f99a2a503ca0347a9d70742b7f05ba tdf#116498 Use win metrics for 'DIN Light' font It will be available in 6.2.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.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d71eb1e4476d7abfe25306338527a359cd22ba09&h=libreoffice-6-1 tdf#116498 Use win metrics for 'DIN Light' font It will be available in 6.1.0.1. 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.
Verified in Version: 6.1.0.0.beta1+ Build ID: 2a0d8106a558845357d39648656e08ec6f091cf8 CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded @Samuel, Thanks for fixing this!!