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

Use freeserif as font in TCPDF for scissors #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ final class TcPdfOutput extends AbstractOutput
private const ALIGN_RIGHT = 'R';
private const ALIGN_CENTER = 'C';
private const FONT = 'Helvetica';
private const FONT_UNICODE = 'zapfdingbats';
private const FONT_UNICODE_CHAR_SCISSORS = '"';
private const FONT_UNICODE_CHAR_DOWN_ARROW = 't';
private const FONT_UNICODE = 'freeserif';
private const FONT_UNICODE_CHAR_SCISSORS = '';
private const FONT_UNICODE_CHAR_DOWN_ARROW = '';

// Ratio
private const LEFT_CELL_HEIGHT_RATIO_COMMON = 1.2;
Expand Down Expand Up @@ -269,7 +269,8 @@ private function addSeparatorContentIfNotPrintable(): void
$yoffset = 5.5;
$this->tcPdf->SetFont(self::FONT_UNICODE, '', self::FONT_SIZE_DOWN_ARROW);

$arrows = str_pad('', 3, self::FONT_UNICODE_CHAR_DOWN_ARROW);
// length is 9 because char is multibyte. mb_str_pad is only available since [email protected]
$arrows = str_pad('', 9, self::FONT_UNICODE_CHAR_DOWN_ARROW);

$xstart = ($this->tcPdf->getPageWidth() / 2) - ($textWidth / 2);
$this->tcPdf->setXY($xstart - $arrowMargin, $y - $yoffset);
Expand Down
Binary file modified tests/TestData/TcPdfOutput/qr-additional-information.svg.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-alternative-schemes.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-alternative-schemes.svg.print.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.textarrows.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.textarrows.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-payment-reference-non.svg.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-payment-reference-scor.svg.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.textarrows.pdf
Binary file not shown.
Loading