generated using php-font-lib (https://github.com/PhenX/php-font-lib). Examples: ./load_font.php silkscreen /usr/share/fonts/truetype/slkscr.ttf ./load_font.php 'Times New Roman' /mnt/c_drive/WINDOWS/Fonts/times.ttf EOD; exit; } if ($_SERVER["argc"] < 3 && @$_SERVER["argv"][1] != "system_fonts") { usage(); } $dompdf = new DOMPDF(); if (isset($fontDir) && realpath($fontDir) !== false) { $dompdf->getOptions()->set('fontDir', $fontDir); } /** * Installs a new font family * This function maps a font-family name to a font. It tries to locate the * bold, italic, and bold italic versions of the font as well. Once the * files are located, ttf versions of the font are copied to the fonts * directory. Changes to the font lookup table are saved to the cache. * * @param string $fontname the font-family name * @param string $normal the filename of the normal face font subtype * @param string $bold the filename of the bold face font subtype * @param string $italic the filename of the italic face font subtype * @param string $bold_italic the filename of the bold italic face font subtype * * @throws Exception