changed to mpdf packagein sticker pdf service
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m34s
Laravel Larastan / larastan (pull_request) Failing after 4m46s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m34s
Laravel Larastan / larastan (pull_request) Failing after 4m46s
This commit is contained in:
@@ -669,12 +669,20 @@ class StickerPdfService
|
|||||||
$ttfPath = storage_path('app/fonts/' . $font . '.ttf');
|
$ttfPath = storage_path('app/fonts/' . $font . '.ttf');
|
||||||
|
|
||||||
if (file_exists($ttfPath)) {
|
if (file_exists($ttfPath)) {
|
||||||
$font = TCPDF_FONTS::addTTFfont(
|
$fontName = pathinfo($ttfPath, PATHINFO_FILENAME);
|
||||||
$ttfPath,
|
|
||||||
'TrueTypeUnicode',
|
$mpdf = new \Mpdf\Mpdf([
|
||||||
'',
|
'fontDir' => [
|
||||||
32
|
dirname($ttfPath),
|
||||||
);
|
],
|
||||||
|
'fontdata' => [
|
||||||
|
'customfont' => [
|
||||||
|
'R' => basename($ttfPath),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$font = 'customfont';
|
||||||
} else {
|
} else {
|
||||||
$font = 'helvetica';
|
$font = 'helvetica';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user