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

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: Make vertical text look better. 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
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
bungeman-skia 2013/05/10 22:30:36 This is probably a bad solution, it's rather stran
+ if (paint.isVerticalText()) {
+ matrix.postTranslate(0, delta);
+ } else {
+ matrix.postTranslate(delta, 0);
+ }
+
if (iterPath) {
const SkPaint& pnt = iter.getPaint();
if (fDevice) {
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698