Fix reading wrong property from font object for font string (#8315)

This commit is contained in:
LeeLenaleee
2021-01-16 20:13:13 +01:00
committed by GitHub
parent a730fc68fa
commit 32b3242585

View File

@@ -312,7 +312,7 @@ export function renderText(ctx, text, x, y, font, opts = {}) {
ctx.rotate(opts.rotation);
}
ctx.font = font.fontString;
ctx.font = font.string;
if (opts.color) {
ctx.fillStyle = opts.color;