Add image drawing

This commit is contained in:
Dylan Pizzo
2025-01-06 23:34:41 -05:00
parent b0249f8baf
commit 0e9661f146
3 changed files with 62 additions and 16 deletions

View File

@@ -235,13 +235,13 @@ export const measureDominionText = async (
}
line.width = line.pieces
.map((piece) => piece.measure.width)
.reduce((a, b) => a + b);
.reduce((a, b) => a + b, 0);
return line;
}),
width: Math.max(...lines.map((line) => line.width)),
height: lines
.map((line) => line.ascent + line.descent)
.reduce((a, b) => a + b),
.reduce((a, b) => a + b, 0),
};
};