diff options
author | Herb Derby <herb@google.com> | 2018-06-18 14:18:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-18 19:09:18 +0000 |
commit | c00d8627ff8adbc9ba49ab6fcbc356c6db9ffb84 (patch) | |
tree | 0a658be5c7c7e71746deac8f6ffeb47479f58153 /src/pdf/SkPDFDevice.cpp | |
parent | dfbfc738a9edfff7a9804253175e380c230f3d21 (diff) |
Use x text skew to position text
This CL fixes b/110225902.
The PDF device was not taking x skew into account when
calculating positions.
Change-Id: I659dfeba0d31c8e1192cd3538b550c48cf5a835c
Reviewed-on: https://skia-review.googlesource.com/135569
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index d8160a0d96..45a9b95915 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1068,7 +1068,7 @@ public: SkPoint position = xy - fCurrentMatrixOrigin; if (position != SkPoint{fXAdvance, 0}) { this->flush(); - SkPDFUtils::AppendScalar(position.x(), fContent); + SkPDFUtils::AppendScalar(position.x() - position.y() * fTextSkewX, fContent); fContent->writeText(" "); SkPDFUtils::AppendScalar(-position.y(), fContent); fContent->writeText(" Td "); |