Bug 31003 - Myanmar shaper in the old Harfbuzz does not work with Myanmar Unicode 5.1 compliant fonts
Summary: Myanmar shaper in the old Harfbuzz does not work with Myanmar Unicode 5.1 com...
Status: RESOLVED WONTFIX
Alias: None
Product: HarfBuzz
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Behdad Esfahbod
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 07:43 UTC by Keith Stribley
Modified: 2010-12-02 04:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
bad rendering with Myanmar3 due to old Myanmar shaper (10.75 KB, image/png)
2010-10-20 07:43 UTC, Keith Stribley
Details
bad rendering of Padauk with old Myanmar shaper (8.95 KB, image/png)
2010-10-20 07:45 UTC, Keith Stribley
Details
patch to disable old Myanmar shaper (1.85 KB, patch)
2010-10-20 07:47 UTC, Keith Stribley
Details | Splinter Review
patch to sort default gsub features in lookup order (4.21 KB, patch)
2010-10-20 07:49 UTC, Keith Stribley
Details | Splinter Review
Myanmar3 without Myanmar shaper but with lookups in old hb feature order (9.14 KB, image/png)
2010-10-20 08:02 UTC, Keith Stribley
Details
Padauk without old HB Myanmar shaper (8.84 KB, image/png)
2010-10-20 08:05 UTC, Keith Stribley
Details
Myanmar3 correct rendering with both patches (8.59 KB, image/png)
2010-10-20 08:13 UTC, Keith Stribley
Details

Description Keith Stribley 2010-10-20 07:43:49 UTC
Created attachment 39578 [details]
bad rendering with Myanmar3 due to old Myanmar shaper

The old Harfbuzz code contains a shaper which was written for one interpretation of the ambiguous Unicode 4 specification for Myanmar. However, Unicode 5.1 has been out for some time and most Myanmar Unicode fonts have been written so that they work just with the default OpenType features such as clig and liga since those features are enabled by default in Uniscribe and ICU.

The shaper rules in the old Harfbuzz are wrong for Myanmar Unicode 5.1 and actively prevent Myanmar Unicode fonts like Padauk (http://scripts.sil.org/Padauk) and Myanmar3 (http://code.google.com/p/myanmar3source/) from working. Both these fonts display correctly with Harfbuzz-NG, however some applications are still using the old Harfbuzz. It is possible to get the old Harfbuzz to render these fonts correctly by removing the Myanmar shaper.

In some cases it is also necessary to adapt the gsub implementation so that it applies all lookups in lookup order rather than first by feature then by lookup order. The harfbuzz-ng code already applies them in that order, though Pango doesn't use that order unfortunately.
Comment 1 Keith Stribley 2010-10-20 07:45:41 UTC
Created attachment 39579 [details]
bad rendering of Padauk with old Myanmar shaper
Comment 2 Keith Stribley 2010-10-20 07:47:43 UTC
Created attachment 39580 [details] [review]
patch to disable old Myanmar shaper
Comment 3 Keith Stribley 2010-10-20 07:49:18 UTC
Created attachment 39581 [details] [review]
patch to sort default gsub features in lookup order
Comment 4 Keith Stribley 2010-10-20 08:02:53 UTC
Created attachment 39583 [details]
Myanmar3 without Myanmar shaper but with lookups in old hb feature order
Comment 5 Keith Stribley 2010-10-20 08:05:00 UTC
Created attachment 39584 [details]
Padauk without old HB Myanmar shaper
Comment 6 Keith Stribley 2010-10-20 08:13:39 UTC
Created attachment 39585 [details]
Myanmar3 correct rendering with both patches

Padauk only uses clig in gsub so it avoids the lookup order problem. Myanmar3 mixes lookups in liga and clig which have to be applied in lookup order for correct rendering hence it needs both patches.
The unicode text used for the images is:
ကောင်းလား။
စက္ကူ
မြန်မာအင်္ဂလိပ်
Comment 7 Behdad Esfahbod 2010-10-20 09:12:19 UTC
Next version of pango will use harfbuzz-ng.

For the patches, feel free to commit if you have commit access.  Or ping Lars Knoll since he's been maintaining the .old code.
Comment 8 Behdad Esfahbod 2010-12-02 04:47:16 UTC
I'm closing down the bugs against the old code base.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.