Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: define a 12x24 Type-A font, for hexadecimal #33

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

This is alpha quality code,
 which will need some consideration
 as to how it will be integrated,
 but I promise it is worth it !

On decent Epson printers, it should be possible to redefine the font, for the 
low-order 7-bit ASCII part of the character tables.

The demonstration script attached will change one of the Type-A fonts on the 
thermal printer.

Epson printers have at least two fonts. I picked type A, because of its evenly 
sized 12x24 character cells, which are easy to redefine as you will see.



Are you the kind of person that is bothered by base 10, but are not too 
enthused about alphanumeric hexadecimal?

I am; therefore, the first characters I substituted were:

 0-9, a-f.

I call my font, DashNibs;
 that is,
 it hangs on a dash,
 and each digit is one Nibble;
 i.e. formally known as "DashNibbles."



Try this example command on your LPT connected printer:

./demonstrate_glyphing.py 6 R 4

(my tm-h6000 on lpt template)
(roll paper, not slip)
(example 4; quad area ASCII table)



The USB port selection needs to be hacked for Linux. It should be possible to 
just use the default USB printer object in python-escpos. What you will see in 
my code, is a work-around for the USB Epson interface on FreeBSD systems.

LPT is easier; it will work, by renaming from lpt0 to lp0.

I have tested this successfully on the Epson TM-H5000II and Epson TM-H6000. I 
will pitch in a cleaner, portable version, when I have time later.

Original issue reported on code.google.com by [email protected] on 15 Jun 2014 at 12:06

Attachments:

@GoogleCodeExporter
Copy link
Author

For the benefit of those who do not have immediate access to a thermal printer, 
this is the output of example 4. See the 0x10 base position prefix, centre of 
printout.

Custom font is enabled for border elements and DashNibbles only. It is off, for 
printing the regular ASCII elements.

It all looks even better now, with font smoothing enabled by default.

Original comment by [email protected] on 15 Jun 2014 at 12:39

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant