summaryrefslogtreecommitdiff
path: root/src/mbgl/text
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-11-14 16:58:25 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-12-02 17:11:49 +0200
commit26bf566f535e55c6d82830e3b0f5a2702a0fec42 (patch)
treefde3beaa430e06151b68f6c346bc7b103debd28b /src/mbgl/text
parent2c49c4374cb9e3654c1d347b1071542918ce5fd2 (diff)
downloadqtlocation-mapboxgl-26bf566f535e55c6d82830e3b0f5a2702a0fec42.tar.gz
[core] Use new 'SymbolTextAndIcon' program to draw icons in text
Diffstat (limited to 'src/mbgl/text')
-rw-r--r--src/mbgl/text/glyph.hpp1
-rw-r--r--src/mbgl/text/shaping.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp
index 19a0d037a9..f3f28828ef 100644
--- a/src/mbgl/text/glyph.hpp
+++ b/src/mbgl/text/glyph.hpp
@@ -120,6 +120,7 @@ class Shaping {
// The y offset *should* be part of the font metadata.
static constexpr int32_t yOffset = -17;
bool verticalizable = false;
+ bool iconsInText = false;
};
enum class WritingModeType : uint8_t {
diff --git a/src/mbgl/text/shaping.cpp b/src/mbgl/text/shaping.cpp
index 55e46179b0..b977112d1f 100644
--- a/src/mbgl/text/shaping.cpp
+++ b/src/mbgl/text/shaping.cpp
@@ -429,6 +429,7 @@ void shapeLines(Shaping& shaping,
if (image == imagePositions.end()) {
continue;
}
+ shaping.iconsInText |= true;
const auto& displaySize = image->second.displaySize();
metrics.width = displaySize[0];
metrics.height = displaySize[1];