Skip to content

Commit

Permalink
come on golden diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams committed May 16, 2024
1 parent f6195e9 commit 62039fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions impeller/typographer/backends/skia/text_frame_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static Rect ToRect(const SkRect& rect) {
return Rect::MakeLTRB(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
}

static constexpr Scalar kScaleSize = 100000.0f;
static constexpr Scalar kScaleSize = 64.0f;

std::shared_ptr<TextFrame> MakeTextFrameFromTextBlobSkia(
const sk_sp<SkTextBlob>& blob) {
Expand All @@ -59,7 +59,8 @@ std::shared_ptr<TextFrame> MakeTextFrameFromTextBlobSkia(
// For some platforms (including Android), `SkFont::getBounds()` snaps
// the computed bounds to integers. And so we scale up the font size
// prior to fetching the bounds to ensure that the returned bounds are
// always precise enough.
// always precise enough. Scaling too large will cause Skia to use
// path rendering and potentially inaccurate glyph sizes.
font.setSize(kScaleSize);
font.getBounds(glyphs, glyph_count, glyph_bounds.data(), nullptr);

Expand Down

0 comments on commit 62039fd

Please sign in to comment.