+2015-10-22 Frederic Wang <fred.wang@free.fr>
+
+ Rollout r190440 for the moment. It broke the build.
+
+ * fonts/lineheight5000-typolineheight2300.woff:
+ * platform/mac-mavericks/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
+ * platform/mac/TestExpectations:
+ * platform/mac/mathml/opentype/opentype-stretchy-expected.txt:
+ * platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
+
2015-10-21 Frederic Wang <fred.wang@free.fr>
[Mac] Add support for the USE_TYPO_METRICS flag
RenderMathMLOperator {mo} at (0,1) size 16x21
RenderMathMLBlock (anonymous, flex) at (2,0) size 11x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (4,0) size 8x1
RenderText {#text} at (0,0) size 0x0
RenderMathMLOperator {mo} at (0,1) size 26x21
RenderMathMLBlock (anonymous, flex) at (2,0) size 22x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (5,0) size 16x1
RenderText {#text} at (0,0) size 0x0
RenderMathMLOperator {mo} at (0,1) size 156x41
RenderMathMLBlock (anonymous, flex) at (2,0) size 151x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (2,0) size 151x1
RenderText {#text} at (0,0) size 0x0
# Imported Blink tests which have not been investigated.
imported/blink/compositing/video/video-controls-layer-creation-squashing.html [ Pass ImageOnlyFailure ]
+
+# USE_TYPO_METRICS is not implemented on mac.
+webkit.org/b/131839 fonts/use-typo-metrics-1.html [ ImageOnlyFailure ]
RenderMathMLOperator {mo} at (0,0) size 47x11
RenderMathMLBlock (anonymous, flex) at (2,0) size 42x3
RenderBlock (anonymous) at (0,0) size 3x3
- RenderText at (0,-3) size 3x0
+ RenderText at (0,-3) size 3x10
text run at (0,-3) width 3: "\x{219F}"
RenderText {#text} at (48,16) size 5x18
text run at (48,16) width 5: " "
RenderMathMLOperator {mo} at (0,0) size 47x21
RenderMathMLBlock (anonymous, flex) at (2,0) size 42x3
RenderBlock (anonymous) at (0,0) size 3x3
- RenderText at (0,-3) size 3x0
+ RenderText at (0,-3) size 3x10
text run at (0,-3) width 3: "\x{219F}"
RenderText {#text} at (100,16) size 5x18
text run at (100,16) width 5: " "
RenderMathMLOperator {mo} at (0,0) size 47x31
RenderMathMLBlock (anonymous, flex) at (2,0) size 42x3
RenderBlock (anonymous) at (0,0) size 3x3
- RenderText at (0,-3) size 3x0
+ RenderText at (0,-3) size 3x10
text run at (0,-3) width 3: "\x{219F}"
RenderText {#text} at (0,0) size 0x0
RenderBlock {P} at (0,50) size 784x154
RenderMathMLOperator {mo} at (0,0) size 47x150
RenderMathMLBlock (anonymous, flex) at (2,0) size 42x3
RenderBlock (anonymous) at (0,0) size 3x3
- RenderText at (0,-3) size 3x0
+ RenderText at (0,-3) size 3x10
text run at (0,-3) width 3: "\x{219F}"
RenderText {#text} at (0,0) size 0x0
RenderBlock {P} at (0,220) size 784x85
RenderMathMLOperator {mo} at (0,0) size 84x82
RenderMathMLBlock (anonymous, flex) at (0,0) size 83x12
RenderBlock (anonymous) at (0,0) size 11x12
- RenderText at (0,6) size 11x0
+ RenderText at (0,6) size 11x10
text run at (0,6) width 11: "\x{2A1B}"
RenderText {#text} at (0,0) size 0x0
RenderMathMLOperator {mo} at (0,1) size 16x21
RenderMathMLBlock (anonymous, flex) at (2,0) size 11x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (4,0) size 8x1
RenderText {#text} at (0,0) size 0x0
RenderMathMLOperator {mo} at (0,1) size 26x21
RenderMathMLBlock (anonymous, flex) at (2,0) size 22x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (5,0) size 16x1
RenderText {#text} at (0,0) size 0x0
RenderMathMLOperator {mo} at (0,1) size 156x41
RenderMathMLBlock (anonymous, flex) at (2,0) size 151x4
RenderBlock (anonymous) at (0,0) size 2x4
- RenderText at (0,-3) size 2x0
+ RenderText at (0,-3) size 2x10
text run at (0,-3) width 2: "\x{219C}"
RenderMathMLSpace {mspace} at (2,0) size 151x1
RenderText {#text} at (0,0) size 0x0
2015-10-22 Frederic Wang <fred.wang@free.fr>
+ Rollout r190440 for the moment. It broke the build.
+
+ * platform/graphics/cocoa/FontCocoa.mm:
+ (WebCore::Font::platformInit): Deleted.
+
+2015-10-22 Frederic Wang <fred.wang@free.fr>
+
Unreviewed compilation fix on Mac.
* platform/graphics/cocoa/FontCocoa.mm:
@end
#endif
-#if USE(APPKIT)
-#include "OpenTypeTypes.h"
-#endif
-
namespace WebCore {
static bool fontHasVerticalGlyphs(CTFontRef ctFont)
float lineGap = scaleEmToUnits(CGFontGetLeading(m_platformData.cgFont()), unitsPerEm) * pointSize;
- // The Open Font Format describes the OS/2 USE_TYPO_METRICS flag as follows:
- // "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."
- // We only apply this rule in the important case of fonts with a MATH table.
- CFArrayRef availableTables = CTFontCopyAvailableTables(m_platformData.cgFont(), kCTFontTableOptionNoOptions);
- if (CFArrayContainsValue(availableTables, CFRangeMake(0, CFArrayGetCount(availableTables)), &kCTFontTableMATH)) {
- if (CFDataRef os2Table = CGFontCopyTableForTag(m_platformData.cgFont(), kCTFontTableOS2)) {
- // For the structure of the OS/2 table, see
- // https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html
- const CFIndex fsSelectionOffset = 16 * 2 + 10 + 4 * 4 + 4 * 1;
- const CFIndex sTypoAscenderOffset = fsSelectionOffset + 3 * 2;
- const CFIndex sTypoDescenderOffset = sTypoAscenderOffset + 2;
- const CFIndex sTypoLineGapOffset = sTypoDescenderOffset + 2;
- if (CFDataGetLength(os2Table) >= sTypoLineGapOffset + 2) {
- const UInt8* os2Data = CFDataGetBytePtr(os2Table);
- const unsigned short useTypoMetricsMask = 1 << 7;
- if (*(reinterpret_cast<const OpenType::UInt16*>(os2Data + fsSelectionOffset)) & useTypoMetricsMask) {
- ascent = scaleEmToUnits(*(reinterpret_cast<const OpenType::Int16*>(os2Data + sTypoAscenderOffset)), unitsPerEm) * pointSize;
- descent = -scaleEmToUnits(*(reinterpret_cast<const OpenType::Int16*>(os2Data + sTypoDescenderOffset)), unitsPerEm) * pointSize;
- lineGap = scaleEmToUnits(*(reinterpret_cast<const OpenType::Int16*>(os2Data + sTypoLineGapOffset)), unitsPerEm) * pointSize;
- }
- }
- CFRelease(os2Table);
- }
- }
- CFRelease(availableTables);
-
// We need to adjust Times, Helvetica, and Courier to closely match the
// vertical metrics of their Microsoft counterparts that are the de facto
// web standard. The AppKit adjustment of 20% is too big and is