Skip to content

Commit 98cc18b

Browse files
authored
Update embed-subtitles-clip.ts
1 parent bbbe3c5 commit 98cc18b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/av-cliper/src/clips/embed-subtitles-clip.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ export class EmbedSubtitlesClip implements IClip {
117117
fontStyle,
118118
videoWidth,
119119
videoHeight,
120+
letterSpacing,
120121
} = this.#opts;
121122
this.#lineHeight = fontSize + this.#linePadding * 2;
122123
this.#cvs = new OffscreenCanvas(videoWidth, videoHeight);
123124
this.#ctx = this.#cvs.getContext('2d')!;
124125
this.#ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`;
125126
this.#ctx.textAlign = 'center';
126127
this.#ctx.textBaseline = 'top';
127-
this.#ctx.letterSpacing = this.#opts.letterSpacing ?? '0px';
128+
this.#ctx.letterSpacing = letterSpacing ?? '0px';
128129

129130
this.#meta = {
130131
width: videoWidth,

0 commit comments

Comments
 (0)