-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[darwin, android, core] Expose "local ideograph font family" in map snapshotters #13427
Conversation
Oh, I almost forgot there's one other change in this PR for macos/iOS -- we also pass the |
We’re not using program caching on iOS because the platform is pretty good at caching the compiled programs internally already. This means subsequent shader compiles will reuse the already compiled version even if we use the regular OpenGL APIs to compile shaders from source. |
Ah, I had forgotten that, thanks. Still probably makes sense to pass through the setting if it's there, just for consistency with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS/macOS piece looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The example you modified currently crashes on startup for unrelated reasons, and after applying a fix from #13444 the value is pushed correctly to the renderer.
return this; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: new line
…ions to MGLMapSnapshotter.
…ions Use local glyph generation in test app's MapSnapshotterActivity.
5103a4b
to
3802c38
Compare
The core part of this PR exposes a "local ideograph font family" option on
MapSnapshotter
and passes it through to the underlying renderer.The darwin implementation picks up the
localFontFamilyName
that's already read out of the application bundle byMGLRendererConfiguration
. I tested this manually in the macosapp, using a breakpoint to ensure that local fonts were being used during snapshot generation.The Android implementation is more of a guess: I added
localIdeographFontFamily
as an option inMapSnapshotter::Options
and hooked it up to the underlying core snapshotter. This seemed closest to the way the rest of the configuration works, but it is unfortunate that it requires the user to pay attention and set the value every time they create aMapSnapshotter
. This might be less of an issue if we change the default value to be enabled. @LukasPaczos or @tobrun I could use input on what you think is the right way to do this. Also I haven't tested at all yet because my Android debug environment is messed up.This continues to be an area with poor test coverage. 😞 The problem is that the behavior is inherently inconsistent between machines.
cc @lloydsheng @chriswu42 @LukasPaczos @julianrex