Commit Graph

1 Commits

Author SHA1 Message Date
Samuel Susla 36b586ada1 Font size in Text now respects preferredContentSizeCategory
Summary:
Changelog: [Internal]

Add support for dynamic font size.

New class `ThreadStorage` is introduced, which is used to pass LayoutContext to `YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector`.

## Shortcoming
This implementation doesn't cause re-render, if user changes font size and comes to the app without restarting it, it will show old font size. I believe this is fine for now as most people set their font size before they use the app and keep the same setting for a long time.

Reviewed By: shergin

Differential Revision: D22043728

fbshipit-source-id: 7453d165c280a2f4bcb73f4ee6daf9e64b637ded
2020-06-17 10:22:32 -07:00