You are here

function fontyourface_by_font_name in @font-your-face 6

Provides usort() callback.

2 string references to 'fontyourface_by_font_name'
fontyourface_admin_add_page in ./fontyourface.module
Add page shows available fonts.
fontyourface_preprocess_page in ./fontyourface.module
Implements template_preprocess_page().

File

./fontyourface.module, line 642

Code

function fontyourface_by_font_name($a, $b) {
  if (is_object($a)) {
    if ($a->name == $b->name) {
      return 0;
    }
    return $a->name > $b->name ? 1 : -1;
  }

  // if
  if ($a['font name'] == $b['font name']) {
    return 0;
  }
  return $a['font name'] > $b['font name'] ? 1 : -1;
}