UNPKG
opentype.js
Version:
latest (1.3.4)
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0
0.12.0
0.11.0
0.10.0
0.9.0
0.8.0
0.7.3
0.7.2
0.7.1
0.7.0
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.0.1
OpenType font parser
github.com/opentypejs/opentype.js
opentypejs/opentype.js
opentype.js
/
src
/
draw.js
12 lines
(9 loc)
•
256 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
// Drawing utility functions.
// Draw a line on the given context from point `x1,y1` to point `x2,y2`.
function
line
(ctx, x1, y1, x2, y2) { ctx
.beginPath
(); ctx
.moveTo
(x1, y1); ctx
.lineTo
(x2, y2); ctx
.stroke
(); } export default {
line
};