Closed Bug 1196950 Opened 8 years ago Closed 8 years ago

Use font downscaling for (possibly) truncated strings


(Firefox for iOS :: Browser, defect)

Not set



Tracking Status
fxios 1.0.5+ ---


(Reporter: Tonnes, Assigned: sleroux)





(3 files)

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.
Attached image 1196950.png
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.
OS: iOS 8 → iOS
Attached image screenshot.png
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.
Flags: needinfo?(randersen)
Assignee: nobody → kbenhmida
Comment on attachment 8654984 [details] [review]
Link to Github pull-request:

:karim - I applied to font change requested to, merge that, and we're good!
Flags: needinfo?(randersen)
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.
Flags: needinfo?(randersen)
Assignee: benhmida.k+bz → sleroux
Flags: needinfo?(randersen)
Merged fix into master and v1.0 branches.
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.