You are here

function fontyourface_wysiwyg_generate_css in @font-your-face 7.2

Generates CSS.

1 call to fontyourface_wysiwyg_generate_css()
fontyourface_wysiwyg_preprocess_page in modules/fontyourface_wysiwyg/fontyourface_wysiwyg.module
Implements template_preprocess_page().

File

modules/fontyourface_wysiwyg/fontyourface_wysiwyg.module, line 30

Code

function fontyourface_wysiwyg_generate_css($fonts = FALSE) {

  // Get font list.
  if (!$fonts) {
    $fonts = fontyourface_get_fonts();
  }

  // if
  // Generate CSS.
  $css = '';
  foreach ($fonts as $font) {
    $font_css = fontyourface_font_css($font);
    if ($font_css != '') {
      $css .= '.fontyourface-' . $font->fid . ' { ' . $font_css . ' }' . "\n";
    }

    // if
  }

  // foreach
  return $css;
}