mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
See [flutter/issue/139689](https://github.com/flutter/flutter/issues/139689) and [flutter/issue/132475](https://github.com/flutter/flutter/issues/132475) Registers all of the possible font weight values for "CupertinoSystemDisplay". The registering of "CupertinoSystemText" was removed, as the fallback will correctly show the right fonts, and this logic does not work for the smaller font due to Apple APIs removing the font weight. The font weights for 800 and 900 had to be added outside of the loop as they were coming back with values different from what was being put in. Before: <img width="250" alt="Screenshot 2023-12-06 at 1 17 11â¯PM" src="https://github.com/flutter/engine/assets/58190796/036231eb-d4e2-4c93-82de-fa62d7ddc7c1"> After: <img width="364" alt="Screenshot 2024-01-03 at 3 15 33â¯PM" src="https://github.com/flutter/engine/assets/58190796/69651f01-d694-4758-9fb5-acf50a1895c4"> [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style