Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2427773002: Fixing superscript and subscript baseline for tiny fonts in SVG
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index a524f21e5166f32b51ee07716c6c958384762ea0..ab826e9b0893c4d0e4e06e510d4202a9f7850419 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -1721,6 +1721,9 @@ float LayoutText::width(unsigned from,
if (!textLength())
return 0;
+ // This should not be needed here. Still if we remove it, the
+ // subpixel ascent / descent wont work.
+ f.getFontDescription().setSubpixelAscentDescent(true);
const SimpleFontData* fontData = f.primaryFont();
DCHECK(fontData);
if (!fontData)

Powered by Google App Engine
This is Rietveld 408576698