-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfont.js
109 lines (106 loc) · 1.71 KB
/
font.js
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
// System notifications won't let us use monospace font.
// This are hand measured character widths to try to put caret pointer
// in correct position even with the sans-serif fonts.
// Modeled after Segoe UI.
var sizesArray = [
['.', 0.8],
[',', 0.8],
[':', 0.8],
[';', 0.8],
['\'', 0.84],
['|', 0.86],
['i', 0.88],
['l', 0.88],
['j', 0.94],
['I', 0.97],
['`', 0.98],
['!', 1.03],
['´', 1.03],
['(', 1.09],
[')', 1.09],
['[', 1.09],
[']', 1.09],
['{', 1.09],
['}', 1.09],
['f', 1.14],
['J', 1.16],
['˜', 1.23],
['t', 1.23],
['r', 1.26],
['\\', 1.38],
['/', 1.43],
['"', 1.43],
['-', 1.45],
['*', 1.5],
['_', 1.5],
['s', 1.5],
['§', 1.6],
['?', 1.6],
['z', 1.65],
['c', 1.68],
['x', 1.7],
['L', 1.7],
['v', 1.75],
['y', 1.75],
['F', 1.75],
['k', 1.82],
['E', 1.84],
['a', 1.84],
['e', 1.9],
['S', 1.9],
['$', 1.95],
['0', 1.95],
['1', 1.95],
['2', 1.95],
['3', 1.95],
['5', 1.95],
['4', 1.95],
['6', 1.95],
['7', 1.95],
['8', 1.95],
['9', 1.95],
['€', 1.97],
['T', 1.97],
['Y', 2],
['P', 2.02],
['h', 2.04],
['n', 2.04],
['u', 2.04],
['B', 2.07],
['Z', 2.08],
['K', 2.08],
['o', 2.17],
['p', 2.17],
['d', 2.17],
['b', 2.17],
['g', 2.17],
['q', 2.17],
['X', 2.17],
['#', 2.17],
['R', 2.17],
['C', 2.17],
['V', 2.25],
['A', 2.35],
['+', 2.47],
['=', 2.47],
['^', 2.47],
['<', 2.47],
['>', 2.47],
['U', 2.47],
['G', 2.47],
['D', 2.5],
['H', 2.55],
['w', 2.6],
['N', 2.68],
['O', 2.73],
['Q', 2.73],
['&', 2.9],
['%', 3],
['m', 3.1],
['M', 3.25],
['W', 3.4],
['@', 3.45],
[' ', 0.93],
['\t', 13.2],
]
module.exports.charSizes = new Map(sizesArray)