This is bug 131839 for Linux.
Created attachment 263689 [details] Patch
There is an expected style-check failure, due to fact that the slash in the 'OS/2' tag is interpreted as a division by the style checker...
Attachment 263689 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:179: Missing spaces around / [whitespace/operators] [3] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 263689 [details] Patch Attachment 263689 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/316610 New failing tests: mathml/opentype/opentype-stretchy-horizontal.html mathml/opentype/opentype-stretchy.html
Created attachment 263695 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Comment on attachment 263689 [details] Patch Attachment 263689 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/316629 New failing tests: mathml/opentype/opentype-stretchy-horizontal.html mathml/opentype/opentype-stretchy.html
Created attachment 263697 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 263689 [details] Patch Attachment 263689 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/316689 New failing tests: mathml/opentype/opentype-stretchy-horizontal.html mathml/opentype/opentype-stretchy.html
Created attachment 263701 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 263702 [details] Patch
Attachment 263702 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:179: Missing spaces around / [whitespace/operators] [3] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 263702 [details] Patch Is there a way we can limit these different metrics to only 'MATH' support? That is the intended use case, right? It seems that changing the rendering of all text shouldn't be necessary for just math stuff.
(In reply to comment #12) > Comment on attachment 263702 [details] > Patch > > Is there a way we can limit these different metrics to only 'MATH' support? > That is the intended use case, right? It seems that changing the rendering > of all text shouldn't be necessary for just math stuff. Maybe some type designers or other font people will be willing that Safari follows the Open Font Format standard (http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=66391 and http://mpeg.chiariglione.org/standards/mpeg-4/open-font-format/text-isoiec-dis-14496-22-3rd-edition): "USE_TYPO_METRICS = If set, it is strongly recommended to use OS/2.sTypoAscender - OS/2.sTypoDescender+ OS/2.sTypoLineGap as a value for default line spacing for this font." However, for the use case of MathML I'm interested in, this is indeed only necessary for fonts with a MATH table. If Apple reviewers want to keep the current metrics in general and only consider typo metrics for fonts with a 'MATH' table then I can easily add a CGFontCopyTableForTag(m_platformData.cgFont(), 'MATH') check before the new if statement (and modify the reftest to include a dummy MATH table). Please let me know what you prefer.
(In reply to comment #13) > (In reply to comment #12) > > Comment on attachment 263702 [details] > > Patch > > > > Is there a way we can limit these different metrics to only 'MATH' support? > > That is the intended use case, right? It seems that changing the rendering > > of all text shouldn't be necessary for just math stuff. > > Maybe some type designers or other font people will be willing that Safari > follows the Open Font Format standard > (http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics. > htm?csnumber=66391 and > http://mpeg.chiariglione.org/standards/mpeg-4/open-font-format/text-isoiec- > dis-14496-22-3rd-edition): > > "USE_TYPO_METRICS = If set, it is strongly recommended to use > OS/2.sTypoAscender - OS/2.sTypoDescender+ OS/2.sTypoLineGap as a value for > default line spacing for this font." > > However, for the use case of MathML I'm interested in, this is indeed only > necessary for fonts with a MATH table. If Apple reviewers want to keep the > current metrics in general and only consider typo metrics for fonts with a > 'MATH' table then I can easily add a > CGFontCopyTableForTag(m_platformData.cgFont(), 'MATH') check before the new > if statement (and modify the reftest to include a dummy MATH table). Please > let me know what you prefer. Adding this check is a good idea. Also, you can probably do a little better by using the enum forms for the table names. For example: CTFontCopyTable(…, kCTFontTableOS2)
Created attachment 263729 [details] Patch
Comment on attachment 263729 [details] Patch Attachment 263729 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/317395 New failing tests: fonts/use-typo-metrics-1.html
Created attachment 263732 [details] Archive of layout-test-results from ews102 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 263729 [details] Patch Attachment 263729 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/317410 New failing tests: fonts/use-typo-metrics-1.html
Created attachment 263734 [details] Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Created attachment 263736 [details] Patch
Comment on attachment 263736 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263736&action=review > Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:180 > + if (CFDataRef mathTable = CGFontCopyTableForTag(m_platformData.cgFont(), 'MATH')) { kCTFontTableMATH Also, you can use CTFontCopyAvailableTables() if you just want to know if a table exists, rather than copying the whole table.
Committed r191440: <http://trac.webkit.org/changeset/191440>
rollout fow now: https://trac.webkit.org/changeset/191444
Created attachment 263827 [details] Patch + review comment 21
Created attachment 263831 [details] Patch + review comment 21 minus kCTFontTableMATH kCTFontTableMATH does not seem to be defined on old systems.
Committed r191456: <http://trac.webkit.org/changeset/191456>
I'm reopening this bug because the test imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo-metrics-1.html is marked as failing on platforms Mac/iOS and this is the expectation bug attached to this expectation. LayoutTests/platform/ios/TestExpectations: # This test fails because the USE_TYPO_METRICS flag is ignored for non-math font webkit.org/b/150394 imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo-metrics-1.html [ ImageOnlyFailure ] LayoutTests/platform/mac/TestExpectations: # This test fails because the USE_TYPO_METRICS flag is ignored for non-math font webkit.org/b/150394 imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo-metrics-1.html [ ImageOnlyFailure ]
(In reply to Carlos Alberto Lopez Perez from comment #27) > I'm reopening this bug because the test > imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo- > metrics-1.html is marked as failing on platforms Mac/iOS and this is the > expectation bug attached to this expectation. > > LayoutTests/platform/ios/TestExpectations: > # This test fails because the USE_TYPO_METRICS flag is ignored for non-math > font > webkit.org/b/150394 > imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo- > metrics-1.html [ ImageOnlyFailure ] > > LayoutTests/platform/mac/TestExpectations: > # This test fails because the USE_TYPO_METRICS flag is ignored for non-math > font > webkit.org/b/150394 > imported/w3c/web-platform-tests/mathml/relations/text-and-math/use-typo- > metrics-1.html [ ImageOnlyFailure ] right, the reason is because the fix was only applied to fonts with a MATH table (see bug 150394 comment 12).