edit README.md and helpers
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import base64
|
||||
|
||||
|
||||
def font_to_base64(path) -> str:
|
||||
with open(path, "rb") as f:
|
||||
encoded = base64.b64encode(f.read()).decode("utf-8")
|
||||
return encoded
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
font = font_to_base64("puffy.otf")
|
||||
with open("font_as_base.txt", "w") as file:
|
||||
file.write(font)
|
||||
Reference in New Issue
Block a user