Sauvegarde des fontes installées

This commit is contained in:
Fred Tempez 2024-01-06 23:18:05 +01:00
parent 127efc3925
commit 84b711eac5

View File

@ -1232,13 +1232,15 @@ class theme extends common
// Ajoute les fontes
$zip->addEmptyDir(self::DATA_DIR . 'font');
$fonts = $this->getData(['font', 'files']);
foreach ($fonts as $fontId => $fontName) {
$zip->addFile(self::DATA_DIR . 'font/' . $fontName, self::DATA_DIR . 'font/' . $fontName);
foreach ($fonts as $fontId => $fontInfo) {
$zip->addFile($fontInfo['resource'], $fontInfo['resource']);
}
if (file_exists(self::DATA_DIR . 'font/font.html')) {
$zip->addFile(self::DATA_DIR . 'font/font.html', self::DATA_DIR . 'font/font.html');
}
if (file_exists(self::DATA_DIR . 'font/font.css')) {
$zip->addFile(self::DATA_DIR . 'font/font.css', self::DATA_DIR . 'font/font.css');
}
break;
}