diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-04-09 22:50:32 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-04-09 22:50:32 +0200 |
commit | a22c2dd0a1aa14673bf3da5beb774f8218e36b4c (patch) | |
tree | 7ebc3c1d5d5ce9ec0c068db6379f2e8a4c3bff17 | |
parent | 6efce53e2946192f8146f882300ef708e82190e4 (diff) | |
parent | ec94e03a8ef91442a7aa7509d3925c1626b05300 (diff) | |
download | qtlocation-mapboxgl-a22c2dd0a1aa14673bf3da5beb774f8218e36b4c.tar.gz |
Merge pull request #1237 from mapbox/1237-text-font-function
404 errors when style uses functions for text-font
-rw-r--r-- | src/mbgl/renderer/symbol_bucket.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/style/style_layout.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/renderer/symbol_bucket.cpp b/src/mbgl/renderer/symbol_bucket.cpp index c0c732084e..517c8835c6 100644 --- a/src/mbgl/renderer/symbol_bucket.cpp +++ b/src/mbgl/renderer/symbol_bucket.cpp @@ -45,8 +45,8 @@ std::vector<SymbolFeature> SymbolBucket::processFeatures(const GeometryTileLayer const FilterExpression& filter, GlyphStore &glyphStore, const Sprite &sprite) { - const bool has_text = layout.text.field.size(); - const bool has_icon = layout.icon.image.size(); + const bool has_text = !layout.text.field.empty() && !layout.text.font.empty(); + const bool has_icon = !layout.icon.image.empty(); std::vector<SymbolFeature> features; diff --git a/src/mbgl/style/style_layout.hpp b/src/mbgl/style/style_layout.hpp index 96daff327e..90bc71fd6e 100644 --- a/src/mbgl/style/style_layout.hpp +++ b/src/mbgl/style/style_layout.hpp @@ -61,7 +61,7 @@ public: struct { RotationAlignmentType rotation_alignment = RotationAlignmentType::Viewport; std::string field; - std::string font; + std::string font = "Open Sans Regular, Arial Unicode MS Regular"; float max_size = 16.0f; float max_width = 15.0f /* em */; float line_height = 1.2f /* em */; |