https://bugs.webkit.org/show_bug.cgi?id=145088
Reviewed by Simon Fraser.
Source/WebCore:
Not needed anymore.
Test: svg/text/offset-square-svg-font.html
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendKERNTable):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
LayoutTests:
Test that the hacks are unnecessary.
* svg/text/offset-square-svg-font-expected.html: Added.
* svg/text/offset-square-svg-font.html: Added.
* svg/text/resources/offset-square-svg-font.svg: Added.
* svg/text/resources/offset-square-svg-font2.svg: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185100
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [SVG -> OTF Converter] Remove unnecessary hacks
+ https://bugs.webkit.org/show_bug.cgi?id=145088
+
+ Reviewed by Simon Fraser.
+
+ Test that the hacks are unnecessary.
+
+ * svg/text/offset-square-svg-font-expected.html: Added.
+ * svg/text/offset-square-svg-font.html: Added.
+ * svg/text/resources/offset-square-svg-font.svg: Added.
+ * svg/text/resources/offset-square-svg-font2.svg: Added.
+
2015-06-01 Zalan Bujtas <zalan@apple.com>
[Mac] Unreviewed gardening.
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "TestFont";
+ src: url("resources/offset-square-svg-font2.svg") format("svg");
+}
+</style>
+</head>
+<body>
+This test makes sure that a glyph which is an offset square is rendered as expected. The test succeeds if you see a square below.
+<div style="font: 40px TestFont;">ab</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "TestFont";
+ src: url("resources/offset-square-svg-font.svg") format("svg");
+}
+</style>
+</head>
+<body>
+This test makes sure that a glyph which is an offset square is rendered as expected. The test succeeds if you see a square below.
+<div style="font: 40px TestFont;">a</div>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
+<defs>
+<font horiz-adv-x="481" id="ascii">
+ <font-face font-family="testfont" units-per-em="1000" ascent="800" descent="-200" alphabetic="0"/>
+<glyph unicode="a" horiz-adv-x="1000" d="M500 0V500H1000V0H500Z"/>
+</font>
+</defs>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
+<defs>
+<font horiz-adv-x="481" id="ascii">
+ <font-face font-family="testfont" units-per-em="1000" ascent="800" descent="-200" alphabetic="0"/>
+<glyph unicode="a" horiz-adv-x="500" d="M0 0Z"/>
+<glyph unicode="b" horiz-adv-x="500" d="M0 0V500H500V0H0Z"/>
+</font>
+</defs>
+</svg>
+2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [SVG -> OTF Converter] Remove unnecessary hacks
+ https://bugs.webkit.org/show_bug.cgi?id=145088
+
+ Reviewed by Simon Fraser.
+
+ Not needed anymore.
+
+ Test: svg/text/offset-square-svg-font.html
+
+ * svg/SVGToOTFFontConversion.cpp:
+ (WebCore::SVGToOTFFontConverter::appendKERNTable):
+ (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
+
2015-06-01 Andreas Kling <akling@apple.com>
CSS animations in filling-forwards state shouldn't force compositing.
size_t sizeOfVerticalSubtable = appendKERNSubtable<SVGVKernElement>(&SVGVKernElement::buildVerticalKerningPair, 0);
ASSERT_UNUSED(sizeOfVerticalSubtable, subtablesOffset + sizeOfHorizontalSubtable + sizeOfVerticalSubtable == m_result.size());
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 101000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED <= 80000)
// Work around a bug in Apple's font parser by adding some padding bytes. <rdar://problem/18401901>
for (int i = 0; i < 6; ++i)
m_result.append(0);
+#endif
}
template <typename V>
processGlyphElement(glyphElement, &glyphElement, defaultHorizontalAdvance, defaultVerticalAdvance, unicodeAttribute, initialGlyph);
}
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 101000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED <= 80000)
// <rdar://problem/20086223> Cocoa has a bug where glyph bounding boxes are not correctly respected for frustum culling. Work around this by
// inflating the font's bounding box
m_boundingBox.extend(FloatPoint(0, 0));
+#endif
appendLigatureGlyphs();