mapbox / mapbox-gl-native-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
218 stars 116 forks source link

CJK Glyph rasterization disabled by default in 9.6 release #649

Open ChrisLoer opened 3 years ago

ChrisLoer commented 3 years ago

PR https://github.com/mapbox/mapbox-gl-native-android/pull/601 introduced support for the "Glyph Rasterization Mode" capability, and the intent was to preserve the previous default of "rasterize ideographs locally". However, I believe the createFromAttributes code defaults to 0 -- aka "no glyphs rasterized locally".

https://github.com/mapbox/mapbox-gl-native-android/blob/e0decc2a3ba7567794ffbdc37171ee53d3115307/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java#L306-L307

  int rasterizationMode = typedArray.getInt(R.styleable.mapbox_MapView_mapbox_glyphRasterizationMode, 0);
  mapboxMapOptions.setRasterizationMode(GlyphsRasterizationMode.valueOf(rasterizationMode));

I believe the "0" passed as a default value to getInt is equivalent to "no glyphs rasterized locally".

A customer noticed this regression in the Nav SDK for the lucky (?) reason that one of our server-side fonts was broken -- but the real issue here is that turning off local fonts is a huge performance regression for Japanese customers.

@Chaoba @OttyLab @LukasPaczos @tobrun

tobrun commented 3 years ago

Thanks for flagging @ChrisLoer!

cc @sbma44 @knov

ChrisLoer commented 3 years ago

Any updates on triage here? It'd be nice to get a fix into a patch release -- as is we risk hitting existing customers with a perf regression when they upgrade SDK versions (eroding trust), and potential new customers in Japan will be almost sure to run into it.