summaryrefslogtreecommitdiff
path: root/src/mbgl/text/font_stack.cpp
diff options
context:
space:
mode:
authorNicki Dlugash <nicki@mapbox.com>2015-06-16 20:33:23 -0400
committerNicki Dlugash <nicki@mapbox.com>2015-07-09 18:52:12 -0400
commitf27bd6b68fc5f3faca29f4a86a5bf8d6ab747aba (patch)
tree091b8f8f3509354f3a41d671c344fc61330419b2 /src/mbgl/text/font_stack.cpp
parent987d961e5bd2a7b9a68c4f05dd8b599eb1357add (diff)
downloadqtlocation-mapboxgl-f27bd6b68fc5f3faca29f4a86a5bf8d6ab747aba.tar.gz
Updates to labels along lines
Added a filter to remove anchors with the same text that are too close to each other. Updates to spacing and offset of anchor placement along lines: Takes into account icon size for calculating label length. Recalculates spacing for long labels. Adjusts offsets to first anchors if line is continued from outside the tile boundary.
Diffstat (limited to 'src/mbgl/text/font_stack.cpp')
-rw-r--r--src/mbgl/text/font_stack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/text/font_stack.cpp b/src/mbgl/text/font_stack.cpp
index 88a739b804..7785a14238 100644
--- a/src/mbgl/text/font_stack.cpp
+++ b/src/mbgl/text/font_stack.cpp
@@ -22,7 +22,7 @@ const Shaping FontStack::getShaping(const std::u32string &string, const float ma
const float lineHeight, const float horizontalAlign,
const float verticalAlign, const float justify,
const float spacing, const vec2<float> &translate) const {
- Shaping shaping(translate.x * 24, translate.y * 24);
+ Shaping shaping(translate.x * 24, translate.y * 24, string);
// the y offset *should* be part of the font metadata
const int32_t yOffset = -17;