Sauvegarde des fontes installées

This commit is contained in:
Fred Tempez 2024-01-06 23:17:45 +01:00
parent b6b5461241
commit 9ae67cd2f3

View File

@ -1226,13 +1226,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;
}
$ret = $zip->close();