Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | sw.patch | 538 bytes | catorghans |
#3 | d02625900add3c23efcda35a5ec60f17.png | 462 bytes | catorghans |
#2 | doubleline.gif | 4.44 KB | troybthompson |
Comments
Comment #1
Agileware CreditAttribution: Agileware commentedHi 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.
Comment #2
troybthompson CreditAttribution: troybthompson commentedThanks 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.
Comment #3
catorghans CreditAttribution: catorghans commentedI can confirm the problem in 5.x-1.4
Comment #4
MarsID CreditAttribution: MarsID commentedYep, 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?
Comment #5
catorghans CreditAttribution: catorghans commentedfound 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);
Comment #6
open-keywords CreditAttribution: open-keywords commentedI 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
Comment #7
Agileware CreditAttribution: Agileware commented@catorghans patch works for me. Committed in 5.x.1-5