diff options
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 12 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index a933972009..46dff0722a 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1457,6 +1457,18 @@ void SkPDFDevice::drawPosText(const void* text, size_t len, offset, paint, nullptr, 0, nullptr); } +void SkPDFDevice::drawGlyphRunList(SkGlyphRunList* glyphRunList) { + auto blob = glyphRunList->blob(); + + if (blob == nullptr) { + glyphRunList->temporaryShuntToDrawPosText(this, SkPoint::Make(0, 0)); + } else { + auto origin = glyphRunList->origin(); + auto paint = glyphRunList->paint(); + this->drawTextBlob(blob, origin.x(), origin.y(), paint); + } +} + void SkPDFDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint &paint) { for (SkTextBlobRunIterator it(blob); !it.done(); it.next()) { diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index 6077aafd7a..1691baa51e 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -98,6 +98,7 @@ public: const SkScalar pos[], int scalarsPerPos, const SkPoint& offset, const SkPaint&) override; void drawTextBlob(const SkTextBlob*, SkScalar x, SkScalar y, const SkPaint &) override; + void drawGlyphRunList(SkGlyphRunList* glyphRunList) override; void drawVertices(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode, const SkPaint&) override; void drawDevice(SkBaseDevice*, int x, int y, |