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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontOrientation.h

Issue 1404853003: Add SVG Text to support the CSS 'text-orientation' property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drott review Created 5 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/FontOrientation.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontOrientation.h b/third_party/WebKit/Source/platform/fonts/FontOrientation.h
index b7dde29e1eb07d3120a221b3f23c865201c803d7..19d7e5f7c181b78a48605d88d10743f481f0401d 100644
--- a/third_party/WebKit/Source/platform/fonts/FontOrientation.h
+++ b/third_party/WebKit/Source/platform/fonts/FontOrientation.h
@@ -55,6 +55,15 @@ inline bool isVerticalUpright(FontOrientation orientation, UChar32 character)
}
inline bool isVerticalBaseline(FontOrientation orientation) { return orientation != FontOrientation::Horizontal; }
+inline FontOrientation adjustOrientationForCharacterInMixedVertical(FontOrientation orientation, UChar32 character)
+{
+ if (orientation != FontOrientation::VerticalMixed)
+ return orientation;
+ return Character::isUprightInMixedVertical(character)
+ ? FontOrientation::VerticalUpright
+ : FontOrientation::VerticalRotated;
+}
+
} // namespace blink
#endif // FontOrientation_h
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698