Bug 53584 - Unexpected GSUB replacement with FreeSerif
Summary: Unexpected GSUB replacement with FreeSerif
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected)
3.5.2 release
Hardware: All All
: medium major
Assignee: Caolán McNamara
Depends on: 48191
  Show dependency treegraph
Reported: 2012-08-16 10:46 UTC by Caolán McNamara
Modified: 2012-08-16 23:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2012-08-16 10:46:12 UTC
+++ This bug was initially created as a clone of Bug #48191 +++
I had Zdenek Wagner look at the latest, and he found a couple of problems remaining in the Hindi text.
See attachment.
The more serious (in red) is a character replacement that still isn't happening.  The other is a spacing issue.

This may be a separate bug, I don't know.
It will take me some time to sort out what's going on here.
Comment 1 Caolán McNamara 2012-08-16 10:47:12 UTC
i.e. picture of https://bugs.freedesktop.org/attachment.cgi?id=65545 and source doc of https://bugs.freedesktop.org/attachment.cgi?id=65437 with FreeSerif of freefont-otf-20120503
Comment 2 Caolán McNamara 2012-08-16 11:00:54 UTC
So, this is an ICU thing, not our thing ;-)

Looking into it, it's the usual savage complexity around Indic reordering and which GSUB feature gets applied when.

pango is taking the input of 
0x92A, 0x94D, 0x930
reorders it to...
0x92A, 0x930, 0x94D
and then applies the rphf and blwf features to that.

while icu seems to now attempt to implement http://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx (IndicReordering::v2process) The upshot being that
that reordering doesn't happen before the rphf and blwf features are applied, so its not the same replacements that occur.

pango, icu and internet explorer/windows firefox give three different results (didn't check HarfBuzz). I can't tell whether this a bug or not, but if it is it appears to be an icu one. Ideally file a bug there or try their dev list to see if anyone has a better oversight.
Comment 3 Steve White 2012-08-16 23:41:37 UTC
Hi Caolán,

I can confirm the Hindi isn't working right in Windows (Firefox and Explorer).  That's a disappointment...I know I tested it, and followed Microsoft's recommendations as best I could.  Evidently, I broke it at some point. 

It was heavily tested in the primary targets under Linux, on Firefox, Pango apps, and XeLaTex.  There it gives very similar results.  LibreOffice is the odd man out.

Anyway, nevermind this until I get it sorted out on that great platform.

Interestingly, to my poor eyes, the Sinhala *is* rendering correctly
in Windows.  That's funny, because some tricks were pulled in that
script, which for a long time broke it in ICU/OpenOffice.