Repository navigation
Add fallback support to local ideograph font families - #15255
Conversation
|
While running on Android Q beta 4, I'm seeing:
this means that this reflection call is greylisted as is allowed for the time being. Probably because there isn't any other way of checking font avallability outside of the downloadable fonts in https://developers.google.com/fonts/docs/android which requires min api 16 when using the appcompat variant. Long term we will be switching to that setup instead. |
5cd9e17 to
d5ef1c9
Compare
|
On request from @LukasPaczos also verified that this solution works with https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts |
LukasPaczos
left a comment
There was a problem hiding this comment.
Looks good, thanks for running additional tests 👍
d5ef1c9 to
719e3f3
Compare
719e3f3 to
451c98f
Compare
…w setting a collection of fonts
451c98f to
0c7223a
Compare
|
Hi! Do we have any update on this? I would like to know if and how I can use local fonts on my symbol layers. Thanks! |
|
Hey @EBiCS, thanks for using Mapbox! This PR references local ideographs generation, which means that the SDK will not download CJK glyphs but rather generate them locally. If you'd like to use a certain font, it has to be declared in your style using Mapbox Studio. |
This PR matches logic from #14862 and makes #15225 obsolete. Proposed change allows developers to pass in a array of string for localideographfamily and we will check if we can find a valid font and pass that to core. If not, fallback on
sans-serif.Note: I'm currently not satisfied with taken approach, it uses reflection to lookup valid fonts from
TypeFace. Sadly, there isn't an API on the Android SDK to do this cleanly. LMK if you are aware of any.