A framework for building native applications using React
Fix text layout cache key for maxFontSizeMultiplier (#56960)
Summary: Text layout measurement cache keys currently consider `fontSizeMultiplier` and `allowFontScaling`, but omit `maxFontSizeMultiplier`. When that cap changes, Fabric can reuse a stale measurement even though the effective scaled font size may change. This adds `maxFontSizeMultiplier` to the layout-wise text attribute equality and hash helpers, and covers the cache-key behavior with focused C++ tests. Fixes https://github.com/facebook/react-native/issues/56921. ## Changelog: [GENERAL] [FIXED] - Include `maxFontSizeMultiplier` in Fabric text layout cache keys. Pull Request resolved: https://github.com/facebook/react-native/pull/56960 Test Plan: - `npx --yes clang-format --dry-run --Werror packages/react-native/ReactCommon/react/renderer/textlayoutmanager/tests/TextLayoutManagerTest.cpp` - `git diff --check` I could not run the native gtest target locally from this sparse checkout; the patch adds focused coverage in the existing `TextLayoutManagerTest.cpp` file. Reviewed By: sammy-SC Differential Revision: D106362229 Pulled By: javache fbshipit-source-id: 8977afe60b497344713af437eec48d5340eaed6c
K
KirtiRamchandani committed
98d07b3d45da11d5ced6c8e7e7148eb982dffb5a
Parent: 5fce2de
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 5/27/2026, 9:03:34 AM