Bug 130840

Summary: Add Support for Glyph-level mirroring
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cfleizach, mmaxfield, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 123018    
Attachments:
Description Flags
testcase none

Description Frédéric Wang (:fredw) 2014-03-27 08:37:49 PDT
Created attachment 227948 [details]
testcase

Currently, Font::glyphDataForCharacter accepts a mirror boolean to apply Character-level mirroring. However it does not allow to apply Glyph-level mirroring. See

http://www.microsoft.com/typography/OTSPEC/TTOCHAP1.htm#ltrrtl

This is needed for MathML operators such as integrals or sums, that don't have character-level mirroring defined in Unicode. 

In Blink & Gecko with the XITS fonts installed, the attached testcase shows mirroring of the bracket (character-level) and sum (glyph-level). The latter relies on the 'rtlm' feature of the XITS. Note that for MathML purpose, all what is needed is a way for Font::glyphDataForCharacter to use the rtlm substitution table, not to implement the font-feature-settings CSS property.