framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.03k stars 3.23k forks source link

[Bug] Respect font scaling #2441

Open Vorror opened 6 years ago

Vorror commented 6 years ago

This is a (multiple allowed):

Actual Behavior

Framework7 does not currently respect the iOS font scaling.

iOS with default font scaling

img_1220 img_1217 img_1218 img_1219

iOS with large font scaling(not working)

img_1221 img_1222 img_1223

Expected Behavior

Respect os font scaling

Background

We have a lot of users who don't use the default iOS font scaling. Here's some tech info in regards to supporting scalable fonts: http://www.interactiveaccessibility.com/blog/text-resizing-web-pages-ios-using-dynamic-type

I can confirm using their test page (http://ia11y.github.io/Coding-Patterns/iOS/text-resizing/resizable-vs-non-resizable-font-ios.html) that the font does scale on iOS devices.

Basically this would require a switch to em font sizes. I see there's a v3 of framework7 in the works, maybe this could be a feature for that version?

Vorror commented 6 years ago

For the most part F7 could simply convert px -> em css:font-size's using a less mixin. Although any parent elements that have hard coded widths/heights would need to be fixed by doing something reasonable(truncating text, line-breaking, etc)

nolimits4web commented 6 years ago

Rewriting all font sizes to em doesn't seem a good option for me. Will take a look what can be done here