Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use default fonts for utf-8 text #29

Open
majid4466 opened this issue Apr 28, 2018 · 0 comments
Open

Cannot use default fonts for utf-8 text #29

majid4466 opened this issue Apr 28, 2018 · 0 comments

Comments

@majid4466
Copy link

I know how to print utf-8 text with custom fonts. But how about Arial and Courier?

Here is code to show case the issue:

$pdf = new PDF();
$pdf->AddPage();

// Arial
$pdf->SetFont('Arial','',14);
$pdf->Text(10, 10, 'Beløp');

// Courier
$pdf->SetFont('Courier','',14);
$pdf->Text(10, 20, 'Beløp');

// Custom font
$pdf->AddFont('GreatVibes','','GreatVibes.ttf',true);
$pdf->SetFont('GreatVibes','',14);
$pdf->Text(10, 30, 'Beløp');

$pdf->Output();

And this is the result:
utf8-default-fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant