Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed Dec 14, 2024
1 parent 26915ef commit f839b61
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils/glyph/tiny-sdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class TinySDF {

const ctx = $offscreenCanvas.getContext('2d', {
willReadFrequently: true,
});
}) as CanvasRenderingContext2D;
this.ctx = ctx;
ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`;

Expand Down
9 changes: 9 additions & 0 deletions packages/site/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ call(() => {
RoughRect,
RoughPolyline,
RoughPath,
Text,
deserializeNode,
fromSVGElement,
TesselationMethod,
Expand Down Expand Up @@ -204,6 +205,14 @@ call(() => {
canvas.appendChild(group);
}
});

const text = new Text({
x: 300,
y: 500,
content: 'Hello, world!',
fontSize: 20,
});
canvas.appendChild(text);
});

$icCanvas.addEventListener('ic-frame', (e) => {
Expand Down
9 changes: 9 additions & 0 deletions packages/site/docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ call(() => {
RoughRect,
RoughPolyline,
RoughPath,
Text,
deserializeNode,
fromSVGElement,
TesselationMethod,
Expand Down Expand Up @@ -204,6 +205,14 @@ call(() => {
canvas.appendChild(group);
}
});

const text = new Text({
x: 300,
y: 500,
content: 'Hello, world!',
fontSize: 20,
});
canvas.appendChild(text);
});

$icCanvas.addEventListener('ic-frame', (e) => {
Expand Down

0 comments on commit f839b61

Please sign in to comment.