Description: Graphite font features in the "Khmer Busra Bunong" font (attached) work fine in LO 5.3 on Windows and Linux but are not activated on macOS Sierra 10.12.3 (see screenshots). I'm guessing that this is because the font includes both graphite and AAT tables, but I haven't confirmed this. LO 5.3 includes a new cross-platform text layout engine which supports Graphite and OpenType Font Features on all platforms. (https://wiki.documentfoundation.org/ReleaseNotes/5.3#Text_Layout) Enabling graphite font features in Charis SIL font works on all platforms. (http://software.sil.org/charis/support/smart-font-features/) as does Libertine G (http://www.numbertext.org/linux/fontfeatures.pdf). The Khmer Busra Bunong font (attached) contains both graphite and AAT tables. Bug 105516, comment 1 states that Graphite or AAT takes precedence over OpenType but it appears here that AAT is taking precedence over graphite. This is problematic because it causes different rendering on different platforms. I think I would prefer that Graphite take precedence over AAT. Reproducible: Always User Profile Reset: Yes Additional Info: Related Bugs: Bug 58941 and bug 105710 are discussions about implementing a GUI control for enabling OpenType or graphite features. Bug 71732 (Font-Rendering) - [META] Bugs related to text rendering, typography and font features in LO User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8
Created attachment 131781 [details] Screenshot showing font features settings Note font features have been specified with, e.g. ":litr=1" appended to the font name. LO in macOS on the left and Windows in a VM on the right.
Created attachment 131782 [details] Screenshot showing active font features for Charis SIL but not rendering for Khmer Busra Bunong Left side: LibreOffice 5.3.1.1 on macOS shows working graphite features for Charis SIL but not Khmer Busra Bunong Right side: LibreOffice 5.3.1.1 on Windows 10 in a VM shows working graphite features in both Charts SIL and Khmer Busra Bunong
Created attachment 131783 [details] Test document Test document (requires Charis SIL and Khmer Busra Bunong fonts)
Created attachment 131784 [details] Khmer Busra Bunong font The Khmer Busra Bunong font is a Khmer font in the Mondulkiri font series (http://scripts.sil.org/mondulkiri), which has not yet been publicly released. The Charis SIL font is available at http://software.sil.org/charis/. It does not contain AAT tables (http://scripts.sil.org/SILFontList).
In CommonSalLayout, there is a fixed list of shapers, and so an inherent priority order, passed to hb_shape. This is "coretext_aat", "graphite2", "ot", "fallback". Not sure why coretext comes before graphite. Reordering would fix this bug. But it would be good to allow this list to be specified via an environment variable for those wishing to test fonts using libo, or to work around font problems.
In CommonSalLayout, there is a fixed list of shapers, and so an inherent priority order, passed to hb_shape. This is "coretext_aat", "graphite2", "ot", "fallback". Not sure why coretext comes before graphite. Reordering would fix this bug. But it would be good to allow this list to be overridden by an environment variable for those wishing to test fonts using libo, or to work around font problems.
(In reply to martin_hosken from comment #6) > In CommonSalLayout, there is a fixed list of shapers, and so an inherent > priority order, passed to hb_shape. This is "coretext_aat", "graphite2", > "ot", "fallback". > > Not sure why coretext comes before graphite. Reordering would fix this bug. That should have been the same order used by HarfBuzz itself, but checking now I see HarfBuzz lists graphite2 shaper, so I probably messed it up when I was trying to see if coretext_aat needs to be listed on Mac only or not.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3cee50476e422e3ed84169cdcbe6bd9883fc9316 tdf#106466: Use graphite2 shaper first It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Actually that is not a regression, we did not support Graphite on Mac before.
Yes, it appears to work fine in master~2017-03-11_02.16.23_LibreOfficeDev_5.4.0.0.alpha0_MacOS_x86-64.dmg Graphite features can be enabled on both Mac, even when the font contains AAT tables. I don't see a Windows build yet, so I'll assume that this fix doesn't break the functionality on Windows. Thank you Khaled and Martin
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=68b546b17afa0082862f2a20b8f089ae9124a16a&h=libreoffice-5-3 tdf#106466: Use graphite2 shaper first It will be available in 5.3.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.