From ec94e03a8ef91442a7aa7509d3925c1626b05300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 9 Apr 2015 22:25:57 +0200 Subject: [PATCH] set the correct v7 default font - also skip layers with empty font names --- src/mbgl/renderer/symbol_bucket.cpp | 4 ++-- 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 c0c732084ed..517c8835c66 100644 --- a/src/mbgl/renderer/symbol_bucket.cpp +++ b/src/mbgl/renderer/symbol_bucket.cpp @@ -45,8 +45,8 @@ std::vector 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 features; diff --git a/src/mbgl/style/style_layout.hpp b/src/mbgl/style/style_layout.hpp index 96daff327e9..90bc71fd6eb 100644 --- a/src/mbgl/style/style_layout.hpp +++ b/src/mbgl/style/style_layout.hpp @@ -61,7 +61,7 @@ class StyleLayoutSymbol { 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 */;