Title: [181167] trunk
- Revision
- 181167
- Author
- mmaxfi...@apple.com
- Date
- 2015-03-06 10:21:36 -0800 (Fri, 06 Mar 2015)
Log Message
Test horiz-origin-x and horiz-origin-y in SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=142403
Source/WebCore:
Reviewed by Simon Fraser.
Remove incorrect comment.
Test: svg/fonts/svg-font-horiz-origin.html
* svg/SVGToOTFFontConversion.cpp:
(WebCore::CFFBuilder::CFFBuilder):
LayoutTests:
Simply moving to the origin in glyph-space at the beginning
of path parsing won't work if subsequent coordinates are absolute.
Reviewed by Simon Fraser.
* svg/fonts/resources/svg-font-horiz-origin-font.svg: Added.
* svg/fonts/svg-font-horiz-origin-expected.html: Added.
* svg/fonts/svg-font-horiz-origin.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (181166 => 181167)
--- trunk/LayoutTests/ChangeLog 2015-03-06 18:20:40 UTC (rev 181166)
+++ trunk/LayoutTests/ChangeLog 2015-03-06 18:21:36 UTC (rev 181167)
@@ -1,3 +1,17 @@
+2015-03-06 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Test horiz-origin-x and horiz-origin-y in SVG fonts
+ https://bugs.webkit.org/show_bug.cgi?id=142403
+
+ Simply moving to the origin in glyph-space at the beginning
+ of path parsing won't work if subsequent coordinates are absolute.
+
+ Reviewed by Simon Fraser.
+
+ * svg/fonts/resources/svg-font-horiz-origin-font.svg: Added.
+ * svg/fonts/svg-font-horiz-origin-expected.html: Added.
+ * svg/fonts/svg-font-horiz-origin.html: Added.
+
2015-03-06 Said Abou-Hallawa <sabouhall...@apple.com>
An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
Added: trunk/LayoutTests/svg/fonts/resources/svg-font-horiz-origin-font.svg (0 => 181167)
--- trunk/LayoutTests/svg/fonts/resources/svg-font-horiz-origin-font.svg (rev 0)
+++ trunk/LayoutTests/svg/fonts/resources/svg-font-horiz-origin-font.svg 2015-03-06 18:21:36 UTC (rev 181167)
@@ -0,0 +1,21 @@
+<?xml version="1.0" standalone="yes"?>
+<svg version="1.1" viewBox="0 0 160 160" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <font id="Litherum" horiz-adv-x="1000">
+ <font-face font-family="Litherum" font-weight="normal" font-style="normal" units-per-em="1000" cap-height="600" x-height="400" ascent="1000" descent="0" alphabetic="0" mathematical="500" ideographic="400" hanging="500">
+ <font-face-src>
+ <font-face-name name="Litherum"/>
+ </font-face-src>
+ </font-face>
+ <glyph unicode="A" horiz-adv-x="1000" d="M 500 0 H 1000 V 600 H 500 z"/>
+ </font>
+ <font id="Litherum2" horiz-adv-x="1000" horiz-origin-x="500" horiz-origin-y="300">
+ <font-face font-family="Litherum" font-weight="normal" font-style="normal" units-per-em="1000" cap-height="600" x-height="400" ascent="1000" descent="0" alphabetic="0" mathematical="500" ideographic="400" hanging="500">
+ <font-face-src>
+ <font-face-name name="Litherum"/>
+ </font-face-src>
+ </font-face>
+ <glyph unicode="A" horiz-adv-x="1000" d="M 0 -300 H 500 V 300 H 0 z"/>
+ </font>
+ </defs>
+</svg>
Added: trunk/LayoutTests/svg/fonts/svg-font-horiz-origin-expected.html (0 => 181167)
--- trunk/LayoutTests/svg/fonts/svg-font-horiz-origin-expected.html (rev 0)
+++ trunk/LayoutTests/svg/fonts/svg-font-horiz-origin-expected.html 2015-03-06 18:21:36 UTC (rev 181167)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: 'Litherum';
+ src: url("resources/svg-font-horiz-origin-font.svg#Litherum2") format(svg)
+}
+</style>
+</head>
+<body>
+This test makes sure that the horiz-origin-x and horiz-origin-y attributes are correctly converted.
+<div><span style="font: 48px Litherum;">AAA</span>AAA</div>
+</body>
+</html>
Added: trunk/LayoutTests/svg/fonts/svg-font-horiz-origin.html (0 => 181167)
--- trunk/LayoutTests/svg/fonts/svg-font-horiz-origin.html (rev 0)
+++ trunk/LayoutTests/svg/fonts/svg-font-horiz-origin.html 2015-03-06 18:21:36 UTC (rev 181167)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: 'Litherum';
+ src: url("resources/svg-font-horiz-origin-font.svg#Litherum") format(svg)
+}
+</style>
+</head>
+<body>
+This test makes sure that the horiz-origin-x and horiz-origin-y attributes are correctly converted.
+<div><span style="font: 48px Litherum;">AAA</span>AAA</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (181166 => 181167)
--- trunk/Source/WebCore/ChangeLog 2015-03-06 18:20:40 UTC (rev 181166)
+++ trunk/Source/WebCore/ChangeLog 2015-03-06 18:21:36 UTC (rev 181167)
@@ -1,3 +1,17 @@
+2015-03-06 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Test horiz-origin-x and horiz-origin-y in SVG fonts
+ https://bugs.webkit.org/show_bug.cgi?id=142403
+
+ Reviewed by Simon Fraser.
+
+ Remove incorrect comment.
+
+ Test: svg/fonts/svg-font-horiz-origin.html
+
+ * svg/SVGToOTFFontConversion.cpp:
+ (WebCore::CFFBuilder::CFFBuilder):
+
2015-03-06 Simon Fraser <simon.fra...@apple.com>
Allow tree dumping functions to be used in release builds by switching a flag
Modified: trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp (181166 => 181167)
--- trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp 2015-03-06 18:20:40 UTC (rev 181166)
+++ trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp 2015-03-06 18:21:36 UTC (rev 181167)
@@ -1051,7 +1051,6 @@
: m_cffData(cffData)
, m_hasBoundingBox(false)
{
- // FIXME: Moving to the origin isn't going to work for subsequent absolute coordinates
writeCFFEncodedNumber(m_cffData, width);
writeCFFEncodedNumber(m_cffData, origin.x());
writeCFFEncodedNumber(m_cffData, origin.y());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes