diff options
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r-- | TurtleArt/tacanvas.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 93d2567..c12e2c7 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -312,9 +312,11 @@ class TurtleGraphics: def _draw_text(cr, label, x, y, size, width, scale, heading, rgb): import textwrap + final_scale = int(size * scale) * pango.SCALE label = str(label) label = '\n'.join(textwrap.wrap(label, int(width / scale))) + cc = pangocairo.CairoContext(cr) pl = cc.create_layout() fd = pango.FontDescription('Sans') |