Closed Bug 1196950 Opened 6 years ago Closed 6 years ago
Use font downscaling for (possibly) truncated strings
As shown in the screenshot (see URL), the Dutch locale currently has 1 issue of a truncated string (Add to Bookmarks). I was told this could be avoided/solved by letting the font size scale down to make it fit. It would be nice to have downscaling enabled for any string/locale that may require it.
A few things are happening here. The widget doesn't support accessibility, so the font sizes are set. The systemFontOfSize is 15. On the 4s, 15 looks huge. FontOfSize 14 looks rather close to the visual spec (see attachment—I only changed the 'Add to' strings to give an example). At 14, this localization renders nicely. That said, I'm not really a fan of static size text when it comes to localization, but it's good to have a starting point. Let's decrease systemFontOfSize to 14 if it doesn't cause any regressions elsewhere, or hardcode it to 14, *and* add the option of scaling it down to a minimum of 12 if the string reaches the max character limit. It doesn't make sense to truncate an action.
I left the default size to systemFontOfSize (15), but it now downscales for long strings, as shown in the screenshot. I set the downscale ratio to 0.8. Don't hesitate to tweak the values.
Comment on attachment 8654984 [details] [review] Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/1002 :karim - I applied to font change requested to https://github.com/mozilla/firefox-ios/pull/1016, merge that, and we're good!
Attachment #8654984 - Flags: ui-review?(randersen) → ui-review+
needs someone else to land it I imagine
Looks like :tecgirl's modification needs to be applied to Karim's PR then merged? I see the only difference between the two is the modification of the label text size from system size to 14. Is this correct? I can combine these and merge in int.
Merged fix into master and v1.0 branches.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.