Exemplo n.º 1
0
 public function query_fonts($sortby)
 {
     $fonts = array();
     foreach (HeadwayFonts::get_fonts() as $font_id => $font_name) {
         $fonts[] = array('id' => $font_id, 'name' => $font_name, 'stack' => HeadwayFonts::get_stack($font_id));
     }
     return $fonts;
 }
Exemplo n.º 2
0
 public static function complex_property_font_family($args)
 {
     extract($args);
     $font_fragments = explode('|', $value);
     /* Web Font */
     if (count($font_fragments) >= 2) {
         $stack = $font_fragments[1];
     } else {
         $stack = HeadwayFonts::get_stack($value);
     }
     return 'font-family: ' . $stack . ';';
 }
Exemplo n.º 3
0
 function input_font_family_select($options, $id)
 {
     /* Output input */
     $font_fragments = explode('|', $options['value']);
     /* Web Font */
     if (count($font_fragments) >= 2) {
         $font_stack = $font_fragments[1];
         $font_name = $font_fragments[1];
         $webfont_class = ' font-name-webfont';
         /* Traditional Font */
     } else {
         $font_stack = HeadwayFonts::get_stack($options['value']);
         $font_name = ucwords($options['value']);
         $webfont_class = null;
     }
     echo '<span class="font-name' . $webfont_class . '" style="font-family: ' . $font_stack . ';" data-webfont-value="' . $options['value'] . '">' . $font_name . '</span>';
     echo '<span class="open-font-browser pencil-icon"></span>';
     /* Font Browser */
     echo '<div class="font-browser">';
     echo '<ul class="tabs">';
     do_action('headway_fonts_browser_tabs');
     echo '</ul>';
     do_action('headway_fonts_browser_content');
     echo '</div><!-- .font-browser -->';
 }