mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°3685 Preload necessary fonts to speed up display
This commit is contained in:
committed by
Molkobain
parent
61ee4d6807
commit
b1b1d25186
@@ -20,6 +20,31 @@ use utils;
|
||||
*/
|
||||
class WebResourcesHelper
|
||||
{
|
||||
//---------------------------------
|
||||
// Fonts
|
||||
//---------------------------------
|
||||
|
||||
/**
|
||||
* Preload necessary fonts to display them as soon as possible when CSS rules are interpreted
|
||||
*
|
||||
* @return string[]
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function GetPreloadedFonts(): array
|
||||
{
|
||||
return [
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'css/font-combodo/combodo-webfont.woff2', 'type' => 'woff2'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'css/font-awesome/webfonts/fa-solid-900.woff2', 'type' => 'woff2'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-400-normal.woff', 'type' => 'woff'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-500-normal.woff', 'type' => 'woff'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-600-normal.woff', 'type' => 'woff'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-700-normal.woff', 'type' => 'woff'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-400-italic.woff', 'type' => 'woff'],
|
||||
['font' => utils::GetAbsoluteUrlAppRoot().'node_modules/@fontsource/raleway/files/raleway-all-500-italic.woff', 'type' => 'woff'],
|
||||
];
|
||||
}
|
||||
|
||||
//---------------------------------
|
||||
// CKEditor
|
||||
//---------------------------------
|
||||
|
||||
Reference in New Issue
Block a user