Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Cherry picks client-side rendering of CJK glyphs into release-agua - #10817

Merged
fabian-guerra merged 10 commits into
release-aguafrom
fabian-cp-10522
Jan 3, 2018
Merged

fabian-guerra merged 10 commits into
release-aguafrom
fabian-cp-10522

Conversation

@fabian-guerra

Copy link
Copy Markdown
Contributor

Cherry picks the iOS/macOS code from #10522 into release-agua

ChrisLoer and others added 8 commits January 2, 2018 12:06
…rizer.

 - Changing font weight does not currently appear to be working.
 - Glyph metric extraction code not working; currently unused.
Adding a MGLIdeographicFontFamilyName to the containing app's Info.plist
will result in CJK glyphs being rasterized on demand (#10522)
Instructions for enabling client-side rendering of CJK glyphs live in
this header, and this class provides the rest of the values needed for
instantiating the renderer on iOS and macOS.
Also removes related dead code in macos MGLMapView.mm
…code.

Add local font family to default iosapp configuration.
Original GL JS name was meant to represent "font family to use for locally generating ideographs", but "ideographic font family" communicates a similar intent more concisely.
@fabian-guerra fabian-guerra added this to the ios-v3.7.3 milestone Jan 2, 2018
@fabian-guerra fabian-guerra self-assigned this Jan 2, 2018
@fabian-guerra fabian-guerra added iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS labels Jan 2, 2018
@akitchen

akitchen commented Jan 2, 2018

Copy link
Copy Markdown
Contributor

Seems straightforward enough. I'm testing the changes locally now.

Note that we'll also want to merge in #10712 in order for this functionality to be enabled by default.

@akitchen

akitchen commented Jan 2, 2018

Copy link
Copy Markdown
Contributor

The build failures are real:

In file included from /Users/bob/workspace/mapbox-gl-native/platform/ios/src/MGLMapView.mm:45:
/Users/bob/workspace/mapbox-gl-native/platform/darwin/src/MGLRendererConfiguration.h:3:9: fatal error: 'mbgl/renderer/mode.hpp' file not found
#import <mbgl/renderer/mode.hpp>
        ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

@ChrisLoer

Copy link
Copy Markdown
Contributor

After locally changing the mode.hpp include path, it's working locally for me in the ios app.

Note that we'll also want to merge in #10712 in order for this functionality to be enabled by default.

Agree we should port that change, but just to be clear -- it still shouldn't be enabled by default in the SDK, we just want the documentation and iosapp example to be clearer

@akitchen

akitchen commented Jan 2, 2018

Copy link
Copy Markdown
Contributor

it still shouldn't be enabled by default in the SDK, we just want the documentation and iosapp example to be clearer

yes, this simply provides an example of a working configuration for our sample app. The SDK functionality remains disabled by default.

@fabian-guerra

Copy link
Copy Markdown
Contributor Author

@akitchen @ChrisLoer with the last change this branch is compiling.

@akitchen akitchen changed the title Cherry picks 10522 into release-agua Cherry picks client-side rendering of CJK glyphs into release-agua Jan 3, 2018
@akitchen

akitchen commented Jan 3, 2018

Copy link
Copy Markdown
Contributor

OK, #10712 has been merged into master. @fabian-guerra if you could add that commit I think we'll be good to go.

Also updates the font to use for rendering CJK ideographs in our sample
apps to `PingFang TC`, as simply specifying `PingFang` was always
triggering iOS's font fallback behavior.

[Fixes #10675]
@fabian-guerra

Copy link
Copy Markdown
Contributor Author

@akitchen @ChrisLoer added #10712 into this PR

@ChrisLoer ChrisLoer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Coveralls failure looks spurious to me.

@fabian-guerra
fabian-guerra merged commit 760ef23 into release-agua Jan 3, 2018
@fabian-guerra
fabian-guerra deleted the fabian-cp-10522 branch January 3, 2018 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants