Skip to content

Commit a8525e2

Browse files
committed
fix text rendering wrap style
(cherry picked from commit 7fe0cdb)
1 parent 4a30892 commit a8525e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎ImageScript.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,8 +1234,8 @@ export class Image {
12341234
const layout = new fontlib.Layout();
12351235

12361236
layout.reset({
1237-
wrap_style: wrapStyle ? 'word' : 'letter',
1238-
max_width: Infinity === wrapWidth ? null : wrapWidth,
1237+
wrap_style: wrapStyle === this.WRAP_STYLE_WORD ? 'word' : 'letter',
1238+
max_width: Infinity === wrapWidth ? null : wrapWidth
12391239
});
12401240

12411241
layout.append(font, text, { scale });

0 commit comments

Comments
 (0)