Bug 1526510 - USE_TYPO_METRICS set in Fedora 2X but not set in RHEL7 or in ttf binary release
Summary: USE_TYPO_METRICS set in Fedora 2X but not set in RHEL7 or in ttf binary release
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: liberation-fonts
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-15 16:49 UTC by Caolan McNamara
Modified: 2017-12-28 02:52 UTC (History)
13 users (show)

Fixed In Version: liberation-fonts-1.07.4-10.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-28 02:52:19 UTC
Type: Bug


Attachments (Terms of Use)
fontforge os/2 metric table on Fedora for Liberation Serif Regular (61.58 KB, image/png)
2017-12-15 16:49 UTC, Caolan McNamara
no flags Details
same font, built on RHEL-7 without the bit set (61.35 KB, image/png)
2017-12-15 16:50 UTC, Caolan McNamara
no flags Details


Links
System ID Priority Status Summary Last Updated
Document Foundation 114434 None None None 2017-12-15 16:49:28 UTC

Description Caolan McNamara 2017-12-15 16:49:28 UTC
Created attachment 1368567 [details]
fontforge os/2 metric table on Fedora for Liberation Serif Regular

Description of problem:

The USE_TYPO_METRICS fsSelection bit (https://www.microsoft.com/typography/otspec/os2.htm#fss) is set in Liberation Serif Regular (probably all of them) under Fedora >= 25 but is *not* set in the RHEL versions or in the binary releases available at http://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-1.07.4.tar.gz

Version-Release number of selected component (if applicable):
liberation-fonts-1.07.4-9.fc27

How reproducible:
100%

Steps to Reproduce:
1. (In Fedora) fontforge LiberationSerif-Regular.ttf
2. element->font info->os/2->metrics
3. Example "Really use typo metrics"

Actual results:
its on


Expected results:
its off

Additional info:
If I rebuild the fedora rawhide package on fedora I get the bit set, if I rebuild under RHEL7 I get the bit set, so the build environment/tools matter in terms of the results

I think we want this bit off in fedora to match what we have in RHEL and in the binary releases and what I see in Arimo and Times New Roman (probably best to confirm that independently)

This matters in that in recent LibreOffice if that bit is on we use the typo metrics while if its off we use the hhea metrics and for Liberation Serif they are different enough to mangle starmath equations as per the linked bug

Comment 1 Caolan McNamara 2017-12-15 16:50:08 UTC
Created attachment 1368568 [details]
same font, built on RHEL-7 without the bit set

Comment 2 Pravin Satpute 2017-12-15 17:50:10 UTC
We are planning to rename liberation-fonts-1.07.4-9.fc27  as liberation-classic-fonts.

So i think this patch should go in https://pagure.io/liberation-classic-fonts. 

May be need to check for liberation-fonts-2.00.1 as well for this.

Comment 7 Caolan McNamara 2017-12-18 11:21:18 UTC
Copy the RHEL-7 LiberationSerif-Regular.ttf to a fedora >= F25 box and open it with fontforge on that platform and the flag will be shown as unset. Using the same Fedora fontforge on the Fedora LiberationSerif-Regular.ttf will show that the flag is set in the Fedora version.

Yes, the RHEL-7 fontforge appears to claims that the bit is set, but with a hexeditor/hexdump it can be verified that the bit is not set in the RHEL LiberationSerif-Regular.ttf and is set in the Fedora LiberationSerif-Regular.ttf

i.e. the RHEL fontforge is telling fibs and the Fedora one is telling the truth.

I assume its probably a bug in RHEL-7 fontforge that OS2_UseTypoMetrics doesn't seem to set the right bit in the .ttf when the sfd is converted to ttf, and probably the same bug that the ui claims that the .ttf does have the bit set.

So I guess OS2_UseTypoMetrics handling got fixed at some point, so the bit started getting set correctly in Fedora with more recent fontforge, and I think that the (accidental) lack of the bit in RHEL (and the binary .ttf releases) matches by chance the desired state the fonts should be in

Comment 8 Caolan McNamara 2017-12-18 11:31:55 UTC
maybe something like https://github.com/fontforge/fontforge/commit/e870019c2602d50eb00793e979f3e11bcc71d6cf

Comment 9 Parag Nemade 2017-12-18 14:33:04 UTC
Thank you Caolan for your brief reply.

I have now generated scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=23779983 for Fedora.

If anyone want to test it please test them, I will push the fix into the f27+ releases in next 2 days.

Comment 10 Fedora Update System 2017-12-20 13:56:40 UTC
liberation-fonts-1.07.4-10.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-551b13319e

Comment 11 Fedora Update System 2017-12-21 20:25:54 UTC
liberation-fonts-1.07.4-10.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-551b13319e

Comment 12 Fedora Update System 2017-12-28 02:52:19 UTC
liberation-fonts-1.07.4-10.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.