Skip to content

Commit b66967c

Browse files
committed
Bump GitHub CI Node version.
1 parent d5a99f5 commit b66967c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/ci-workflow.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
strategy:
1110
matrix:
12-
node-version: [12.x]
11+
node-version: [16.x]
1312

1413
steps:
1514
- uses: actions/checkout@v2

demos/node/fonts.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ const fClef = 0xe062;
2222
const gClef = 0xe050;
2323

2424
function canvas1() {
25-
const canvas = createCanvas(850, 400);
25+
const canvas = createCanvas(1600, 700);
2626
const ctx = canvas.getContext('2d');
27+
ctx.scale(2, 2);
2728
ctx.font = '100px Bravura';
2829
ctx.fillText(String.fromCharCode(gClef, 0x20, fClef), 20, 220);
2930
return canvas;
@@ -32,15 +33,16 @@ function canvas1() {
3233
function canvas2() {
3334
const dom = new JSDOM(`<!DOCTYPE html><body></body>`);
3435
const canvas = dom.window.document.createElement('canvas');
35-
canvas.width = 850;
36-
canvas.height = 400;
36+
canvas.width = 1700;
37+
canvas.height = 800;
3738
const ctx = canvas.getContext('2d');
39+
ctx.scale(2, 2);
3840
ctx.font = '100px PetalumaScript';
39-
ctx.fillText('Hello PetalumaScript', 20, 220);
41+
ctx.fillText('This is the\nPetalumaScript\nText Font', 20, 130);
4042
return canvas;
4143
}
4244

4345
console.log(
4446
`<!DOCTYPE html><html><head><style>img { border: 1px solid #666; }</style></head><body>` +
45-
`<img src="${canvas1().toDataURL()}"><br><img src="${canvas2().toDataURL()}"></body></html>`
47+
`<img width="800" src="${canvas1().toDataURL()}"><br><img width="850" src="${canvas2().toDataURL()}"></body></html>`
4648
);

0 commit comments

Comments
 (0)