diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-02 18:30:40 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-03 11:45:17 +0300 |
commit | 3b5a43c722e3dda1c05c37787296eab456614a77 (patch) | |
tree | 14bd39ed532a2087f883b5c16ecea51023ad2cf9 /test | |
parent | 0fa5944f39854f42c86ce478da8869a8d4e3f1fe (diff) | |
download | qtlocation-mapboxgl-3b5a43c722e3dda1c05c37787296eab456614a77.tar.gz |
[core] Enable `text-offset` with variable label placement
Port of https://github.com/mapbox/mapbox-gl-js/pull/8642
Diffstat (limited to 'test')
-rw-r--r-- | test/text/cross_tile_symbol_index.test.cpp | 3 | ||||
-rw-r--r-- | test/text/shaping.test.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/text/cross_tile_symbol_index.test.cpp b/test/text/cross_tile_symbol_index.test.cpp index 11d6fc7de3..4ff84063f9 100644 --- a/test/text/cross_tile_symbol_index.test.cpp +++ b/test/text/cross_tile_symbol_index.test.cpp @@ -13,12 +13,13 @@ SymbolInstance makeSymbolInstance(float x, float y, std::u16string key) { Anchor anchor(x, y, 0, 0); std::array<float, 2> textOffset{{0.0f, 0.0f}}; std::array<float, 2> iconOffset{{0.0f, 0.0f}}; + std::array<float, 2> variableTextOffset{{0.0f, 0.0f}}; style::SymbolPlacementType placementType = style::SymbolPlacementType::Point; auto sharedData = std::make_shared<SymbolInstanceSharedData>(std::move(line), shaping, nullopt, nullopt, layout_, placementType, textOffset, positions, false); - return SymbolInstance(anchor, std::move(sharedData), shaping, nullopt, nullopt, 0, 0, placementType, textOffset, 0, 0, iconOffset, subfeature, 0, 0, key, 0.0f, 0.0f, 0.0f, 0.0f, false); + return SymbolInstance(anchor, std::move(sharedData), shaping, nullopt, nullopt, 0, 0, placementType, textOffset, 0, 0, iconOffset, subfeature, 0, 0, key, 0.0f, 0.0f, 0.0f, variableTextOffset, false); } diff --git a/test/text/shaping.test.cpp b/test/text/shaping.test.cpp index 17c2fc96af..b22cd7da36 100644 --- a/test/text/shaping.test.cpp +++ b/test/text/shaping.test.cpp @@ -33,7 +33,7 @@ TEST(Shaping, ZWSP) { style::SymbolAnchorType::Center, style::TextJustifyType::Center, 0, // spacing - {0.0f, 0.0f}, // translate + {{0.0f, 0.0f}}, // translate WritingModeType::Horizontal, bidi, glyphs, |