Project

General

Profile

Actions

Bug #22399

closed

Gifbuilder using breakWidth/breakSpace: lineHeight depends on rendered text

Added by Harald Glaser about 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
-
Start date:
2010-04-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

gifbuilder_lineheight.gif (6.01 KB) gifbuilder_lineheight.gif Administrator Admin, 2010-04-08 16:05
14033_breakSpaceFixed_trunk.diff (650 Bytes) 14033_breakSpaceFixed_trunk.diff Administrator Admin, 2010-04-19 19:50

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #20164: Integrate automatic line breaks in GIFBUILDERClosedOliver Hader2009-03-11

Actions
Actions #1

Updated by Ron Hall about 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.

Actions #2

Updated by Harald Glaser about 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...

Actions #3

Updated by Harald Glaser about 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
}

Actions #4

Updated by Kim Lang about 13 years ago

When i used big Letters with German Umlauts the same problem appears

Actions #5

Updated by Kim Lang about 13 years ago

the patch doesn't work with the "niceText" option

Actions #6

Updated by Jan Kornblum about 11 years ago

  • Target version deleted (0)

Are there any news regarding this?

Actions #7

Updated by Mathias Schreiber over 9 years ago

  • Description updated (diff)
  • Target version set to 7.2 (Frontend)
  • Is Regression set to No
Actions #8

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #9

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #10

Updated by Benni Mack over 8 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #11

Updated by Mathias Schreiber over 8 years ago

  • Target version deleted (7 LTS)
Actions #12

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Image Cropping
Actions #13

Updated by Susanne Moog over 6 years ago

  • Category changed from Image Cropping to Image Generation / GIFBUILDER
Actions #14

Updated by Tymoteusz Motylewski about 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
  }
}

Actions #15

Updated by Tymoteusz Motylewski about 6 years ago

  • Related to Feature #20164: Integrate automatic line breaks in GIFBUILDER added
Actions #16

Updated by Gerrit Code Review about 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

Actions #17

Updated by Gerrit Code Review about 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

Actions #18

Updated by Tymoteusz Motylewski about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #19

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF