| Index: src/core/SkTextBlob.cpp
|
| diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp
|
| index 4ba7df8a7da222f832f90eb4dd1d741181015e7a..d1a77e74f7efdcc831a6768f8314abc426e9e4e1 100644
|
| --- a/src/core/SkTextBlob.cpp
|
| +++ b/src/core/SkTextBlob.cpp
|
| @@ -382,16 +382,7 @@
|
| SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() ||
|
| SkTextBlob::kHorizontal_Positioning == run.positioning());
|
|
|
| - SkPaint paint;
|
| - run.font().applyToPaint(&paint);
|
| - const SkRect fontBounds = paint.getFontBounds();
|
| - if (fontBounds.isEmpty()) {
|
| - // Empty font bounds are likely a font bug. TightBounds has a better chance of
|
| - // producing useful results in this case.
|
| - return TightRunBounds(run);
|
| - }
|
| -
|
| - // Compute the glyph position bbox.
|
| + // First, compute the glyph position bbox.
|
| SkRect bounds;
|
| switch (run.positioning()) {
|
| case SkTextBlob::kHorizontal_Positioning: {
|
| @@ -419,6 +410,9 @@
|
| }
|
|
|
| // Expand by typeface glyph bounds.
|
| + SkPaint paint;
|
| + run.font().applyToPaint(&paint);
|
| + const SkRect fontBounds = paint.getFontBounds();
|
| bounds.fLeft += fontBounds.left();
|
| bounds.fTop += fontBounds.top();
|
| bounds.fRight += fontBounds.right();
|
|
|