forked from tr3v3r/react-native-esc-pos-printer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getFontACharsPerLine.ts
119 lines (115 loc) · 1.95 KB
/
getFontACharsPerLine.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
export function getFontACharsPerLine(deviceName: string) {
if (deviceName.startsWith('TM-m10'))
return {
58: 35,
60: 35,
};
if (deviceName.startsWith('TM-m30'))
return {
80: 48,
58: 35,
60: 35,
};
if (deviceName.startsWith('TM-m30II'))
return {
80: 42,
58: 32,
60: 32,
};
if (deviceName.startsWith('TM-P20'))
return {
58: 32,
60: 35,
};
if (deviceName.startsWith('TM-P60II'))
return {
58: 35,
60: 36,
};
if (deviceName.startsWith('TM-P60'))
return {
58: 35,
60: 35,
};
if (deviceName.startsWith('TM-P80'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T20'))
return {
80: 48,
58: 35,
60: 35,
};
if (deviceName.startsWith('TM-T60'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T70'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T81'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T82'))
return {
80: 48,
58: 35,
60: 35,
};
if (deviceName.startsWith('TM-T83III'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T83'))
return {
80: 42,
};
if (deviceName.startsWith('TM-T88'))
return {
80: 42,
58: 30,
60: 30,
};
if (deviceName.startsWith('TM-T90'))
return {
80: 42,
60: 30,
58: 30,
};
if (deviceName.startsWith('TM-T100'))
return {
80: 42,
};
if (deviceName.startsWith('TM-U220'))
return {
80: 35,
58: 27,
60: 27,
};
if (deviceName.startsWith('TM-U330'))
return {
80: 33,
58: 25,
60: 25,
};
if (deviceName.startsWith('TM-L90'))
return {
80: 42,
58: 30,
60: 30,
};
if (deviceName.startsWith('TM-H6000'))
return {
80: 42,
58: 30,
60: 30,
};
return {
80: 42,
58: 30,
60: 30,
};
}