Closed Bug 1403166 Opened 3 years ago Closed 3 years ago

Khmer Unicode Renders Incorrectly using macOS system fonts

Categories

(Core :: Layout: Text and Fonts, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- fix-optional
firefox58 --- fixed

People

(Reporter: sungkhum, Assigned: jfkthame)

Details

Attachments

(3 files, 1 obsolete file)

Attached image firefox.png
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38

Steps to reproduce:

Browse to a Khmer website (like https://plovpit.com )



Actual results:

The title bar will not render Khmer correctly in Firefox on Mac OS Sierra


Expected results:

Khmer should render correctly as it does in Chrome and Safari
Component: Untriaged → Layout: Text
Product: Firefox → Core
Normally, for complex-script fonts on macOS, we route the shaping through Core Text so that Apple's AAT fonts will work properly. Unfortunately, this doesn't seem to be a good option for the Khmer fonts they're now shipping, which also have OpenType layout tables; we'll do better to allow harfbuzz to handle them.
Attachment #8916637 - Flags: review?(jmuizelaar)
Assignee: nobody → jfkthame
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Summary: Khmer Unicode Renders Incorrectly → Khmer Unicode Renders Incorrectly using macOS system fonts
Hmm, I wonder if this is actually another example like bug 1370927, where the AAT fonts require an "unexpected" feature to be enabled in order to shape correctly. I'll do a quick experiment to check that; if so, that would probably be the better workaround to apply.
Yep, this appears to fix the Khmer rendering, just like the Indic split-vowel cases. Sad, but at least it's simple.
Attachment #8917460 - Flags: review?(jmuizelaar)
Comment on attachment 8916637 [details] [diff] [review]
Prefer HarfBuzz shaping over Core Text for the macOS Khmer fonts that include both AAT and OpenType Layout tables, as the latter seem to work better

Obsoleting this patch; I think the fix in gfxCoreTextShaper is a better approach, as it means we're using the same rendering path for these fonts as Apple does in their own software.
Attachment #8916637 - Attachment is obsolete: true
Attachment #8916637 - Flags: review?(jmuizelaar)
Attachment #8917460 - Flags: review?(jmuizelaar) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/060b6a8b02f6
For Khmer AAT fonts, enable the Line Initial Smart Swashes feature, which is (incorrectly) required for some vowels to render properly. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/060b6a8b02f6
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.