Replies: 4 comments 6 replies
-
Hi |
Beta Was this translation helpful? Give feedback.
-
With ImageMagick we are able to convert from png/jpg to pbm. |
Beta Was this translation helpful? Give feedback.
-
See newest 0.4.0. It uses ImageMagick to print text, and it's able to define font size & font family, freely.
|
Beta Was this translation helpful? Give feedback.
-
Finally PF2 text zooming (glyph scaling) is there, in 0.5.2. It's actually little work. I just compromised doing something else these days... |
Beta Was this translation helpful? Give feedback.
-
Command-line text printing defaults to use ImageMagick. Below is the way to do with PF2 font — lightweight, energy efficient, and streamed, getting much flexibility.
To try it out, do these:
font.pf2
For GNU/Linux you have a big change to find a
unifont.pf2
at somewhere in directory/boot/grub
.Or take this: unifont.pf2.zip
Otherwise, generate one with command
grub-mkfont
along with your favorite TTF/OTF font. It's very customizable.Unfortunately, other OS like Windows have no official pre-distributed
grub-mkfont
. I’ve failed to compile one, either.python3 printer.py -t 1,font,pf2 text_file.txt
Well, that’s all. In this case no complex libs required. If you'd like to know what's happening, check file
printer_lib/pf2.py
,printer_lib/text_print.py
and the updatedprinter.py
Try the “typewriter” hack! Give
-
as filename and type directly in the terminal, line by line.Cheers~
Beta Was this translation helpful? Give feedback.
All reactions