From 62039fd9903ee4dfdbec394fe69531fdb2b07ee1 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Wed, 15 May 2024 19:34:27 -0700 Subject: [PATCH] come on golden diff. --- impeller/typographer/backends/skia/text_frame_skia.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/impeller/typographer/backends/skia/text_frame_skia.cc b/impeller/typographer/backends/skia/text_frame_skia.cc index d39e36ad2bd44..fdf2b3d68a559 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.cc +++ b/impeller/typographer/backends/skia/text_frame_skia.cc @@ -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 MakeTextFrameFromTextBlobSkia( const sk_sp& blob) { @@ -59,7 +59,8 @@ std::shared_ptr 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);