You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
CoreThe cross-platform C++ core, aka mbglMapKit parityFor feature parity with MapKit on iOS or macOSaccessibilityIntegration with screen readers and other assistive technologyarchivedArchived because of inactivityfeature
Mapbox API should have support for font size scaling. This enables applications to better adapt their interfaces for people with visual impairment.
Font size scaling information comes from client side. I propose a fontScale getter/setter in mbgl::Map class that defaults to 1.0 (float). This value acts as a multiplier when rendering fonts, with higher values increasing the font sizes specified in the style, and lower values decreasing accordingly.
I agree; iOS also has system-wide settings that allow increasing the font size, and developers should be able to forward that setting to Mapbox GL. I imagine Android has a similar setting.
I'm looking now at Apple Maps on iOS with the largest font option; they basically only scale up text, and it seems pretty good. The label density is very low of course, but I'm not sure it would be possible or even desirable to try to maintain too much density. I'm also not sure scaling up other features will get us much more accessibility than just zooming in/out and/or using the native zoom feature (which on iOS anyway seems to work pretty well even though it decreases resolution).
Apple also scales up all icons with text, e.g. highway shields, which would also be necessary for us to do. They don't scale up other icons, but, as @andreasviglakis mentioned, that might be useful too (and maybe even easier? Since our sprites assets are svgs and we can probably just output a larger sprite?)
If we need to dynamically adjust any other properties due to the increased font size, would that be an option? I think most (if not all) will be fine, but perhaps something like symbol-spacing might need to be adjusted.
One approach might be to start with OS accessibility settings affecting just text, then see how that plays, then even consider a GL style spec option for specifying other features that could vary this way?
CoreThe cross-platform C++ core, aka mbglMapKit parityFor feature parity with MapKit on iOS or macOSaccessibilityIntegration with screen readers and other assistive technologyarchivedArchived because of inactivityfeature
Activity
kkaefer commentedon Sep 28, 2015
I agree; iOS also has system-wide settings that allow increasing the font size, and developers should be able to forward that setting to Mapbox GL. I imagine Android has a similar setting.
friedbunny commentedon Sep 28, 2015
Cool idea, on the platform level this would be simple to hook up.
mikemorris commentedon Sep 28, 2015
👍
ansis commentedon Sep 28, 2015
Should we scale everything instead of only text?
@andreasviglakis @nickidlugash what do you think would be preferable from a design perspective?
andreasviglakis commentedon Sep 28, 2015
would it have to be all or nothing? i can imagine scenarios where we'd only want fonts and sprites to be enlarged.
tobrun commentedon Sep 28, 2015
Yes, we can use font scale attribute for that
ansis commentedon Sep 28, 2015
It's definitely possible to scale only text/icons
nickidlugash commentedon Sep 28, 2015
I'm looking now at Apple Maps on iOS with the largest font option; they basically only scale up text, and it seems pretty good. The label density is very low of course, but I'm not sure it would be possible or even desirable to try to maintain too much density. I'm also not sure scaling up other features will get us much more accessibility than just zooming in/out and/or using the native zoom feature (which on iOS anyway seems to work pretty well even though it decreases resolution).
Apple also scales up all icons with text, e.g. highway shields, which would also be necessary for us to do. They don't scale up other icons, but, as @andreasviglakis mentioned, that might be useful too (and maybe even easier? Since our sprites assets are svgs and we can probably just output a larger sprite?)
If we need to dynamically adjust any other properties due to the increased font size, would that be an option? I think most (if not all) will be fine, but perhaps something like
symbol-spacingmight need to be adjusted.incanus commentedon Sep 28, 2015
One approach might be to start with OS accessibility settings affecting just text, then see how that plays, then even consider a GL style spec option for specifying other features that could vary this way?
brunoabinader commentedon Sep 28, 2015
👍 for text as a start point. However, @andreasviglakis pointed out that some sprites (eg. highway shields) would need to be scaled as well.
1ec5 commentedon Nov 11, 2016
#7030 is another take that would happen entirely at the SDK level (depending on some mbgl changes that have to happen anyways for other features).
felixLam commentedon Aug 18, 2017
For anyone interested we have open-sourced a "simple" approach to adjusting the fonts to match the user's preferred content size: https://github.com/iosphere/ISHMapboxDynamicFontObserver
stale commentedon Dec 1, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.