Skip to content

Scale text on Cupertino widgets to match iOS text sizes #12158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gspencergoog opened this issue Sep 19, 2017 · 1 comment
Open

Scale text on Cupertino widgets to match iOS text sizes #12158

gspencergoog opened this issue Sep 19, 2017 · 1 comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: fidelity Matching the OEM platforms better f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team

Comments

@gspencergoog
Copy link
Contributor

gspencergoog commented Sep 19, 2017

For Cupertino widgets, we need to figure out how to scale our text sizes so that when someone asks for a "headline" or other named sizes on iOS, they get the size that they expect.

On Android, there is a single FONT_SCALE (a double) that scales the font based on a system preference, but on iOS, the font size preference doesn't scale linearly with the different font usages. For instance, an Extra Extra Extra Large headline on iOS is 18% larger, whereas a footnote is only 15% larger, and an "Extra Large" headline is 5% larger, while an "Extra Large" caption3 doesn't change size at all.

iOS Font Size Table
(table from this stackoverflow post)

In order to make sure that Cupertino assets get the sizes that match what iOS does, we'll probably need to change the tables in typography.dart so that instead of fixed values for the font sizes, we do something more clever on each platform based on the preferred type size and the usage for the font.

@Hixie
Copy link
Contributor

Hixie commented Oct 10, 2017

Actually it might all be linear. It looks like it's roughly 1.4 from X Small to XXX Large, if you assume that the values above are rounded to the nearest pixel. (That is, if you assume there's an error of plus or minus 0.5 in the first and last column, you can get 1.4 to multiply from the first column to the last column.)

@Hixie Hixie added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically labels Nov 1, 2017
@Hixie Hixie added this to the 3: Current Milestone milestone Nov 1, 2017
@Hixie Hixie changed the title Need to figure out how to scale text on Cupertino widgets to match iOS text sizes Scale text on Cupertino widgets to match iOS text sizes Dec 20, 2017
@goderbauer goderbauer modified the milestones: 3: Current Milestone, 5: Make Hixie proud Dec 20, 2017
@goderbauer goderbauer added the f: cupertino flutter/packages/flutter/cupertino repository label Dec 28, 2018
@HansMuller HansMuller added the a: fidelity Matching the OEM platforms better label May 14, 2019
@Hixie Hixie modified the milestones: Stretch Goals, New Stretch Goals Jan 7, 2020
@kf6gpe kf6gpe added the P3 Issues that are less important to the Flutter project label May 29, 2020
@kf6gpe kf6gpe modified the milestone: Stretch Goals Jun 1, 2020
@Hixie Hixie removed this from the [DEPRECATED] Stretch Goals milestone Jun 16, 2020
@kf6gpe kf6gpe removed this from the [DEPRECATED] Stretch Goals milestone Jul 7, 2020
@kf6gpe kf6gpe modified the milestone: [DEPRECATED] Stretch Goals Jul 22, 2020
@Hixie Hixie removed this from the - milestone Aug 17, 2020
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: fidelity Matching the OEM platforms better f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy