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,207 +1,252 @@
# 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" TCVN-3-1: [
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] "éẹềểễếệìỉ ĩíịò",
" ỏõóọồổỗốộờởỡớợù",
" ủũúụừửữứựỳỷỹýỵ ",
]
TCVN-3-2: [
" ",
" ",
" ĂÂ Ð ÊÔƠƯ ",
" ÀẢÃÁẠ ẰẲẴẮ ",
" ẶẦẨẪẤẬÈ ẺẼ",
"ÉẸỀỂỄẾỆÌỈ ĨÍỊÒ",
" ỎÕÓỌỒỔỖỐỘỜỞỠỚỢÙ",
" ỦŨÚỤỪỬỮỨỰỲỶỸÝỴ "
]
# Many recent Epson-branded thermal receipt printers. commands:
default: LineFeed:
columns: 42 name: Line feed
FeedAndCut:
barcodeB: true name: Feed and cut
bitImage: true SetAbsolutePrintPos:
graphics: true name: Set absolute print position
starCommands: false GraphicsData:
qrCode: true name: Graphics data
customCodePages:
TCVN-3-1: [
" ",
" ",
" ăâêôơưđ ",
" àảãáạ ằẳẵắ ",
" ặầẩẫấậè ẻẽ",
"éẹềểễếệìỉ ĩíịò",
" ỏõóọồổỗốộờởỡớợù",
" ủũúụừửữứựỳỷỹýỵ ",
]
TCVN-3-2: [
" ",
" ",
" ĂÂ Ð ÊÔƠƯ ",
" ÀẢÃÁẠ ẰẲẴẮ ",
" ẶẦẨẪẤẬÈ ẺẼ",
"ÉẸỀỂỄẾỆÌỈ ĨÍỊÒ",
" ỎÕÓỌỒỔỖỐỘỜỞỠỚỢÙ",
" ỦŨÚỤỪỬỮỨỰỲỶỸÝỴ "
]
# Commented-out slots are TODO (might just need uncomment, might profiles:
# need verification/research) default:
codePageMap: name: Default profile
0: "CP437" description: Many recent Epson-branded thermal receipt printers
1: "CP932" commands:
2: "CP850" BarcodeB: true
3: "CP860" BitImage: true
4: "CP863" GraphicsData: true
5: "CP865" QrCode: true
#6: // Hiragana features:
#7: // One-pass printing Kanji characters starCommands: false
#8: // Page 8 [One-pass printing Kanji characters] font:
11: "CP851" 0:
12: "CP853" columns: 40
13: "CP857" 1:
14: "CP737" columns: 50
15: "ISO8859_7" colors:
16: "CP1252" - black
17: "CP866" # Commented-out slots are TODO (might just need uncomment, might
18: "CP852" # need verification/research)
19: "CP858" codepages:
#20: // Thai Character Code 42 0: CP437
#21: // Thai Character Code 1" 1: CP932
#22: // Thai Character Code 13 2: CP850
#23: // Thai Character Code 14 3: CP860
#24: // Thai Character Code 16 4: CP863
#25: // Thai Character Code 17 5: CP865
#26: // Thai Character Code 18 #6: // Hiragana
30: 'TCVN-3-1', # TCVN-3: Vietnamese #7: // One-pass printing Kanji characters
31: 'TCVN-3-2', # TCVN-3: Vietnamese #8: // Page 8 [One-pass printing Kanji characters]
32: "CP720" 11: CP851
33: "CP775" 12: CP853
34: "CP855" 13: CP857
35: "CP861" 14: CP737
36: "CP862" 15: ISO8859_7
37: "CP864" 16: CP1252
38: "CP869" 17: CP866
39: "ISO8859_2" 18: CP852
40: "ISO8859_15" 19: CP858
41: "CP1098" #20: // Thai Character Code 42
42: "CP774" #21: // Thai Character Code 1
43: "CP772" #22: // Thai Character Code 13
44: "CP1125" #23: // Thai Character Code 14
45: "CP1250" #24: // Thai Character Code 16
46: "CP1251" #25: // Thai Character Code 17
47: "CP1253" #26: // Thai Character Code 18
48: "CP1254" 30: 'TCVN-3-1' # TCVN-3: Vietnamese
49: "CP1255" 31: 'TCVN-3-2' # TCVN-3: Vietnamese
50: "CP1256" 32: CP720
51: "CP1257" 33: CP775
52: "CP1258" 34: CP855
53: "RK1048" 35: CP861
#66: // Devanagari 36: CP862
#67: // Bengali 37: CP864
#68: // Tamil 38: CP869
#69: // Telugu 39: ISO8859_2
#70: // Assamese 40: ISO8859_15
#71: // Oriya 41: CP1098
#72: // Kannada 42: CP774
#73: // Malayalam 43: CP772
#74: // Gujarati 44: CP1125
#75: // Punjabi 45: CP1250
#82: // Marathi 46: CP1251
#254: 47: CP1253
#255: 48: CP1254
49: CP1255
50: CP1256
51: CP1257
52: CP1258
53: RK1048
#66: // Devanagari
#67: // Bengali
#68: // Tamil
#69: // Telugu
#70: // Assamese
#71: // Oriya
#72: // Kannada
#73: // Malayalam
#74: // Gujarati
#75: // Punjabi
#82: // Marathi
#254:
#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: inherits: default
- cp437 name: Simple profile
graphics: false codePages:
0: CP437
commands:
graphicsData: false
# Profile for Star-branded printers. star:
star: name: Star-branded printers
inherits: default inherits: default
starCommands: true features:
starCommands: false
epson: printers:
inherits: default P-822D:
manufacturer: "Epson" inherits: default
manufacturer: "Epson"
commands:
graphicsData: false
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf
TM-T88II:
inherits: default
manufacturer: "Epson"
fonts:
a:
columns: 42
b:
columns: 56
codePages:
0: PC437
1: Katakana
2: PC850
3: PC860
4: PC863
5: PC865
19: PC858
255: blank
"P-822D": # http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf
inherits: default TM-T88III:
graphics: false inherits: default
manufacturer: "Epson"
fonts:
a:
columns: 42
b:
columns: 56
codePages:
- PC437 # 0
- Katakana # 1
- PC850 # 2
- PC860 # 3
- PC863 # 4
- PC865 # 5
- WPC1252 # 16
- PC866 # 17
- PC852 # 18
- PC858 # 19
- blank
TM-P80:
inherits: default
manufacturer: "Epson"
fonts:
a:
columns: 48
b:
columns: 64
kanji:
columns: 24
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf TM-P80 (42 column emulation mode):
"TM-T88II": inherits: TM-P80
inherits: epson fonts:
columns: a:
a: 42 columns: 42
b: 56 b:
codePages: columns: 60
- PC437 # 0 kanji:
- Katakana # 1 columns: 21
- PC850 # 2
- PC860 # 3
- PC863 # 4
- PC865 # 5
- PC858 # 19
- blank
# http://support.epostraders.co.uk/support-files/documents/3/l7O-TM-T88II_TechnicalRefGuide.pdf TM-P60II 2 (58mm):
"TM-T88III": inherits: default
inherits: epson manufacturer: "Epson"
columns: media:
a: 42 width:
b: 56 mm: 58
codePages: fonts:
- PC437 # 0 a: {columns: 35}
- Katakana # 1 b: {columns: 42}
- PC850 # 2 c: {columns: 52}
- PC860 # 3
- PC863 # 4
- PC865 # 5
- WPC1252 # 16
- PC866 # 17
- PC852 # 18
- PC858 # 19
- blank
TM-P60II 2 (60mm):
inherits: default
manufacturer: "Epson"
media:
width:
mm: 60
fonts:
a: {columns: 36}
b: {columns: 43}
c: {columns: 54}
"TM-P80": TM-P20 2:
inherits: epson inherits: default
defaultColumnConfig: default manufacturer: "Epson"
columnConfigs: fonts: [a, b c, d, e, f]
default: {'a': 48, 'b': 64, 'kanji': 24}
'42_emulation': {'a': 42, 'b': 60, 'kanji': 21}
TM-T90:
"TM-P60II 2": inherits: default
inherits: epson manufacturer: "Epson"
columnConfigs: colors:
'58mm_paper': {'a': 35, 'b': 42, 'c': 52} - black
'60mm_paper': {'a': 36, 'b': 43, 'c': 54} - red
"TM-P20 2":
inherits: epson
# Has 5 fonts!
"TM-T90":
inherits: epson
colors:
- black
- red