From 8cd6a99716a2e5c2829dcd96164e48753dff4bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 5 Aug 2014 17:37:13 +0200 Subject: [PATCH] convert offset to em --- src/text/glyph_store.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text/glyph_store.cpp b/src/text/glyph_store.cpp index a28569d85..cb7c70950 100644 --- a/src/text/glyph_store.cpp +++ b/src/text/glyph_store.cpp @@ -39,8 +39,8 @@ const Shaping FontStack::getShaping(const std::u32string &string, const float ma Shaping shaping; - uint32_t x = translate.x; - const uint32_t y = translate.y; + int32_t x = std::round(translate.x * 24); // one em + const int32_t y = std::round(translate.y * 24); // one em // Loop through all characters of this label and shape. for (uint32_t chr : string) {