Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Mar 25, 2024
1 parent abb2a2d commit 5855213
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function cellTextHAlign(
}

/**
* Returns the top Y coordinate of the cell wrapping the text.
* Returns the baseline Y coordinate of the cell wrapping the text.
*
* @param float $txty Text baseline top Y coordinate in internal points.
* @param float $pheight Cell height in internal points.
Expand Down
6 changes: 2 additions & 4 deletions src/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ public function getTextCell(
$this->prepareText($txt, $ordarr, $dim, $forcedir);
$txt_pwidth = $dim['totwidth'];

$cell_pheight = $this->toPoints($height);
$cell = $this->adjustMinCellPadding($styles, $cell);

$cell_pheight = $this->toPoints($height);
if ($height <= 0) {
$cell_pheight = $this->cellMinHeight($valign, $cell);
}
Expand All @@ -153,9 +154,6 @@ public function getTextCell(
$cell
);

$curfont = $this->font->getCurrentFont();
$fontascent = $this->toUnit($curfont['ascent']);

$txt_pnty = $this->textVPosFromCell(
$cell_pnty,
$cell_pheight,
Expand Down

0 comments on commit 5855213

Please sign in to comment.