relocating

This commit is contained in:
twotalesanimation
2025-12-30 20:59:58 +02:00
parent a898c35a39
commit e8e9b1f03c
117 changed files with 2104 additions and 8554 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
require __DIR__ . '/vendor/autoload.php';
use Dompdf\Dompdf;
use Dompdf\Options;
use FontLib\Font;
$fontDir = __DIR__ . '/storage/fonts/';
$fontCache = __DIR__ . '/storage/fonts/';
// Create directories if they don't exist
if (!is_dir($fontDir)) {
mkdir($fontDir, 0755, true);
}
// Font file path
$fontFile = __DIR__ . '/resources/fonts/AbrilFatface-Regular.ttf';
if (!file_exists($fontFile)) {
die("Font file not found: $fontFile\n");
}
// Copy font to storage/fonts
$destFont = $fontDir . 'AbrilFatface-Regular.ttf';
copy($fontFile, $destFont);
echo "Font copied to: $destFont\n";
// Load the font to generate metrics
$font = Font::load($fontFile);
$font->parse();
$font->saveAdobeFontMetrics($fontDir . 'AbrilFatface-Regular.ufm');
echo "Font metrics generated successfully!\n";
echo "Font 'AbrilFatface-Regular' is now available for use in PDFs.\n";