Bug Hunting Session
Bug 108025 - Kerning problem for glyph with applied OpenType Feature
Summary: Kerning problem for glyph with applied OpenType Feature
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-05-23 11:14 UTC by gluk
Modified: 2019-04-24 02:49 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Insert Special Character as Workaround - Does Not Work (514.23 KB, image/png)
2018-04-21 23:04 UTC, LibreTraining
Details
Document using feature ranges (10.08 KB, application/vnd.oasis.opendocument.text)
2018-04-23 14:06 UTC, Khaled Hosny
Details
PDF from the ODT above (16.75 KB, application/pdf)
2018-04-23 14:07 UTC, Khaled Hosny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gluk 2017-05-23 11:14:52 UTC
Description:
program treat glyph with applied OpenType feature as separate block of text, and have problem with kerning. As example image:

http://www.glukfonts.pl/temp/LibreOfficeProblem.png

Kerning value between glyphs "A.init" and "W" exist in font.
With it, OpenType support is only partly useful.

Steps to Reproduce:
1.install FoglihtenNo07 font
2.type in document "AWATAR"
3.select "A"
4.change in font selection "FoglihtenNo07" to "FoglihtenNo07:init"


Actual Results:  
existing in font kerning value between "A.init" and "W" is missing

Expected Results:
existing in font kerning value between "A.init" and "W"


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Xisco Faulí 2017-05-24 08:35:25 UTC
Hello gluk,

Thanks for reporting this bugs. Some changes have been done recently related to the kerning: https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=kern

Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongsidethe standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 2 gluk 2017-05-24 11:37:59 UTC
(In reply to Xisco Faulí from comment #1)
> Hello gluk,
> 
> Thanks for reporting this bugs. Some changes have been done recently related
> to the kerning:
> https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=kern
> 
> Could you please try to reproduce it with a master build from
> http://dev-builds.libreoffice.org/daily/master/ ?
> You can install it alongsidethe standard version.
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the master build

Hello,
unfortunately,
I have tested it with:

master~2017-05-24_00.41.30_LibreOfficeDev_5.5.0.0.alpha0_Linux_x86-64

and bug is still present.

gluk
Comment 3 Buovjaga 2017-06-04 10:31:38 UTC
Repro with http://www.glukfonts.pl/font.php?font=FoglihtenNo07

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: c855400e9686ddd8bcba5691393f839f6f52c966
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 2nd 2017
Comment 4 Khaled Hosny 2018-02-01 18:41:17 UTC
Currently setting font feature to a font name amounts to switching to a different font, so kerning and other OpenType features will be broken across the boundary.
Comment 5 LibreTraining 2018-04-21 23:04:44 UTC
Created attachment 141529 [details]
Insert Special Character as Workaround - Does Not Work

I assumed directly inserting the character should work as a workaround because that would still be the same font.
It did not work.

This appears to point to a larger OpenType kerning issue.

The attached image shows tests in LibreOffice and other applications.
The alternate A character has been inserted directly.
Some applications do the kerning right, some do it wrong.

LibreOffice 6.0.3.2 - Wrong
Word 2016 - Wrong
InDesign 2018 - Right
Scribus 1.5.4 SVN - Wrong
GIMP 2.8 - Right
Inkscape 9.92.2 - Right
FontCreator - Right

FontCreator does not show a specific kerning pair(s) for that alternate character.
It appears it is coming from the class.

It appears that GIMP, Inkscape, and InDesign read this properly and kern the characters properly.

Should I enter this in the tracker as a separate issue?
Comment 6 Khaled Hosny 2018-04-22 08:11:58 UTC
A work around is to use to apply the feature to the whole word, but use indexes to select the range of characters to apply to. Eg. “Foo Serif:ss01[1]” or “Foo Serif:ss01[1:5]”, the indexes count from the start of the paragraph, though (IIRC, please test).
Comment 7 LibreTraining 2018-04-22 20:38:44 UTC
(In reply to Khaled Hosny from comment #6)
> A work around is to use to apply the feature to the whole word, but use
> indexes to select the range of characters to apply to. Eg. “Foo
> Serif:ss01[1]” or “Foo Serif:ss01[1:5]”, the indexes count from the start of
> the paragraph, though (IIRC, please test).

Sounded promising, but it does not work.

Tried:

FoglihtenNo07:init[1]
FoglihtenNo07:init[:1]
FoglihtenNo07:init[1:2]

As soon as you add anything to init nothing happens.
Shows the original text.
Comment 8 Khaled Hosny 2018-04-23 14:06:45 UTC
Created attachment 141562 [details]
Document using feature ranges

Here is a document that works for me.
Comment 9 Khaled Hosny 2018-04-23 14:07:35 UTC
Created attachment 141563 [details]
PDF from the ODT above
Comment 10 LibreTraining 2018-04-23 20:08:37 UTC
(In reply to Khaled Hosny from comment #8)
> Created attachment 141562 [details]
> Document using feature ranges
> 
> Here is a document that works for me.

I see. 
I assumed the count was from where I applied the edited font name.
Missed the "from beginning of paragraph" part.

Odd that the first letter is 0, not 1.


Something is still off with the kerning of inserted special characters.
And characters directly entered via ALT codes.
It works with some manual intervention, but not as expected.
I will post a separate bug about that.
Comment 11 QA Administrators 2019-04-24 02:49:26 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug