Thermal Printer - EOS/POS commands / font/density Q

Hope this is not too embarrassing of a question but -

Having some trouble deciphering the EOS/POS commands examples section of the Thermal Printer github DevTerm/Code/thermal_printer at main · clockworkpi/DevTerm · GitHub

Any chance someone can walk me through changing font size in 2 situations-

  • printing direct out of terminal using echo
    -using cat to print a txt file

while we’re at it, if there are any other options, I’d greatly appreciate the help.

I just want to print some ascii transfers, but would also love to know how to print images correctly too. Feel like the other threads operate on a bit of user basic proficiency that is slightly beyond me.

thanks for your time!

2 Likes

set printer font index,n:0-4
echo -en “\x1b\x21\x0” > /tmp/DEVTERM_PRINTER_IN
echo -en “\x1b\x21\x1” > /tmp/DEVTERM_PRINTER_IN
echo -en “\x1b\x21\x2” > /tmp/DEVTERM_PRINTER_IN
echo -en “\x1b\x21\x3” > /tmp/DEVTERM_PRINTER_IN
echo -en “\x1b\x21\x4” > /tmp/DEVTERM_PRINTER_IN

for your reference

2 Likes

Very cool! Is there a way to “isolate” the font that is used here as a font-file, or even just as a reference name? Trying to figure out how to achieve similarly good results from other environments (java/python) and not really succeeding…

If I understood correctly

latest DevTerm/Code/thermal_printer at main · clockworkpi/DevTerm · GitHub

has implemented unicode font printing, code is avaiable, but this function is disabled by default

which you can have references for “isolate” font