Skip to content

Commit cf633fb

Browse files
authored
fix(tcpdf): load font from custom directory (#2)
1 parent 8e62b47 commit cf633fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Tcpdf/TcpdfFonts.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ final class TcpdfFonts
1212

1313
public static function register(TCPDF $pdf): void
1414
{
15-
$fontPath = dirname(__DIR__, 2).'/resources/dist/fonts/tcpdf';
15+
$fontDirectory = dirname(__DIR__, 2).'/resources/dist/fonts/tcpdf/';
1616

17-
$pdf->AddFont(self::DEFAULT_FONT, '', 'notosansarabic.php', $fontPath);
18-
$pdf->AddFont(self::DEFAULT_FONT, 'B', 'notosansarabicb.php', $fontPath);
17+
$pdf->AddFont(self::DEFAULT_FONT, '', $fontDirectory.'notosansarabic.php');
18+
$pdf->AddFont(self::DEFAULT_FONT, 'B', $fontDirectory.'notosansarabicb.php');
1919
}
2020
}

0 commit comments

Comments
 (0)