Bug #22399
closedGifbuilder using breakWidth/breakSpace: lineHeight depends on rendered text
100%
Description
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 (see attached example).
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.
(issue imported from #M14033)
Files
Updated by Ron Hall over 14 years ago
Yes. I have discovered the same issue. It creates a real problem with graphic headlines. Right now I am creating a copy of the font file, editing it and adding invisible descenders to the upper and lower case vowels. This makes GIFBUILDER calculate the line heights consistently, but is an awkward workaround.
It would be great as noted by Harald to have GIFBUILDER calculate the same height regardless of whether there are descenders or not.
Even better would be a property for specifying custom line heights as the default line height of a font is not always optimum.
Updated by Harald Glaser over 14 years ago
As a workaround I have XClasses GifBuilder and added a new property "breakSpaceFixed", which is used as a fixed line height when set.
I will try to compile a .diff-file and post it as soon as I find some time...
Updated by Harald Glaser over 14 years ago
I just uploaded a patch (compiled against trunk, but also tested with 4.3.3).
It 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
}
Updated by Kim Lang over 13 years ago
When i used big Letters with German Umlauts the same problem appears
Updated by Kim Lang over 13 years ago
the patch doesn't work with the "niceText" option
Updated by Jan Kornblum over 11 years ago
- Target version deleted (
0)
Are there any news regarding this?
Updated by Mathias Schreiber over 9 years ago
- Description updated (diff)
- Target version set to 7.2 (Frontend)
- Is Regression set to No
Updated by Benni Mack about 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog about 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack almost 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Riccardo De Contardi almost 9 years ago
- Category set to Image Cropping
Updated by Susanne Moog almost 7 years ago
- Category changed from Image Cropping to Image Generation / GIFBUILDER
Updated by Tymoteusz Motylewski over 6 years ago
- TYPO3 Version changed from 4.3 to 9
- PHP Version deleted (
5.2)
here is the code to reproduce it on current master:
The attached patch worked (also with nice text set to 1 on current master)
page = PAGE page.10 = TEXT page.10.value = HELLO WORLD! page.20 = IMAGE page.20 { XY = 200,100 file = GIFBUILDER file { width = 200 height = 100 backColor = black 10 = TEXT 10.fontColor = white 10.text = Kuturelle & Soziale Aktivitat 10.fontSize = 15 10.niceText = 1 10.align = left 10.offset = 20,20 10.breakWidth = 150 10.lineHeight = 25 } } page.30 = IMAGE page.30 { XY = 200,100 file = GIFBUILDER file { width = 200 height = 100 backColor = black 10 = TEXT 10.fontColor = white 10.text = Mitarbeiter - Fundament des Erfolgs 10.fontSize = 15 10.niceText = 1 10.align = left 10.offset = 20,20 10.breakWidth = 150 10.lineHeight = 25 } }
Updated by Tymoteusz Motylewski over 6 years ago
- Related to Feature #20164: Integrate automatic line breaks in GIFBUILDER added
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56327
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56330
Updated by Tymoteusz Motylewski over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 277dbe8d46569299f002da2ccf2d94a4c7fcdf40.
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed