Skip to content

Commit

Permalink
Fix canvas height for single-lined stroked text (#8906)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Dec 12, 2022
1 parent e2352ac commit bbe07a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/text/src/TextMetrics.ts
Expand Up @@ -153,7 +153,7 @@ export class TextMetrics
}

const lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness;
let height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness)
let height = Math.max(lineHeight, fontProperties.fontSize + (style.strokeThickness * 2))
+ ((lines.length - 1) * (lineHeight + style.leading));

if (style.dropShadow)
Expand Down

0 comments on commit bbe07a3

Please sign in to comment.