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

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: fs 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
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..6585152f8318ed018a1f11e2b71cd7d33fe54ddc 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 resolveMixedFontOrientation(FontOrientation orientation, UChar32 character)
drott 2015/10/19 07:00:04 How about adjustOrientationForCharacterInMixedVert
+{
+ if (orientation != FontOrientation::VerticalMixed)
+ return orientation;
+ return Character::isUprightInMixedVertical(character)
+ ? FontOrientation::VerticalUpright
+ : FontOrientation::VerticalRotated;
+}
+
} // namespace blink
#endif // FontOrientation_h

Powered by Google App Engine
This is Rietveld 408576698