When I turn on the Multiline feature and enter a max width, instead of continuing the text onto another line, the same text that fits onto the first line is repeated on the 2nd line.

Would it be possible to generate each word as a separate image? That way, the words would simply wrap to available width.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Agileware’s picture

Hi troybthompson,

There is a bug in the multiline functionality that can cause a blank line to be displayed before your text. This has already been fixed in the D6 version and must have been missed in the D5 version. It has now been fixed in the D5 version so version 5.x-1.4 has that fixed.

Is that the bug you were referring to or is your text actually appearing twice?

Also, since 5.x-1.3, the height of the images is constant so you can use signwriter to create separate images for each word and they will butt together correctly. For an example of usage for this see #213214: Consistent baseline position for text.

troybthompson’s picture

FileSize
4.44 KB

Thanks for the link, I'll take a look at that solution.

The text actually repeats what fits on the first line as the second line, I've attached a sample. I have multiline checked, and max width set. If I turn on drop shadow, it works like it should. When I turn off drop shadow, this problem occurs again.

catorghans’s picture

I can confirm the problem in 5.x-1.4

MarsID’s picture

Version: 5.x-1.3 » 5.x-1.4

Yep, i have exactly the same problem.
It only seems to work with shadows turned on...
And the x- and y offset must be set, zero is not tolerated.
Somebody an idea or a fix?

catorghans’s picture

Status: Active » Needs review
FileSize
538 bytes

found it:

in signwriter.module on line 753:
imagettftext($im, $size, $angle, $x + abs($box[0]), $y + abs($box[5]), $foreground, $fontfile, $text);

should be

imagettftext($im, $size, $angle, $x + abs($box[0]), $y + abs($box[5]), $foreground, $fontfile, $line);

open-keywords’s picture

I have the same issue, but the patch proposed by @catorghans doesn't seem to fix anything, I'm afraid.

I confirm that checking "drop shadow" makes it work. I chose to have a blank shadow, then it doesn't shows up (in my case)

Thanks again for this module

Agileware’s picture

Version: 5.x-1.4 » 5.x-1.5
Assigned: Unassigned » Agileware
Status: Needs review » Fixed

@catorghans patch works for me. Committed in 5.x.1-5

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.