You are here

function fontyourface_font_registry in @font-your-face 7.2

Same name and namespace in other branches
  1. 6.2 fontyourface.module \fontyourface_font_registry()
  2. 7 fontyourface.module \fontyourface_font_registry()

Manages registry of fonts used on current page, to provide list to fontyourface_preprocess_html().

6 calls to fontyourface_font_registry()
fontyourface_add_theme_info_fonts in ./fontyourface.module
Load and display fonts that have been added through THEMENAME.info.
fontyourface_generate_css in ./fontyourface.module
Generates CSS.
fontyourface_preprocess_html in ./fontyourface.module
Implements template_preprocess_html().
fontyourface_preview in ./fontyourface.module
Gets preview from provider, if available.
fontyourface_ui_admin_edit_form in modules/fontyourface_ui/fontyourface_ui.module
Edit form changes a single font, including CSS selector and enabled status.

... See full list

File

./fontyourface.module, line 559

Code

function fontyourface_font_registry($font = FALSE, $clear = FALSE) {
  static $fonts = array();
  if ($clear) {
    $fonts = array();
  }

  // if
  if ($font) {
    $fonts[$font->fid] = $font;
  }

  // if
  return $fonts;
}