From 42075c3990eb48413c203f22fdadbe7bca6dce16 Mon Sep 17 00:00:00 2001 From: Syrus Dark Date: Tue, 29 Dec 2020 21:09:46 +0530 Subject: [PATCH] MAINT: fix ligature bug --- manimpango/cmanimpango.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manimpango/cmanimpango.pyx b/manimpango/cmanimpango.pyx index 19efcc70..03a84d6d 100644 --- a/manimpango/cmanimpango.pyx +++ b/manimpango/cmanimpango.pyx @@ -235,8 +235,10 @@ def text2svg( pango_cairo_update_layout(cr,layout) if disable_liga: - text = escape(text) - pango_layout_set_markup(layout, text, -1) + text_bytes = escape(text.decode('utf-8')) + markup = f"{text_bytes}" + markup_bytes = markup.encode('utf-8') + pango_layout_set_markup(layout, markup_bytes, -1) else: pango_layout_set_text(layout,text,-1) pango_cairo_show_layout(cr, layout)