Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp |
index 1366c87c9cc334ef93eb94dbcfe1594dd52ae986..039cd236e70efdbeeb540ecdb5b036ddcc22074c 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp |
@@ -398,6 +398,11 @@ void LayoutSVGInlineText::computeNewScaledFontForStyle( |
fontDescription.specifiedSize(), DoNotUseSmartMinimumForFontSize)); |
scaledFont = Font(fontDescription); |
+ // If the font size is smaller than 3, rounding ascent and descent values |
+ // ignores the baseline shifts for superscript and subscript. In this case, |
+ // we use subpixel ascent and descent. |
+ if (scaledFont.getFontDescription().getSize().value < 3) |
+ scaledFont.getFontDescription().setSubpixelAscentDescent(true); |
eae
2016/10/17 20:14:23
It's not clear that updateScaledFont is guaranteed
zakerinasab
2016/10/18 15:51:16
Correct. The problem is that the rounding at the b
|
scaledFont.update(document.styleEngine().fontSelector()); |
} |