Bug Hunting Session
Bug 95222 - glyph positioning for justified paragraphs splitting letters from words for several fonts
Summary: glyph positioning for justified paragraphs splitting letters from words for s...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha1
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2015-10-21 12:58 UTC by V Stuart Foote
Modified: 2015-12-15 11:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
clip of letter glyphs composed justified separating from word, only some fonts (37.34 KB, image/png)
2015-10-21 13:08 UTC, V Stuart Foote
Details
sample document with justified text in Graphite fonts (22.03 KB, application/vnd.oasis.opendocument.text)
2015-11-25 13:57 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2015-10-21 12:58:21 UTC
Seem to have a Uniscribe/Graphite composition glitch on Windows--splitting letter glyphs from words-- affecting justified Gentium Basic, Linux Biolinum G and Linux Libertine G

As in attached screen clip of attacment 119766

On Windows 10 Pro 64-bit en-US with nVidia GTX750ti

With current master
Version: 5.1.0.0.alpha1+ (x64)
Build ID: 7323190456c2ed4ec9f092f8e69ba12ce41587cd
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-10-20_22:44:48
Locale: en-US (en_US)

This started between 2015-10-01 and 2015-10-05, but there had been spacing issues with glyph placement since 2015-09-03
Comment 1 V Stuart Foote 2015-10-21 13:08:21 UTC
Created attachment 119826 [details]
clip of letter glyphs composed justified separating from word, only some fonts
Comment 2 V Stuart Foote 2015-10-21 13:11:53 UTC
Test document in attachment 119766 [details] from bug 94897
Comment 3 Buovjaga 2015-10-21 18:16:58 UTC
Confirmed.

No splitting in 5.0.2

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

Version: 5.1.0.0.alpha1+
Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
Locale: en-US (fi_FI)
Comment 4 V Stuart Foote 2015-11-07 17:20:33 UTC
Just got round to checking this on a VMWare Workstation Linux guest
Fedora 22, LXDE with
Version: 5.1.0.0.alpha1+
Build ID: d1c91627d9c7d117ee2e680f5c24844f7c4d8515-GL
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2015-11-06_23:22:44
Locale: en-US (en_US.UTF-8)

The black blocks of bug 95648 are not present (with or without OpenGL enabled), but the incorrect composition of justified text for several fonts are (affects at least Gentium Basic, Linux Bilinum G, and Linux Libertine G). 

I guess meaning that is it more than just a Uniscribe handling issue on Windows.

Setting OS to All, and requesting bibiset.
Comment 5 Tor Lillqvist 2015-11-25 12:39:42 UTC
So the fonts mentioned (Gentium Basic, Linux Biolinum G and Linux Libertine G ) are all Graphite-enabled ones?
Comment 6 V Stuart Foote 2015-11-25 13:57:38 UTC
Created attachment 120789 [details]
sample document with justified text in Graphite fonts

(In reply to Tor Lillqvist from comment #5)
> So the fonts mentioned (Gentium Basic, Linux Biolinum G and Linux Libertine
> G ) are all Graphite-enabled ones?

Seems to be just the Graphite enabled, I've attached a sample document. Issue manifests with blocks when justifying at larger point size for fonts. At smaller point sizes elements of the glyphs are malformed and characters overlap.
Comment 7 raal 2015-11-26 14:59:25 UTC
This seems to have begun at the below commit.
Adding Cc: to Martin Hosken ; Could you possibly take a look at this one? Thanks

393b5a03e8a580103cc31ca4752396032838ecdb is the first bad commit
commit 393b5a03e8a580103cc31ca4752396032838ecdb
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Sep 13 18:21:45 2015 -0700

    source sha:41007842ed9bb5d6165792a197769f72dae55a2c

    source sha:41007842ed9bb5d6165792a197769f72dae55a2c

author    Martin Hosken <martin_hosken@sil.org>    2015-09-10 03:14:18 (GMT)
committer    Martin Hosken <martin_hosken@sil.org>    2015-09-14 01:16:40 (GMT)
commit    41007842ed9bb5d6165792a197769f72dae55a2c (patch)
Refactor graphite integration and update graphite
Comment 8 martin_hosken 2015-11-27 09:10:29 UTC
Not sure what is going on in sw with this. Here's the first line of the test text:

006B 0072 00E1 0073 006E 00FD 0020 0064 006B 006B 006B 0020 0061 0073 0064 0066 006B 006A 0061 0073 0066 0020 0061 006B 006A 0066 0064 0020 00E1 00E9 0077 010D 0161 00FD 0159 0020 011B 010D 017E 0159 011B 010D 011B 0161 0020 011B 010D 011B 0161 0020 011B 0161 010D 0020 011B 0161 010D 0020 011B 0161 010D 011B 0161 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 010D 011B 0161 010D 011B 0161 010D 0020 011B 0161 010D 0020

Here's the data on each character:

0,8,7 1,14,13 2,21,21 3,27,26 4,35,35 5,42,57 6,45,75 7,53,83 8,61,90 9,69,98 10,77,120 11,80,138 12,87,145 13,93,151 14,101,159 15,106,163 16,114,171 17,118,174 18,125,182 19,131,187 20,136,207 21,139,225 22,146,232 23,154,240 24,158,243 25,163,248 26,171,271 27,174,289 28,181,296 29,188,303 30,199,313 31,206,319 32,212,325 33,219,332 34,225,353 35,228,371 36,235,378 37,242,385 38,249,391 39,255,397 40,262,404 41,269,410 42,276,418 43,282,438 44,285,456 45,292,463 46,299,469 47,306,476 48,312,497 49,315,515 50,322,522 51,328,528 52,335,549 53,338,567 54,345,574 55,351,580 56,358,586

each triple is the character index, the rendered horizontal position before justification and the kerning value requested for that character by sw. Notice how the kern values increase by about 8 each time. Then for the character before the space and for the space the amount they increase jumps to 22. This is what is causing the problem with the 'last character of the word floating off'. Any thoughts as to why this is happening just for Graphite fonts is welcomed. But I don't see that it's anything in the Graphite layer, or else it is some weird interaction with sw. All I can say is sw is giving the Graphite layer some very odd kern values to work with.

Will dig deeper later. All wisdom welcomed.
Comment 9 martin_hosken 2015-11-27 09:12:57 UTC
BTW I blame SwFontObj::DrawText. Please let me know if you think I am barking up the wrong tree.

TIA.
Comment 10 martin_hosken 2015-11-30 03:47:55 UTC
Fixed in I9ea7167ca21bc18db6ed7f82fc54f3824468db4e in master. Could someone promote this to 5.1 release?

Thanks.
Comment 11 Tor Lillqvist 2015-11-30 07:35:42 UTC
Cherry-picked to 5.1, thanks! Will cherry-pick to 5.0, too, soon.
Comment 12 Tor Lillqvist 2015-11-30 07:37:31 UTC
(If needed in 5.0, that is.)
Comment 13 martin_hosken 2015-11-30 08:27:04 UTC
Not needed in 5.0. All the fun was added in 5.1.
Comment 14 Robinson Tryon (qubit) 2015-12-15 11:03:20 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]