You are here

function google_fonts_api_fontyourface_view in @font-your-face 7

Same name and namespace in other branches
  1. 6.2 modules/google_fonts_api/google_fonts_api.module \google_fonts_api_fontyourface_view()
  2. 6 modules/google_fonts_api/google_fonts_api.module \google_fonts_api_fontyourface_view()

Implements hook_fontyourface_view().

File

modules/google_fonts_api/google_fonts_api.module, line 29

Code

function google_fonts_api_fontyourface_view($font, $text) {
  $output = '';
  $sizes = array(
    32,
    24,
    18,
    14,
    12,
    10,
  );
  foreach ($sizes as $size) {
    $output .= '<div style="' . fontyourface_font_css($font) . ' font-size: ' . $size . 'px; line-height: ' . $size . 'px;">' . $text . '</div>';
  }

  // foreach
  return $output;
}