From eb1fbc542b8d8b90d17e9e76f98d7b021b449c7b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 29 Aug 2014 12:25:17 -0700 Subject: [PATCH] Fix text-justify (fixes #444) --- src/text/glyph_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text/glyph_store.cpp b/src/text/glyph_store.cpp index 65941e91f7e..783710d929c 100644 --- a/src/text/glyph_store.cpp +++ b/src/text/glyph_store.cpp @@ -131,7 +131,7 @@ void FontStack::lineWrap(Shaping &shaping, const float lineHeight, const float m } } - maxLineLength = maxLineLength || shaping.back().x; + if (!maxLineLength) maxLineLength = shaping.back().x; justifyLine(shaping, metrics, lineStartIndex, uint32_t(shaping.size()) - 1, justify); align(shaping, justify, horizontalAlign, verticalAlign, maxLineLength, lineHeight, line);