Skip to content
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

Support for UIContentSizeCategoryAdjusting #51

Open
ptrkstr opened this issue May 14, 2022 · 1 comment
Open

Support for UIContentSizeCategoryAdjusting #51

ptrkstr opened this issue May 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ptrkstr
Copy link

ptrkstr commented May 14, 2022

Is your feature request related to a problem? Please describe.
Currently apps which utilise UILabel, UITextView and UITextField are able to support dynamic type via opt in of adjustsFontForContentSizeCategory. Once a developer enables this property, users are able to have an app experience that caters to their font size preferences for example:

  • Larger font for users with difficulty seeing.
  • Smaller font for users which want to display more content at once.

Describe the solution you'd like

  • TextView conforms to UIContentSizeCategoryAdjusting.
  • adjustsFontForContentSizeCategory can be set per TextView instance.
  • Internally this updates the fonts for both line number and text editor views.

Describe alternatives you've considered
Without modifying the original source code, a workaround currently is to set a new theme with updated fonts every time a user changes font size. This approach however doesn't seem as performant as only updating internal font properties directly.

Additional context

@ptrkstr ptrkstr added the enhancement New feature or request label May 14, 2022
@simonbs
Copy link
Owner

simonbs commented Jun 17, 2022

This seems like a great idea, and I'd like Runestone's TextView to behave as closely to UITextView as possible, so I think we should add this.

Sorry for the late answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants