jimp-dev/jimp

Printed text doesn't Wrap at Max Width

Open

#710 opened on Mar 10, 2019

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (13,218 stars) (785 forks)batch import
bughelp wanted

Description

Expected Behavior

Text Should Wrap when specified max width is reached

Current Behavior

Text Doesn't Wrap, keeps going

Failure Information (for bugs)

No Erros

Steps to Reproduce

1.Read Image 2. Print Text on Image Specifying Max Width 3. Save Image

        let image = {};
        return Jimp.read('app/background.png')
        .then(imageResponse => {
            // Image is 500 x 500
            image = imageResponse
            return Jimp.loadFont(Jimp.FONT_SANS_64_BLACK);
        })
        .then(font => {
            return image.print(font, margin, margin, 'Very Long Hello WOrld Text', 200)
        })
        .then(image => {
            return image.writeAsync(`app/new-${(new Date()/1000)}.png`);
        })

IF YOUR ISSUE DEPENDS ON A PARTICULAR IMAGE BE SURE TO INCLUDE THIS AS WELL. WE CAN'T REPORDUCE IF WE DON'T HAVE YOUR IMAGE

Screenshots

Context

  • Jimp Version: 0.6.0
  • Operating System: Mac Mojave
  • Node version: 7

Failure Logs

Contributor guide