react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Text: adjustsFontSizeToFit just redrawing won't recalculate the layout

Open iamAbhi-916 opened this issue 7 months ago • 0 comments

Problem Description

adjustsFontSizeToFit affects the actual text layout calculation - it may change the font size used to fit the text within the available space Simply redrawing won't recalculate the layout with the new sizing behavior.

https://github.com/microsoft/react-native-windows/blob/248255e4f657a9cbb0ee06c916db69e03f233326/vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp#L70

Steps To Reproduce

text sample from playground.

Expected Results

recalculate the layout when the text is sized to fit within its container not just redraw.

CLI version

17.0.0

Environment

S C:\Users\abhijeetjha\Documents\RNW\react-native-windows> npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26100
  CPU: "(16) x64 AMD EPYC 7763 64-Core Processor                "
  Memory: 38.25 GB / 63.95 GB
Binaries:
  Node:
    version: 18.20.8
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\ProgramData\global-npm\yarn.CMD
  npm:
    version: 10.8.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.19041.0
      - 10.0.22621.0
      - 10.0.26100.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.14.36127.28 (Visual Studio Enterprise 2022)
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

No response

Target React Native Architecture

New Architecture (WinAppSDK) Only

Target Platform Version

None

Visual Studio Version

Visual Studio 2022 Preview

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

No response

iamAbhi-916 avatar Jun 20 '25 08:06 iamAbhi-916