• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/assets/manager.php
  • Класс: BitrixLandingAssetsManager
  • Вызов: Manager::checkFontLinkType
static function checkFontLinkType(string $path): string
{
	//woff2 must be before woff, because strpos find woff in woff2 ;)
	$available = [
		'woff2' => 'font/woff2',
		'woff' => 'font/woff',
		'ttf' => 'font/ttf',
		'eot' => 'application/vnd.ms-fontobject',
		'svg' => 'image/svg+xml',
	];

	$linkType = '';
	foreach ($available as $type => $value)
	{
		if (mb_strpos($path, $type) !== false)
		{
			$linkType = $value;
			break;
		}
	}

	return $linkType;
}