Skip to content

Commit 3bebfee

Browse files
committed
fix load collage font path
1 parent 8e088ec commit 3bebfee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

admin/generator/index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@
107107
foreach ($font_paths as $path) {
108108
try {
109109
$files = FontUtility::getFontsFromPath($path, false);
110-
$files = array_map(fn ($file): string => PathUtility::getPublicPath($file), $files);
111110
if (count($files) > 0) {
112-
foreach ($files as $name => $path) {
111+
foreach ($files as $name => $fontPath) {
112+
$publicPath = PathUtility::getPublicPath($fontPath);
113113
$font_styles .= '
114114
@font-face {
115115
font-family: "' . $name . '";
116-
src: url(' . $path . ') format("truetype");
116+
src: url(' . $publicPath . ') format("truetype");
117117
}
118118
';
119-
$font_family_options[$path] = $name;
119+
$font_family_options[$publicPath] = $name;
120120
}
121121
}
122122
} catch (\Exception $e) {

0 commit comments

Comments
 (0)