diff --git a/kivy/core/text/markup.py b/kivy/core/text/markup.py index 400e69891..3180b6127 100644 --- a/kivy/core/text/markup.py +++ b/kivy/core/text/markup.py @@ -37,13 +37,13 @@ If you need to escape the markup from the current text, use __all__ = ('MarkupLabel', ) -from kivy.graphics.texture import Texture +import re from kivy.properties import dpi2px from kivy.parser import parse_color from kivy.logger import Logger -import re from kivy.core.text import Label, LabelBase from copy import copy +from math import ceil # We need to do this trick when documentation is generated MarkupLabelBase = Label @@ -216,7 +216,7 @@ class MarkupLabel(MarkupLabelBase): h = 1 else: h = sum([line[1] for line in lines]) - return w, h + return int(ceil(w)), int(ceil(h)) def _pre_render_label(self, word, options, lines): # precalculate id/name