convert text to bitmaps, images, rich, etc
it's kinda hard to take plain text and render it in a font as an image. this helps with that.
(hat tip to @dbader for the hard part - i just added the fun stuff)
so, e.g.
from text_to_image import Face, Font, emojify_text, explore_emojify_text
from rich import print
from rich.color import Color
# simple terminal str
print(Font(Face.menlo, 12).to_str('hello'))
# with color using rich
print(Font(Face.menlo, 12).to_rich('hello', color=Color.parse('purple')))
# emojify text
print(emojify_text('what a great font', font=Font(Face.comic_sans, 12), emoji='saxophone'))
# emojify text more!
print(emojify_text('what a great font', font=Font(Face.comic_sans, 12), emoji='saxophone', flip=True))
# create an image
im = Font(Face.typewriter, 100).to_image('hello!')
im.show()