Bug 150451

Summary: [Win] Add support for the USE_TYPO_METRICS flag
Product: WebKit Reporter: Frédéric Wang Nélar <fred.wang>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cfleizach, commit-queue, darin, gur.trio, mmaxfield
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Windows 7   
URL: http://tests.mathml-association.org/mathml/relations/text-and-math/use-typo-metrics-1.html
See Also: https://bugs.webkit.org/show_bug.cgi?id=198909
Bug Depends on: 150394, 150396    
Bug Blocks: 131839    
Attachments:
Description Flags
Patch
none
Patch V2
darin: review+
testcase (requires Cambria Math) none

Frédéric Wang Nélar
Reported 2015-10-22 10:46:24 PDT
This is bug 131839 for Windows.
Attachments
Patch (7.57 KB, patch)
2015-10-22 11:30 PDT, Frédéric Wang Nélar
no flags
Patch V2 (7.56 KB, patch)
2015-10-22 12:49 PDT, Frédéric Wang Nélar
darin: review+
testcase (requires Cambria Math) (9.78 KB, text/html)
2015-10-22 13:57 PDT, Frédéric Wang Nélar
no flags
Frédéric Wang Nélar
Comment 1 2015-10-22 11:30:59 PDT
Frédéric Wang Nélar
Comment 2 2015-10-22 12:49:22 PDT
Created attachment 263847 [details] Patch V2
WebKit Commit Bot
Comment 3 2015-10-22 12:52:28 PDT
Attachment 263847 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp:70: Missing spaces around / [whitespace/operators] [3] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Frédéric Wang Nélar
Comment 4 2015-10-22 13:53:31 PDT
Comment on attachment 263847 [details] Patch V2 Just asking a first review to get some feedback... The patch has *not* been verified on a Windows machine. The style error is bug 150396 and it seems that we can not workaround that because kCTFontTableOS2 is not defined on Windows. Maybe this requires an additional header but I can't find a public documentation for Windows. It's a shame that the CGFont API does not have a more straightforward way to access the typo metrics. For SimpleFontDataCGWin, I just copied & adapted what was done for Mac in bug 150396. I'm afraid the same will be necessary for iOS... As said in bug 150394 comment 13, I can add more code to restrict this change to font with a MATH table if that's desired. Again, the CGFont API does not seem to have a simple & fast way to verify whether a MATH table is present, so in bug 150394 I just adapted the fontHasVerticalGlyphs function from FontCocoa.mm.
Frédéric Wang Nélar
Comment 5 2015-10-22 13:57:11 PDT
Created attachment 263857 [details] testcase (requires Cambria Math)
Frédéric Wang Nélar
Comment 6 2015-11-02 10:13:17 PST
Note You need to log in before you can comment on or make changes to this bug.