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

Implement self-resizing fonts using scaledFont(:) for dynamic text #229

Open
hybridcattt opened this issue Jul 14, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@hybridcattt
Copy link
Member

hybridcattt commented Jul 14, 2020

Summary

Right now fonts throughout the app are not self-resizing. They only look at textStyle when created, and don't update when text sizing settings change. Currently some custom views subscribe to traitCollectionDidChange, where fonts are reapplied to the UI elements.

Fonts created via scaledFont(:) font function don't require additional logic to re-apply fonts on labels, as font objects themselves update internally.

Working on this ticket involves modifying dynamicFont(...) function and removing custom font re-application code currently sprinkled throughout the app.

Expected behaviour

When text size is changed in accessibility settings, views throughout the app update automatically to reflect the new text size.

How does it improve the project?

Using a native solution to the problem and having less custom code in the app increases maintainability of the codebase.

Moved from Trello:
https://trello.com/c/mOaYUyR2/88-implement-self-resizing-fonts-using-scaledfont

@hybridcattt hybridcattt added the enhancement New feature or request label Jul 14, 2020
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

1 participant