[TYPO3] multiple line text with gifbuilder

Krystian Szymukowicz typo3RE.MO.VE. at RE.MO.VE.prolabium.com
Fri Jun 6 07:57:31 CEST 2008


Krystian Szymukowicz wrote:
> I wonder how do you cope with multiline text build with GIFBUILDER.
> 
> 
> All examples of multiline text with gifbulder I've found are like this:
> http://www.typo3wizard.com/en/snippets/gifbuilder/multiple-line-text-with-gifbuilder.html 
> 
> 
> But this way has disadvantage as it defines XY as:
> 
>   XY = 400,[10.h]+[20.h]+[30.h]+[40.h]+20
> 
> 
> It adds number "20" at the end to compensate space between lines of text 
> (added by offset in split)
> 
> If there is only one line of text we have [10.h]+20 which builds a 20px 
> gap below the text. If there is 4 line of text there is no gap. It leads 
> to inconsistency in design :(

I did solve it by using fake text generated with negative offset. The 
height is taken from fake instead of real text. Fake text size is set to 
20 and the real to 17. It allows to define gap of 6px between the lines.


// FAKE for setting the XY

XY = 440,[1.h]+[2.h]+[3.h]+[4.h]

  1 = TEXT
  1.fontSize = 20
  1.text.current = 1

  1.text.listNum.splitChar = |
  1.text.listNum = 0
  1.offset= -200,-200

  2 < .1
  2.text.listNum=1
  3 < .1
  3.text.listNum=2
  4 < .1
  4.text.listNum=3


// and here real text which appears

   10 = TEXT
   10.fontSize = 17
   10.text.current = 1

   10.text.listNum.splitChar = |
   10.text.listNum = 0

   10.offset=0,18
   20 < .10
   20.text.listNum=1
   20.offset=0,18+[10.h]+6
   30 < .10
   30.text.listNum=2
   30.offset=0,18+[10.h]+[20.h]+12
   40 < .10
   40.text.listNum=3
   40.offset=0,18+[10.h]+[20.h]+[30.h]+18




Inspired by:
http://lists.netfielders.de/pipermail/typo3-english/2007-March/036996.html


-- 
grtz
Krystian Szymukowicz


More information about the TYPO3-english mailing list