Fix rendering with multiple fonts defined (Fix #796)

This commit is contained in:
MoyuScript
2017-12-12 21:06:24 +08:00
parent 2102390a89
commit 439d7c40b4
3 changed files with 4 additions and 2 deletions

View File

@ -215,8 +215,7 @@ export default class CanvasRenderer implements RenderTarget<HTMLCanvasElement> {
font.fontSize,
font.fontFamily
]
.join(' ')
.split(',')[0];
.join(' ');
textBounds.forEach(text => {
this.ctx.fillStyle = color.toString();