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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;