terence410 / ultimate-text-to-image

MIT License
32 stars 6 forks source link

Lines continue after text is wrapped #15

Closed TomBenSinai closed 7 months ago

TomBenSinai commented 7 months ago

I am trying to create a square with text inside vertically and horizontally aligned. For some reason the lines continue after the letters are ending: image

The code is:

let dataUri = new UltimateTextToImage("Testing if this is good already, I guess not...", {
        fontFamily: "Almoni ML v5 AAA, Noto Emoji, Arial, MS UI Gothic",
        fontColor: "#00FF00",
        width: 400,
        height: 400,
        underlineColor: "#00FFFF33",
        underlineSize: 2,
        maxHeight: 1000,
        valign: "middle",
        align: "center",
        margin: 20,
    }).render().toFile(path.join(__dirname, "test2.jpg"))
TomBenSinai commented 7 months ago

This was the font. changed to something else and it worked.