Theme: Fix bug in web font loader.
This commit is contained in:
@@ -28,26 +28,30 @@ header("Content-type: text/javascript; charset: UTF-8");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($fonts, $tmp_array);
|
unset($tmp_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//optimize fonts array
|
//optimize fonts array
|
||||||
$fonts = array_unique($fonts);
|
if (is_array($fonts) && sizeof($fonts) > 0) {
|
||||||
$common_fonts = 'arial,arial black,arial narrow,calibri,'.
|
$fonts = array_unique($fonts);
|
||||||
'candara,apple gothic,geneva,tahoma,microsoft sans serif,'.
|
$common_fonts = 'serif,sans-serif,arial,arial black,arial narrow,calibri,'.
|
||||||
'lucidia,lucidia console,monaco,lucidia sans unicode,'.
|
'candara,apple gothic,geneva,tahoma,microsoft sans serif,'.
|
||||||
'lucidiagrande,consolas,menlo,trebuchet,trebuchet ms,'.
|
'lucidia,lucidia console,monaco,lucidia sans unicode,'.
|
||||||
'helvetica,times,times new roman,courier,courier new,'.
|
'lucidiagrande,consolas,menlo,trebuchet,trebuchet ms,'.
|
||||||
'impact,comic sans,comic sans ms,georgia,palatino,'.
|
'helvetica,times,times new roman,courier,courier new,'.
|
||||||
'palatino linotype,verdana,franklin gothic,'.
|
'impact,comic sans,comic sans ms,georgia,palatino,'.
|
||||||
'franklin gothic medium,gill sans,gill sans mt,'.
|
'palatino linotype,verdana,franklin gothic,'.
|
||||||
'brush script,corbel';
|
'franklin gothic medium,gill sans,gill sans mt,'.
|
||||||
$common_fonts = array(explode(',', $common_fonts));
|
'brush script,corbel,segoe,segoe ui,optima,';
|
||||||
foreach ($fonts as $index => $font) {
|
$common_fonts = explode(',', $common_fonts);
|
||||||
if (in_array(strtolower($font), $common_fonts)) {
|
foreach ($fonts as $index => $font) {
|
||||||
unset($fonts[$index]);
|
if (in_array(strtolower($font), $common_fonts)) {
|
||||||
|
unset($fonts[$index]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//load fonts
|
//load fonts
|
||||||
if (is_array($fonts) && sizeof($fonts) > 0) {
|
if (is_array($fonts) && sizeof($fonts) > 0) {
|
||||||
if ($_SESSION['theme']['font_retrieval']['text'] == 'asynchronous') {
|
if ($_SESSION['theme']['font_retrieval']['text'] == 'asynchronous') {
|
||||||
|
|||||||
Reference in New Issue
Block a user