Added detection of failed markup rendering, and plaintext fallback

This commit is contained in:
Mark Qvist 2024-12-09 12:25:59 +01:00
parent ad58ab335a
commit b2a5b8c193
2 changed files with 12 additions and 4 deletions

View file

@ -45,10 +45,6 @@ def strip_emojis(str_input):
return output
def multilingual_markup(data):
# TODO: Remove
# import time
# ts = time.time()
do = ""
rfont = "default"
ds = data.decode("utf-8")
@ -95,6 +91,10 @@ def multilingual_markup(data):
return do.encode("utf-8")
font_map = {
"mono": "RobotoMono-Regular"
}
codepoint_map = {
0x0590: [0x05ff, "hebrew"],
0x2e3a: [0x2e3b, "chinese"],