function fontyourface_font_css in @font-your-face 7
Same name and namespace in other branches
- 8.3 fontyourface.module \fontyourface_font_css()
- 6.2 fontyourface.module \fontyourface_font_css()
- 7.2 fontyourface.module \fontyourface_font_css()
Creates CSS with any properties set on font.
16 calls to fontyourface_font_css()
- common_fonts_fontyourface_preview in modules/
common_fonts/ common_fonts.module - Implements hook_fontyourface_preview().
- common_fonts_fontyourface_view in modules/
common_fonts/ common_fonts.module - Implements hook_fontyourface_view().
- fontdeck_fontyourface_preview in modules/
fontdeck/ fontdeck.module - Implements hook_fontyourface_preview().
- fontdeck_fontyourface_view in modules/
fontdeck/ fontdeck.module - Implements hook_fontyourface_view().
- fonts_com_fontyourface_preview in modules/
fonts_com/ fonts_com.module - Implements hook_fontyourface_preview().
File
- ./
fontyourface.module, line 1076
Code
function fontyourface_font_css($font) {
$css = array();
if ($font->css_family) {
$css[] = 'font-family: ' . $font->css_family . ';';
}
// if
if ($font->css_style) {
$css[] = 'font-style: ' . $font->css_style . ';';
}
// if
if ($font->css_weight) {
$css[] = 'font-weight: ' . $font->css_weight . ';';
}
// if
return implode(' ', $css);
}