summaryrefslogtreecommitdiff
path: root/platform/macos
diff options
context:
space:
mode:
authorm-stephen <truestyle2005@163.com>2019-07-16 11:39:34 +0800
committerGitHub <noreply@github.com>2019-07-16 11:39:34 +0800
commitd2434d07517619d390e2e1f4b7952f6cf2c9e4ff (patch)
tree80f44eb79ebf47dd2fb7ebf1a5a8835615d61ec9 /platform/macos
parent3c488e05efdb9415e658fa820504692b906c3443 (diff)
downloadqtlocation-mapboxgl-d2434d07517619d390e2e1f4b7952f6cf2c9e4ff.tar.gz
[ios , macos] Exclude CJK resources from offline download by default (#14952)
* [iOS, macOS] exclude CJK glyphs resources download by default. * [iOS, macOS] update iosapp * [iOS, macOS] update macOS * [iOS, macOS] update iOS change log * [iOS, macOS] update macOS change log * [iOS, macOS] update comment & add test cases * Update platform/darwin/test/MGLOfflineRegionTests.m Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com> * Update platform/darwin/test/MGLOfflineRegionTests.m Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com> * Update platform/darwin/test/MGLOfflineRegionTests.m Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com> * Update platform/ios/CHANGELOG.md Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com> * Update platform/macos/CHANGELOG.md Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com> * Update platform/darwin/test/MGLOfflineRegionTests.m Co-Authored-By: Jason Wray <friedbunny@users.noreply.github.com>
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/CHANGELOG.md2
-rw-r--r--platform/macos/app/MapDocument.m4
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 8ca6391ff3..49dd5ff53a 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -4,11 +4,11 @@
* Added an `MGLMapView.prefetchesTiles` property to configure lower-resolution tile prefetching behavior. ([#14816](https://github.com/mapbox/mapbox-gl-native/pull/14816))
* Fixed queryRenderedFeatues bug caused by incorrect sort feature index calculation. ([#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884))
+* Ideographic glyphs from Chinese, Japanese, and Korean are no longer downloaded by default as part of offline packs; they are instead rendered on-device, saving bandwidth and storage while improving performance. ([#14176](https://github.com/mapbox/mapbox-gl-native/pull/14176))
* The `MGLIdeographicFontFamilyName` Info.plist key now also accepts an array of font family names, to customize font fallback behavior. It can also be set to a Boolean value of `NO` to force the SDK to typeset CJK characters in a remote font specified by `MGLSymbolStyleLayer.textFontNames`. ([#14862](https://github.com/mapbox/mapbox-gl-native/pull/14862))
* Performance improvements for queryRenderedFeatures API and optimization that allocates containers based on a number of rendered layers. ([#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930))
* Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering. ([#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065))
-
### Styles and rendering
* Setting `MGLMapView.contentInset` now moves the map’s focal point to the center of the content frame after insetting. ([#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664))
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m
index 213aa33107..1ab8b690b9 100644
--- a/platform/macos/app/MapDocument.m
+++ b/platform/macos/app/MapDocument.m
@@ -932,8 +932,8 @@ NSArray<id <MGLAnnotation>> *MBXFlattenedShapes(NSArray<id <MGLAnnotation>> *sha
self.minimumOfflinePackZoomLevelFormatter.maximum = @(ceil(self.mapView.maximumZoomLevel));
self.maximumOfflinePackZoomLevelFormatter.maximum = @(ceil(self.mapView.maximumZoomLevel));
- NSString *fontFamilyName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLIdeographicFontFamilyName"];
- self.includesIdeographicGlyphsBox.state = fontFamilyName ? NSOffState : NSOnState;
+ id ideographicFontFamilyName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLIdeographicFontFamilyName"];
+ self.includesIdeographicGlyphsBox.state = ([ideographicFontFamilyName isKindOfClass:[NSNumber class]] && ![ideographicFontFamilyName boolValue]) ? NSOffState : NSOnState;
[self.addOfflinePackWindow makeFirstResponder:self.offlinePackNameField];
__weak __typeof__(self) weakSelf = self;