function local_fonts_preprocess_html in @font-your-face 7.2
Implements template_preprocess_html().
File
- modules/
local_fonts/ local_fonts.module, line 487
Code
function local_fonts_preprocess_html(&$vars) {
if (!empty($vars['fontyourface'])) {
foreach ($vars['fontyourface'] as $used_font) {
if ($used_font->provider == 'local_fonts') {
$metadata = unserialize($used_font->metadata);
if (module_exists('google_webfont_loader_api')) {
$font_info = array(
'custom_families' => array(
$used_font->css_family,
),
'custom_style_css' => array(
$metadata['path'],
),
);
_google_webfont_loader_api_load_font($font_info);
}
else {
fontyourface_add_css_in_preprocess($vars, $metadata['path'], FALSE);
}
}
// if
}
// foreach
}
// if
}