workaround to deal with missing default fonts in escpos

workspace
Brendan Howell 4 years ago
parent 60d593c890
commit 0c9c5dcad0

@ -160,7 +160,7 @@ class PublicRelations(Bureau):
prn.textln(username) prn.textln(username)
prn.set() prn.set()
twtext = html.unescape(t["full_text"]) twtext = html.unescape(t["full_text"])
prn.block_text(twtext) prn.block_text(twtext, font="0")
prn.ln() prn.ln()
if "media" in t["entities"]: if "media" in t["entities"]:
@ -199,7 +199,7 @@ class PublicRelations(Bureau):
prn.textln(username) prn.textln(username)
prn.set() prn.set()
twtext = html.unescape(tweet["full_text"]) twtext = html.unescape(tweet["full_text"])
prn.block_text(twtext) prn.block_text(twtext, font="0")
if "media" in tweet["entities"]: if "media" in tweet["entities"]:
for entity in tweet["entities"]["media"]: for entity in tweet["entities"]["media"]:
@ -312,7 +312,7 @@ class PublicRelations(Bureau):
prn.set() prn.set()
ttext = bleach.clean(t.content, tags=[], strip=True) ttext = bleach.clean(t.content, tags=[], strip=True)
ttext = html.unescape(ttext) ttext = html.unescape(ttext)
prn.block_text(ttext) prn.block_text(ttext, font="0")
if len(t.media_attachments) > 0: if len(t.media_attachments) > 0:
img = None img = None

Loading…
Cancel
Save