Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 62039fd

Browse files
author
jonahwilliams
committed
come on golden diff.
1 parent f6195e9 commit 62039fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

impeller/typographer/backends/skia/text_frame_skia.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static Rect ToRect(const SkRect& rect) {
3636
return Rect::MakeLTRB(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
3737
}
3838

39-
static constexpr Scalar kScaleSize = 100000.0f;
39+
static constexpr Scalar kScaleSize = 64.0f;
4040

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

0 commit comments

Comments
 (0)