Bug 107250 - Kerning pairs from font are applied even when pair kerning is disabled
Summary: Kerning pairs from font are applied even when pair kerning is disabled
Status: RESOLVED DUPLICATE of bug 118221
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-04-18 20:30 UTC by Cody Boisclair
Modified: 2018-06-26 18:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer document demonstrating the issue (9.89 KB, application/vnd.oasis.opendocument.text)
2017-04-18 20:32 UTC, Cody Boisclair
Details
Calc document demonstrating the issue (9.16 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-18 20:33 UTC, Cody Boisclair
Details
Screencap of Writer test case on MacOS (66.81 KB, image/png)
2017-04-18 20:36 UTC, Cody Boisclair
Details
Screencap of Calc test case on MacOS (20.60 KB, image/png)
2017-04-18 20:36 UTC, Cody Boisclair
Details
Screencap of Writer test case on Windows 7 (8.31 KB, image/png)
2017-04-18 20:40 UTC, Cody Boisclair
Details
Screencap of Calc test case on Windows 7 (2.15 KB, image/png)
2017-04-18 20:42 UTC, Cody Boisclair
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cody Boisclair 2017-04-18 20:30:40 UTC
Description:
In LibreOffice on both Windows and Mac, some fonts such as Arial and Liberation Sans have an odd rendering/kerning quirk. The digits in these fonts normally align with one another, but when two "1"s appear next to each other, they are kerned more tightly.

This does *not* appear to be related to the Pair Kerning option in Writer - the same issue appears regardless of whether Pair Kerning is set. The same rendering issue even appears in Calc, which makes columns of numbers look awkwardly misaligned when some of them contain "11" as a substring.

Steps to Reproduce:
1. In either Writer or Calc, enter the following numbers, one per line, setting the font to either Liberation Sans or Arial: 123456, 121212, 212121, 111111.

Actual Results:  
The lines all appear to be the same length.

Expected Results:
The first three lines are of equal length, but the last line (111111) is noticeably narrower.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Cody Boisclair 2017-04-18 20:32:12 UTC
Created attachment 132660 [details]
Writer document demonstrating the issue
Comment 2 Cody Boisclair 2017-04-18 20:33:17 UTC
Created attachment 132661 [details]
Calc document demonstrating the issue
Comment 3 Cody Boisclair 2017-04-18 20:36:20 UTC
Created attachment 132663 [details]
Screencap of Writer test case on MacOS

Rendered using MacOS 10.12.4 and LibreOffice 5.3.2.2
Comment 4 Cody Boisclair 2017-04-18 20:36:47 UTC
Created attachment 132664 [details]
Screencap of Calc test case on MacOS

Rendered using MacOS 10.12.4 and LibreOffice 5.3.2.2
Comment 5 Cody Boisclair 2017-04-18 20:40:57 UTC
Created attachment 132665 [details]
Screencap of Writer test case on Windows 7

Rendered using Windows 7 and LibreOffice 5.3.2.2 (both 64-bit)
Comment 6 Cody Boisclair 2017-04-18 20:42:47 UTC
Created attachment 132667 [details]
Screencap of Calc test case on Windows 7

Rendered using Windows 7 and LibreOffice 5.3.2.2 (both 64-bit)
Comment 7 Cody Boisclair 2017-04-18 20:52:43 UTC
Additional note:

The font files for both Arial and Liberation Sans include a kern pair for '11' in their 'kern' table.

This suggests that pairwise kerning is being applied regardless of whether "use pair kerning" is enabled-- or, in the case of Calc, regardless of whether it's even an available option.
Comment 8 Cody Boisclair 2017-04-18 21:07:19 UTC
Correction/amendment to the above: the '11' kern pair in both fonts is defined in both the 'kern' and 'GPOS' tables. (Based on the comments in bug 105922, it's likely GPOS that's actually getting used here.)

For contrast, Microsoft Word gives the rendering that I would have expected: "111111" is shorter than the other lines when kerning is enabled, but the same length as the other lines when kerning is disabled.
Comment 9 V Stuart Foote 2017-04-18 21:35:04 UTC
Please retest with a master/5.4.0 nightly build. This is correct there, I believe with work on bug 105454

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ded07624096183ed310187f29d4692bb39b7d24a
Comment 10 Cody Boisclair 2017-04-18 21:56:30 UTC
5.4.0 nightly fixes the Writer test case, giving the same rendering as in Word (i.e., "111111" aligns if kerning is disabled).

However, it does *not* fix the Calc test case. Kerning is still enabled by default there, unlike in Excel.
Comment 11 Buovjaga 2017-04-28 15:48:16 UTC
(In reply to Cody Boisclair from comment #10)
> However, it does *not* fix the Calc test case. Kerning is still enabled by
> default there, unlike in Excel.

Reproduced.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 9348b322a5c230dfcc2231661b73e480b130fcd9
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 28th 2016
Comment 12 QA Administrators 2018-04-29 02:30:41 UTC Comment hidden (obsolete)
Comment 13 Aron Budea 2018-06-25 01:10:07 UTC
Still in 6.1 beta2. Let's reset importance, as proper alignment of numbers is actually significant in a spreadsheet application.
Comment 14 OfficeUser 2018-06-26 18:44:30 UTC

*** This bug has been marked as a duplicate of bug 118221 ***