summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-04-09 22:50:32 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-04-09 22:50:32 +0200
commita22c2dd0a1aa14673bf3da5beb774f8218e36b4c (patch)
tree7ebc3c1d5d5ce9ec0c068db6379f2e8a4c3bff17
parent6efce53e2946192f8146f882300ef708e82190e4 (diff)
parentec94e03a8ef91442a7aa7509d3925c1626b05300 (diff)
downloadqtlocation-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.cpp4
-rw-r--r--src/mbgl/style/style_layout.hpp2
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 */;