equal
deleted
inserted
replaced
54 data = fp.read() |
54 data = fp.read() |
55 return "".join([ |
55 return "".join([ |
56 "data:", |
56 "data:", |
57 mimetype, |
57 mimetype, |
58 ";base64,", |
58 ";base64,", |
59 b64encode(data).strip()]) |
59 b64encode(data).decode().strip()]) |
60 |
60 |
61 def GetCSSFontFaceFromFontFile(filename): |
61 def GetCSSFontFaceFromFontFile(filename): |
62 familyname, uniquename, formatname, mimetype = GetFontTypeAndFamilyName(filename) |
62 familyname, uniquename, formatname, mimetype = GetFontTypeAndFamilyName(filename) |
63 data_uri = DataURIFromFile(filename, mimetype) |
63 data_uri = DataURIFromFile(filename, mimetype) |
64 css_font_face = \ |
64 css_font_face = \ |