You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When i want to write a bigger text with a maxWidth in place it does wrap the text but doesn't apply the Alignment
To Reproduce
constfs=require("fs")const{ Image, TextLayout }=require("imagescript")constmaxSize=600// add font as needed!consttext="Thats way to big to fit on one line, please Center it :)"constfont=fs.readFileSync('your font :)')constgenFile=async()=>{constwhite=Image.rgbToColor(255,255,255)constparams=newTextLayout({maxWidth: maxSize,wrapStyle: 'word',verticalAlign: 'center',horizontalAlign: 'top'})consttxt=awaitImage.renderText(font,50,text,white,params)constencoded=awaitimage.encode(1,{creationTime: 0,software: ''});fs.writeFileSync('./test-is.png',encoded)}genFile()
Expected behavior
Align the Text at the center when set in verticalAlign Options and the text got Wrapped.
Fixed in 3.0.0. The option names were also mixed up: horizontalAlign now takes left/center/right and verticalAlign takes top/middle/bottom. The old values are still accepted.
Activity
matmen commentedon Oct 14, 2026
Fixed in 3.0.0. The option names were also mixed up: horizontalAlign now takes left/center/right and verticalAlign takes top/middle/bottom. The old values are still accepted.