[TYPO3] gifbuilder / GMENU font height problem
Peter
typo3 at peter-b.org
Sat Mar 10 09:20:21 CET 2007
Peter wrote:
> Hi all,
>
> I've got an issue that's bugging me, any pointers appreciated:
>
> I have a GMENU with some items that span more than one line. Using
> multi-line items means that I have to use calc to set the image height
> for each menu item.
>
> However, thanks to a combination of the font and the text used in the
> menu items, the single-line items come out at 3 or 4 different heights
> depending on the charachters used.
>
> If I weren't using multi-line, I'd stop using calc and this would solve
> the problem.
>
> None of min, useLargestY and distributeY are appropriate as the single
> line and multi-line menu items are supposed to be different.
>
> Any suggestions?
>
> Peter.
In the absence of useful info, I ended up creating a text object that
uses the full height of the font by having a range of characters hidden
using an offset. Possibly not the most elegant solution, but works for me.
lib.mainNav = HMENU
lib.mainNav {
1 = GMENU
1 {
NO = 1
NO {
1 = TEXT
1 {
fontFile = fileadmin/fonts/CGOR65W.TTF
fontColor = #ffffcc
fontSize = 18
offset = 200,200
align = left
niceText = 1
}
10 < .1
10.text.field = title
10.offset = 5,20
1.text = QWERTYUIOP qwertyuiop
XY = 200,[1.h]+10
....
}
RO < .NO
....
}
2 {
....
}
....
}
Feature request: maybe a lineheight property could be added to
GMENU/TEXT / GIFBUILDER/TEXT objects?
Peter.
More information about the TYPO3-english
mailing list