test: update text test

This commit is contained in:
Zeno Zeng 2022-03-09 22:58:22 +08:00
parent 8f27fe0974
commit 298cb72b74
2 changed files with 3 additions and 5 deletions

View File

@ -4,6 +4,7 @@
"description": "svgcanvas",
"main": "dist/svgcanvas.js",
"scripts": {
"watch": "rollup -c -w",
"build": "rollup -c",
"prepublishOnly": "npm run build",
"test": "karma start"

View File

@ -1,8 +1,5 @@
export default function text(ctx) {
ctx.font = "normal 36px Times";
ctx.font = "normal 120px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("A Text Example", 50, 50);
ctx.font = "normal 36px Arial";
ctx.strokeStyle = "#000000";
ctx.strokeText("A Text Example", 50, 90);
ctx.fillText("Hello", 0, 200);
};