function fontyourface_generate_css in @font-your-face 7.2
Generates CSS.
1 call to fontyourface_generate_css()
- fontyourface_preprocess_html in ./
fontyourface.module - Implements template_preprocess_html().
File
- ./
fontyourface.module, line 191
Code
function fontyourface_generate_css($fonts = FALSE) {
// Get font list.
if (!$fonts) {
$fonts = fontyourface_font_registry() + fontyourface_get_fonts();
}
// if
// Generate CSS.
$css = '';
foreach ($fonts as $font) {
$font_css = fontyourface_font_css($font);
if ($font_css != '' && $font->css_selector != '' && $font->css_selector != '<none>') {
$css .= $font->css_selector . ' { ' . $font_css . ' }' . "\n";
}
// if
}
// foreach
return $css;
}