Rework capabilities format based on Mike's ideas.

This commit is contained in:
Michael Elsdörfer 2016-08-27 12:17:35 +02:00
parent 3fd1a3de5d
commit 216184f43f
1 changed files with 234 additions and 189 deletions

View File

@ -1,35 +1,15 @@
# Description of the format # Define code pages that implementors are likely not to find in iconv etc.
abstract: codepages:
# Defines non-standard code pages that the printer supports, but blank: [
# that we won't find in Python's encoding system. If you define one " ",
# here, don't forget to add it to codePageMap to assign it to a slot. " ",
customCodePages: " ",
sample: " ",
" ",
# This maps the indexed code page slots to code page names. " ",
# Often, the slot assignment is the same, but the device only " ",
# supports a subset. " ",
codePageMap: ]
0: "CP437"
1: "CP932"
3: "sample"
# Maybe not all of the codepages in the map are supported. This
# is for subprofiles to select which ones the device knows.
codePages: [sample, cp932]
# Many recent Epson-branded thermal receipt printers.
default:
columns: 42
barcodeB: true
bitImage: true
graphics: true
starCommands: false
qrCode: true
customCodePages:
TCVN-3-1: [ TCVN-3-1: [
" ", " ",
" ", " ",
@ -52,58 +32,87 @@ default:
] ]
commands:
LineFeed:
name: Line feed
FeedAndCut:
name: Feed and cut
SetAbsolutePrintPos:
name: Set absolute print position
GraphicsData:
name: Graphics data
profiles:
default:
name: Default profile
description: Many recent Epson-branded thermal receipt printers
commands:
BarcodeB: true
BitImage: true
GraphicsData: true
QrCode: true
features:
starCommands: false
font:
0:
columns: 40
1:
columns: 50
colors:
- black
# Commented-out slots are TODO (might just need uncomment, might # Commented-out slots are TODO (might just need uncomment, might
# need verification/research) # need verification/research)
codePageMap: codepages:
0: "CP437" 0: CP437
1: "CP932" 1: CP932
2: "CP850" 2: CP850
3: "CP860" 3: CP860
4: "CP863" 4: CP863
5: "CP865" 5: CP865
#6: // Hiragana #6: // Hiragana
#7: // One-pass printing Kanji characters #7: // One-pass printing Kanji characters
#8: // Page 8 [One-pass printing Kanji characters] #8: // Page 8 [One-pass printing Kanji characters]
11: "CP851" 11: CP851
12: "CP853" 12: CP853
13: "CP857" 13: CP857
14: "CP737" 14: CP737
15: "ISO8859_7" 15: ISO8859_7
16: "CP1252" 16: CP1252
17: "CP866" 17: CP866
18: "CP852" 18: CP852
19: "CP858" 19: CP858
#20: // Thai Character Code 42 #20: // Thai Character Code 42
#21: // Thai Character Code 1" #21: // Thai Character Code 1
#22: // Thai Character Code 13 #22: // Thai Character Code 13
#23: // Thai Character Code 14 #23: // Thai Character Code 14
#24: // Thai Character Code 16 #24: // Thai Character Code 16
#25: // Thai Character Code 17 #25: // Thai Character Code 17
#26: // Thai Character Code 18 #26: // Thai Character Code 18
30: 'TCVN-3-1', # TCVN-3: Vietnamese 30: 'TCVN-3-1' # TCVN-3: Vietnamese
31: 'TCVN-3-2', # TCVN-3: Vietnamese 31: 'TCVN-3-2' # TCVN-3: Vietnamese
32: "CP720" 32: CP720
33: "CP775" 33: CP775
34: "CP855" 34: CP855
35: "CP861" 35: CP861
36: "CP862" 36: CP862
37: "CP864" 37: CP864
38: "CP869" 38: CP869
39: "ISO8859_2" 39: ISO8859_2
40: "ISO8859_15" 40: ISO8859_15
41: "CP1098" 41: CP1098
42: "CP774" 42: CP774
43: "CP772" 43: CP772
44: "CP1125" 44: CP1125
45: "CP1250" 45: CP1250
46: "CP1251" 46: CP1251
47: "CP1253" 47: CP1253
48: "CP1254" 48: CP1254
49: "CP1255" 49: CP1255
50: "CP1256" 50: CP1256
51: "CP1257" 51: CP1257
52: "CP1258" 52: CP1258
53: "RK1048" 53: RK1048
#66: // Devanagari #66: // Devanagari
#67: // Bengali #67: // Bengali
#68: // Tamil #68: // Tamil
@ -119,54 +128,61 @@ default:
#255: #255:
# Designed for non-Epson printers sold online. Without knowing # Designed for non-Epson printers sold online. Without knowing
# their character encoding table, only CP437 output is assumed, # their character encoding table, only CP437 output is assumed,
# and graphics() calls will be disabled, as it usually prints junk # and graphics() calls will be disabled, as it usually prints junk
# on these models. # on these models.
simple: simple:
codePages:
- cp437
graphics: false
# Profile for Star-branded printers.
star:
inherits: default inherits: default
starCommands: true name: Simple profile
codePages:
0: CP437
commands:
graphicsData: false
epson: star:
name: Star-branded printers
inherits: default
features:
starCommands: false
printers:
P-822D:
inherits: default inherits: default
manufacturer: "Epson" manufacturer: "Epson"
commands:
graphicsData: false
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf
"P-822D": TM-T88II:
inherits: default inherits: default
graphics: false manufacturer: "Epson"
fonts:
a:
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf columns: 42
"TM-T88II": b:
inherits: epson columns: 56
columns:
a: 42
b: 56
codePages: codePages:
- PC437 # 0 0: PC437
- Katakana # 1 1: Katakana
- PC850 # 2 2: PC850
- PC860 # 3 3: PC860
- PC863 # 4 4: PC863
- PC865 # 5 5: PC865
- PC858 # 19 19: PC858
- blank 255: blank
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf # http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf
"TM-T88III": TM-T88III:
inherits: epson inherits: default
columns: manufacturer: "Epson"
a: 42 fonts:
b: 56 a:
columns: 42
b:
columns: 56
codePages: codePages:
- PC437 # 0 - PC437 # 0
- Katakana # 1 - Katakana # 1
@ -180,28 +196,57 @@ epson:
- PC858 # 19 - PC858 # 19
- blank - blank
TM-P80:
inherits: default
manufacturer: "Epson"
fonts:
a:
columns: 48
b:
columns: 64
kanji:
columns: 24
"TM-P80": TM-P80 (42 column emulation mode):
inherits: epson inherits: TM-P80
defaultColumnConfig: default fonts:
columnConfigs: a:
default: {'a': 48, 'b': 64, 'kanji': 24} columns: 42
'42_emulation': {'a': 42, 'b': 60, 'kanji': 21} b:
columns: 60
kanji:
columns: 21
TM-P60II 2 (58mm):
inherits: default
manufacturer: "Epson"
media:
width:
mm: 58
fonts:
a: {columns: 35}
b: {columns: 42}
c: {columns: 52}
"TM-P60II 2": TM-P60II 2 (60mm):
inherits: epson inherits: default
columnConfigs: manufacturer: "Epson"
'58mm_paper': {'a': 35, 'b': 42, 'c': 52} media:
'60mm_paper': {'a': 36, 'b': 43, 'c': 54} width:
mm: 60
fonts:
a: {columns: 36}
b: {columns: 43}
c: {columns: 54}
TM-P20 2:
inherits: default
manufacturer: "Epson"
fonts: [a, b c, d, e, f]
"TM-P20 2": TM-T90:
inherits: epson inherits: default
# Has 5 fonts! manufacturer: "Epson"
"TM-T90":
inherits: epson
colors: colors:
- black - black
- red - red