Ubuntu 18.04 embedded fonts Liberation have corrupted metrics

Bug #1769654 reported by Victor
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
fonts-liberation (Debian)
Fix Released
Unknown
fonts-liberation (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Olivier Tilloy
fonts-liberation2 (Debian)
Fix Released
Unknown
fonts-liberation2 (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Olivier Tilloy
libreoffice (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Olivier Tilloy

Bug Description

[Impact]

fonts-liberation and fonts-liberation2 in bionic have skewed font metrics. This is causing visible formatting issues in any program rendering text using those fonts, most notably libreoffice (recent versions fail to build because some unit tests that check the rendered layout fail).
This was fixed in debian and synced in cosmic (https://salsa.debian.org/fonts-team/fonts-liberation/blob/master/debian/patches/unset_OS2_UseTypoMetrics.patch).

Backporting to bionic is a prerequisite to backporting a recent version of libreoffice (6.0.6, bug #1785679).

[Test Case]

See original description (at the bottom of the description) for example text documents and their expected layout when opened in libreoffice.

A good test case is whether libreoffice 6.0.6 builds successfully (all unit tests pass - some unit tests exercise text layout and they fail with the broken version of fonts-liberation2).

[Regression Potential]

Rendering of text across a variety of programs (especially word processors and web browsers) should be checked to ensure that this doesn't introduce regressions.

[Other Info]

This is backported straight from Debian, no Ubuntu-specific modifications.

[Original description]

Ubuntu/Xubuntu 18.04 package includes fonts "Liberation Sans" (etc "Liberation") with sligtly shrinked font metrics. This issue leads to all office documents typed in Liberation Sans fonts have corrupted formatting in Ubuntu 18.04 (but these documents correctly opened in other OS's, for example Ubuntu 17.10). Documents with corrupted formatting can not print properly: all paragraphs are shifted up, embedded tables in text - splitted on page breaks. Document circulation in system based on Ubuntu 18.04 operating systems temporarily paralized, because Liberation fonts are basic fonts for open-source document circulation.

In attachment I have type a example office document with 2 pages and enumerated strings. On normal ordinary conditions this document have 54 strings on first page and 54 string on second page. But if this document open in Ubuntu 18.04, it's found than 5 strings from second page moves to first page. Compare font versions embedded with Ubuntu packages we can see that versions are different (sudo apr search fonts-liberation* command):

Ubuntu 17.10 - 1:1.07.4-2, 2.00.1-3
Ubuntu 18.04 - 1:1.07.4-5, 2.00.1-5

I have create a bug 117411 "Font metrics slightly changed after update OS to Ubuntu 18.04", see https://bugs.documentfoundation.org/show_bug.cgi?id=117411, but I think that this bug concerns a Ubuntu/Xubuntu 18.04 package.

Revision history for this message
Victor (lantcoder) wrote :
Revision history for this message
Victor (lantcoder) wrote :

Screenshot in Xubuntu 17.10 operatind system, all ok

Revision history for this message
Victor (lantcoder) wrote :

Screenshot in Ubuntu 18.04 of the same document opened with the same versions on libreoffice.
5 lines move up to first page

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Changed in fonts-liberation2 (Debian):
status: Unknown → New
Changed in fonts-liberation (Debian):
status: Unknown → New
Revision history for this message
dino99 (9d9) wrote :
Revision history for this message
dino99 (9d9) wrote :
Changed in fonts-liberation2 (Debian):
status: New → Fix Released
Changed in fonts-liberation (Debian):
status: New → Fix Released
Victor (lantcoder)
tags: added: bionic liberation
Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

I am using LibreOffice-Writer 1:6.0.3-0ubuntu1 on Lubuntu Next 18.04, and found when opening a previously-created document, that the pages did not line up.
Searching for LO-W bugs that referenced line-spacing, eventually led me to the original reporter's bug, and then to the debian bug report that you list in comment #5:
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898116)
where they reported that the bug had been:
"Fixed in version fonts-liberation/1:1.07.4-6"
The version I had was 1:1.07.4-5, just as the original reporter.

So, I snagged the "cosmic" package* (not yet available for "bionic")
and tried it, and it definitely solves my problem.

*see: https://packages.ubuntu.com/cosmic/all/fonts-liberation/download
and (probably) follow the advice at the top: add the deb line to your
repository list (selecting an appropriate URI mirror site for your area).

I suppose that it will be available for bionic, soon, but needed it sooner...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fonts-liberation (Ubuntu):
status: New → Confirmed
Changed in fonts-liberation2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Horst Schirmeier (horst) wrote :

Confirming for Liberation Mono. This just seriously bit me when exchanging LO Impress files with a colleague. (Took me a while to figure out). Temporarily fixed this by installing LO 6.0.4 from libreoffice.org in /opt, which happens to ship its own version of the Liberation fonts.

Revision history for this message
Horst Schirmeier (horst) wrote :

Confirming comment #7's solution: The cosmic version of fonts-liberation (1:1.07.4-7 instead of bionic's 1:1.07.4-5) fixes the issue for me.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Fixed in fonts-liberation (1:1.07.4-7) and fonts-liberation2 (2.00.1-7) in cosmic, needs SRUing to bionic.

Changed in fonts-liberation (Ubuntu):
status: Confirmed → Fix Released
Changed in fonts-liberation2 (Ubuntu):
status: Confirmed → Fix Released
Changed in fonts-liberation2 (Ubuntu Bionic):
assignee: nobody → Olivier Tilloy (osomon)
Changed in fonts-liberation (Ubuntu Bionic):
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon)
description: updated
Changed in fonts-liberation (Ubuntu Bionic):
status: New → In Progress
Changed in fonts-liberation2 (Ubuntu Bionic):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu Bionic):
status: New → Confirmed
Changed in libreoffice (Ubuntu Bionic):
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Victor, or anyone else affected,

Accepted fonts-liberation into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fonts-liberation/1:1.07.4-7ubuntu0.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in fonts-liberation (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Victor, or anyone else affected,

Accepted fonts-liberation2 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fonts-liberation2/2.00.1-7ubuntu0.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in fonts-liberation2 (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Jan-Marek Glogowski (jmglogow) wrote :

Just a FYI: I opened https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907487

That won't result in a different binary package, but from my interpretation it's a bug in the patch.

Revision history for this message
ash (sersorrel) wrote :

The -proposed packages fix text selection for Liberation fonts in Chrome for me.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

@sil2100 , @osomon : Backported packages should not have a higher version than their original source.

2.00.1-7ubuntu0.18.04.1 > 2.00.1-7

This breaks the upgrade path.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

That is true, obvious mistake from my side by not noticing the missing ~ sign on both packages. I will try to resolve this soon.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

@ricotz Thank you for noticing!

Revision history for this message
Olivier Tilloy (osomon) wrote :

I prepared the packages so the mistake is mine, apologies for that, and thanks for fixing it Łukasz.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Victor, or anyone else affected,

Accepted fonts-liberation into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fonts-liberation/1:1.07.4-7~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Victor, or anyone else affected,

Accepted fonts-liberation2 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fonts-liberation2/2.00.1-7~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Olivier Tilloy (osomon) wrote :

Successfully tested fonts-liberation 1:1.07.4-7~18.04.1 and fonts-liberation2 2.00.1-7~18.04.1 against libreoffice 1:6.0.6-0ubuntu0.18.04.1 (in bionic-proposed).

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fonts-liberation - 1:1.07.4-7~18.04.1

---------------
fonts-liberation (1:1.07.4-7~18.04.1) bionic; urgency=medium

  * Backport to bionic to fix skewed font metrics (LP: #1769654)

 -- Olivier Tilloy <email address hidden> Wed, 08 Aug 2018 17:08:50 +0200

Changed in fonts-liberation (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for fonts-liberation has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fonts-liberation2 - 2.00.1-7~18.04.1

---------------
fonts-liberation2 (2.00.1-7~18.04.1) bionic; urgency=medium

  * Backport to bionic to fix skewed font metrics (LP: #1769654)

 -- Olivier Tilloy <email address hidden> Wed, 08 Aug 2018 17:14:31 +0200

Changed in fonts-liberation2 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Olivier Tilloy (osomon) wrote :

Fixed in fonts-liberation and fonts-liberation2, no work needed in libreoffice.

Changed in libreoffice (Ubuntu):
status: Confirmed → Fix Released
Changed in libreoffice (Ubuntu Bionic):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.