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

Unified Diff: src/core/SkDraw.cpp

Issue 15064003: Fix vertical text scaling on Mac. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Work with OTF CFF fonts too. Created 7 years, 7 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: src/core/SkDraw.cpp
===================================================================
--- src/core/SkDraw.cpp (revision 9039)
+++ src/core/SkDraw.cpp (working copy)
@@ -1427,7 +1427,13 @@
SkScalar xpos, prevXPos = 0;
while (iter.next(&iterPath, &xpos)) {
- matrix.postTranslate(xpos - prevXPos, 0);
+ SkScalar delta = xpos - prevXPos;
+ if (paint.isVerticalText()) {
+ matrix.postTranslate(0, delta);
+ } else {
+ matrix.postTranslate(delta, 0);
+ }
+
if (iterPath) {
const SkPaint& pnt = iter.getPaint();
if (fDevice) {

Powered by Google App Engine
This is Rietveld 408576698