Skip to content

Commit 82236ea

Browse files
Fix TextBox line height type (#34)
* Fix TextBox line height type \Intervention\Image\Typography\FontFactory lets you call `lineHeight` with a float for more line height options. Currently, the package only lets you provide a custom line height as an int. Since the default value is 1.6, this fix lets you set it to e.g. 1.8, which may be better if you are using a custom font or want to have more granular control over the layout that is being rendered. * Add PHP 8.4 to test matrix
1 parent 4c4fb26 commit 82236ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
php: [8.2, 8.3]
14+
php: [8.2, 8.3, 8.4]
1515
stability: [prefer-lowest, prefer-stable]
1616

1717
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

src/Layout/TextBox.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TextBox extends Box
2020
public ColorInterface $color;
2121
public Font $font;
2222
public string $hAlign;
23-
public int $lineHeight;
23+
public float $lineHeight;
2424
public int $size;
2525
public string $text;
2626
public string $vAlign;
@@ -43,7 +43,7 @@ public function hAlign(string $hAlign): self
4343
return $this;
4444
}
4545

46-
public function lineHeight(int $lineHeight): self
46+
public function lineHeight(float $lineHeight): self
4747
{
4848
$this->lineHeight = $lineHeight;
4949
return $this;

0 commit comments

Comments
 (0)