Repository navigation
Don't force downloading of Open Sans fonts - #11055
Conversation
When a SymbolLayer doesn't have a text-font defined, we automatically add Open Sans/Arial Unicode MS. However, when the SymbolLayer is only used for rendering icons, it doesn't have text-field defined either. In those cases, we still force downloading Open Sans/Arial Unicode MS during offline pack creation. If the user doesn't use this font, this change should save ~15MB and a few seconds in download time.
asheemmamoowala
left a comment
There was a problem hiding this comment.
This could break apps that have styles without font-stack and font-text property but use the runtime APIs to add symbol layers.
Would be good to add a note to the [Offline Maps] (https://www.mapbox.com/help/mobile-offline/) documentation.
This is correct, however, using runtime-styling with offline downloads is a slipperly slope anyway; e.g. you can also use any other kind of font that isn't available offline. However, this PR does change the behavior to the default font not being available offline by default. |
This ended up being part of the confusion in: #12167 (comment) |
When a
SymbolLayerdoesn't have atext-fontdefined, we automatically add Open Sans/Arial Unicode MS. However, when theSymbolLayeris only used for rendering icons, it doesn't havetext-fielddefined either. In those cases, we still force downloading Open Sans/Arial Unicode MS during offline pack creation. If the user doesn't use this font, this change should save ~15MB and a few seconds in download time.