Implement 2 more parts

This commit is contained in:
Daniel Imms
2025-12-22 14:15:26 -08:00
parent 717399ceb6
commit bde3680cd1
2 changed files with 26 additions and 5 deletions
@@ -266,6 +266,10 @@ function drawPathDefinitionCharacterWithWeight(
}
for (const instruction of actualInstructions.split(' ')) {
const type = instruction[0];
if (type === 'Z') {
ctx.closePath();
continue;
}
const f = svgToCanvasInstructionMap[type];
if (!f) {
console.error(`Could not find drawing instructions for "${type}"`);
@@ -303,6 +307,10 @@ function drawVectorShape(
ctx.lineWidth = devicePixelRatio * cssLineWidth;
for (const instruction of charDefinition.d.split(' ')) {
const type = instruction[0];
if (type === 'Z') {
ctx.closePath();
continue;
}
const f = svgToCanvasInstructionMap[type];
if (!f) {
console.error(`Could not find drawing instructions for "${type}"`);