Skip to content

Commit

Permalink
fix font issue
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Nov 14, 2018
1 parent 7824546 commit c1c3274
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,13 @@ export class CanvasForm extends VisualForm {
if (weight) this._font.weight = weight;
if (style) this._font.style = style;
if (lineHeight) this._font.lineHeight = lineHeight;
this._ctx.font = this._font.value;

} else {
this._font = sizeOrFont;
}

this._ctx.font = this._font.value;

// If using estimate, reapply it when font changes.
if (this._estimateTextWidth) this.fontWidthEstimate( true );

Expand Down

0 comments on commit c1c3274

Please sign in to comment.