You are here

function kernest_fontyourface_view in @font-your-face 6

Same name and namespace in other branches
  1. 7 modules/kernest/kernest.module \kernest_fontyourface_view()

Implements hook_fontyourface_view().

File

modules/kernest/kernest.module, line 136

Code

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

  // foreach
  return $output;
}