Take EIGHT_BIT_SCALE into account, in box_width
[naja.git] / naja / widgets / text.py
index 4cc4272f7435d9a7bf16ef530a3c1bb004a29c7a..6862b968907ec7132a15bc1a01f509e63d446e45 100644 (file)
@@ -170,7 +170,7 @@ class TextBoxWidget(TextWidget):
     def _wrapped_lines(self, image_map):
         def words_fit(words):
             words_line = ' '.join(words)
-            width = self.font.size(words_line)[0]
+            width = self.font.size(words_line)[0] * EIGHT_BIT_SCALE
             if width < self.box_width:
                 return True
             elif len(words) == 1: