solving mirrored font from c_to_python_font on a st7789 2.8 restouch screen #12198
Replies: 4 comments 2 replies
-
Firstly does nanogui work with its supplied fonts? If it does, the fault must lie in Fonts produced by font-to-py are in a specific format designed to reduce RAM usage in MicroPython. If you want to produce fancy fonts, I recommend finding a utility which outputs those fonts in OTF or TTF format, then using font-to-py to convert them. |
Beta Was this translation helpful? Give feedback.
-
nanogui works with it's supplied fonts and with some fonts i made with use of font-to-py. i used: https://javl.github.io/image2cpp/ with setting black as background, binary dithering and 1 bit horizontal |
Beta Was this translation helpful? Give feedback.
-
c_to_python_font is part of the font-to-py download. it has a readme instruction in the icon_fonts folder. if i set image2cpp to swap bits in bytes it looks better, now only a third is presented twice where the first is horizontally mirrored, but it does not finish the bytecode lettertype, like with the ones that did not swap bits in bytes. thank you for your feedback, font_to_py solved it with some minor atlerations |
Beta Was this translation helpful? Give feedback.
-
It took me some time, although i had some trouble with the frame buffer size running out when creating a 240x360 default character, even with bdcolor=false. this combined with a 3d printed housing made my new PULSE intervalometer. So thank you for all the help in my understanding the capabilities and limitations. If you like to see what the result is of my use of nanogui, i made a small 'promotional' film of the finished intervalometer tool and that includes filmed footage from the display as it looks now, so color representation is not ideal: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i was trying to get a color image on my pico, but it appeared to be heavy on the pico and on me ;)
and looking at c_to_python_font.py i was hoping to turn my initial idea into some pixel art.
it's a regular pico, running 1.9.1 with a 2.8 inch 240x320 touchres screen that uses the st7789_4bit driver in portrait mode (VER) with nanogui.
i used an online tool to create the bytes from some font art, ran c_to_python_font and tried the file.
first off, i don't have this problem if i use font_to_py with a TTF file, it only appears to be with B/W images converted to bytes.
the result was messed up, tried vertical sequence of bytecode, but that made it worse.
to check this i created a font with the word [TEST] repeated on it.
all my checks showed it was just the word test.
after using Cwriter to put it on the display it turns out quite different.
it is not really mirrored, but vertical lines mirrored segments. this is best shown on the bottomline, where test reads from left to right, but all letters are morrored.
there should be a question in here about if it is possible to solve this :)
Beta Was this translation helpful? Give feedback.
All reactions