diff options
author | Molly Lloyd <molly@mapbox.com> | 2017-03-27 17:30:58 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-28 11:06:58 -0700 |
commit | 47c1e42ac1073ef02093b59336588f389f287227 (patch) | |
tree | 9e1737ff6c56f2d07fa2eddab4055a19af5479ba /src/mbgl/text | |
parent | 5f402975267e0cb0baf87a13afcd0d1366791d01 (diff) | |
download | qtlocation-mapboxgl-47c1e42ac1073ef02093b59336588f389f287227.tar.gz |
[core] implement dds for text-offset
Diffstat (limited to 'src/mbgl/text')
-rw-r--r-- | src/mbgl/text/glyph_set.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/text/glyph_set.cpp b/src/mbgl/text/glyph_set.cpp index 19a6e2cddd..ea0dd123db 100644 --- a/src/mbgl/text/glyph_set.cpp +++ b/src/mbgl/text/glyph_set.cpp @@ -45,7 +45,7 @@ const Shaping GlyphSet::getShaping(const std::u16string& logicalInput, const float verticalHeight, const WritingModeType writingMode, BiDi& bidi) const { - Shaping shaping(translate.x * 24, translate.y * 24, writingMode); + Shaping shaping(translate.x, translate.y, writingMode); std::vector<std::u16string> reorderedLines = bidi.processText(logicalInput, @@ -66,9 +66,9 @@ void align(Shaping& shaping, const std::size_t lineCount, const Point<float>& translate) { const float shiftX = - (justify - horizontalAlign) * maxLineLength + ::round(translate.x * 24 /* one em */); + (justify - horizontalAlign) * maxLineLength + ::round(translate.x); const float shiftY = - (-verticalAlign * lineCount + 0.5) * lineHeight + ::round(translate.y * 24 /* one em */); + (-verticalAlign * lineCount + 0.5) * lineHeight + ::round(translate.y); for (auto& glyph : shaping.positionedGlyphs) { glyph.x += shiftX; |