diff options
-rw-r--r-- | src/core/SkDraw.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 24c8055716..1739fefcc4 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1896,6 +1896,10 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength, SkMatrix matrix; matrix.setScale(matrixScale, matrixScale); + // Temporarily jam in kFill, so we only ever ask for the raw outline from the cache. + paint.setStyle(SkPaint::kFill_Style); + paint.setPathEffect(NULL); + SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); SkAutoGlyphCache autoCache(paint, NULL, NULL); SkGlyphCache* cache = autoCache.getCache(); @@ -1905,6 +1909,10 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength, TextMapState tms(SkMatrix::I(), constY); TextMapState::Proc tmsProc = tms.pickProc(scalarsPerPosition); + // Now restore the original settings, so we "draw" with whatever style/stroking. + paint.setStyle(origPaint.getStyle()); + paint.setPathEffect(origPaint.getPathEffect()); + while (text < stop) { const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0); if (glyph.fWidth) { |