[BUGFIX] Make line height configurable for Gifbuilder 27/56327/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Sat, 17 Mar 2018 16:49:56 +0000 (17:49 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 17 Mar 2018 17:14:23 +0000 (18:14 +0100)
If `lineHeight` is set then its value would be taken
as line height instead of line height calculated from given text.

Resolves: #22399
Releases: master, 8.7
Change-Id: Ibc38559a6c7fc616c2b25b419a3bc6feddf87a61
Reviewed-on: https://review.typo3.org/56327
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php

index b2055a7..ad9487d 100644 (file)
@@ -740,6 +740,10 @@ class GraphicalFunctions
         }
         // Set original lineHeight (used by line breaks):
         $theBBoxInfo['lineHeight'] = $y;
+        if (!empty($conf['lineHeight'])) {
+            $theBBoxInfo['lineHeight'] = (int)$conf['lineHeight'];
+        }
+
         // If any kind of spacing applys, we use this function:
         if ($spacing || $wordSpacing) {
             $x = 0;