Skip to content

Commit

Permalink
feat(2d): support letter spacing in Code (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthificial committed Feb 13, 2024
1 parent 3b528cc commit 2a87c37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/2d/src/lib/components/Code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ export class Code extends Shape {
super.applyText(context);
context.font = this.styles.font;
context.textBaseline = 'top';
if ('letterSpacing' in context) {
context.letterSpacing = this.styles.letterSpacing;
}
}

protected override collectAsyncResources(): void {
Expand Down

0 comments on commit 2a87c37

Please sign in to comment.