Replies: 2 comments
-
it looks like you want to rasterize a font (convert outlines into pixels), if you want to do that from Python I suggest you look into freetype-py (python bindings to the FreeType library) https://github.com/rougier/freetype-py |
Beta Was this translation helpful? Give feedback.
0 replies
This comment was marked as spam.
This comment was marked as spam.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I dont know alot about fonts so please bear with my likely incorrect terminology....
I'm looking for a way to convert a TTF font into a byte array that can then be put into a frame buffer and sent to an TFT LCD screen for display (I'm running Micropython on a raspberry pi pico with an ILI9488 based 3.5" TFT LCS screen). So to say this another way, I need a tool that will open the TTF font file and scan every "position/pixel" in the font. Every position that has a background color would output a "0" bit to the byte array. Every position that has part of the character itself would output a "1" bit to the byte array.
Is there such a tool within the font tools library? Any help would be appreciated. Thank you.
(edited to fix some typos)
Beta Was this translation helpful? Give feedback.
All reactions