[TYPO3-core] RFC #14033: Feature: Fixed line height setting for Gifbuilder

Harald Glaser harald.glaser at creative.co.at
Mon Apr 19 20:03:36 CEST 2010


This is an SVN patch request.

Type: New feature

Bugtracker reference:
http://bugs.typo3.org/view.php?id=14033

Branches: trunk

Problem:
When using breakWidth (and optionally breakSpace), the lineheight 
depends on the text which is rendered.
So generating 2 multi-line texts with completely identical settings may 
yield different results, e.g. when only one of the two strings contains 
characters with descenders.
In my opinion, the lineheight for multiline text should not depend on 
the boundingbox of the given characters, but should depend on the 
configuration (font face, font size) - that's what we are used to.

Solution:
Since the changes mentioned above would require some serious rewriting 
of the calculation part in Gifbuilder and would globally change the 
current behaviour, I went for another solution/workaround:
The attached patch adds the property "breakSpaceFixed" to "text"-objects 
in Gifbuilder, which - if set - overrides the calculated line height.

Example usage (line height is set to 16px):

file = GIFBUILDER
file {
     ...
     10 = TEXT
     10.text.field = title
     10.breakWidth = 150
     10.breakSpaceFixed = 16
     ...
}


Br,
Harald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14033_breakSpaceFixed_trunk.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100419/77bcfe23/attachment.asc>


More information about the TYPO3-team-core mailing list