diff --git a/src/Cell.php b/src/Cell.php index 082af39..4324cf6 100644 --- a/src/Cell.php +++ b/src/Cell.php @@ -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. diff --git a/src/Text.php b/src/Text.php index 52200bf..124e7f7 100644 --- a/src/Text.php +++ b/src/Text.php @@ -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); } @@ -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,