Пример #1
0
function k_font_preview($face)
{
    $gwf = new VP_Site_GoogleWebFont();
    $gwf->add($face);
    $links = $gwf->get_font_links();
    $link = reset($links);
    $dom = <<<EOD
<link href='{$link}' rel='stylesheet' type='text/css'>
<p style="padding: 0 10px 0 10px; font-family: {$face}; font-weight: bold; font-size: 23px; line-height: 26px;">
\tThat's my title (ŠšĐđČčĆ掞)
</p>
<p style="padding: 0 10px 0 10px; font-family: {$face}; font-weight: normal; font-size: 16px; line-height: 26px;">
\tGrumpy wizards make toxic brew for the evil Queen and Jack (ŠšĐđČčĆ掞).
\t<br />
\tPellentesque sed odio nisi. Sed ut pellentesque libero, quis bibendum nibh. Phasellus sodales scelerisque nisi, eu rutrum mi lorem ipsum dolor.
</p>
EOD;
    return $dom;
}
Пример #2
0
function jeg_font_preview($face)
{
    $gwf = new VP_Site_GoogleWebFont();
    $gwf->add($face);
    $links = $gwf->get_font_links();
    $link = reset($links);
    $dom = <<<EOD
<link href='{$link}' rel='stylesheet' type='text/css'>
<p style="padding: 0 10px 0 10px; font-family: {$face}; font-weight: {$weight}; font-size: 20px;">
\tGrumpy wizards make toxic brew for the evil Queen and Jack
</p>
EOD;
    return $dom;
}
Пример #3
0
function wp_branding_use_google_font()
{
    $font_face = vp_option('agnet_branding.logo_font_face');
    $font_weight = vp_option('agnet_branding.vp_get_gwf_weight');
    $font_style = vp_option('agnet_branding.logo_font_style');
    $gwf = new VP_Site_GoogleWebFont();
    $gwf->add($font_face, $font_style, $font_weight);
    $links = $gwf->get_font_links();
    $link = reset($links);
    ?>
    <style type="text/css">
    body {
        font-family: <?php 
    echo $font_face;
    ?>
 !important;
        font-style: <?php 
    echo $font_style;
    ?>
 !important;
        font-weight: <?php 
    echo $font_weight;
    ?>
 !important;
    }
    </style>
    

<?php 
}
Пример #4
0
function vp_font_preview($face, $style, $weight, $size, $line_height)
{
    $gwf = new VP_Site_GoogleWebFont();
    $gwf->add($face, $style, $weight);
    $links = $gwf->get_font_links();
    $link = reset($links);
    $dom = "\r\n<link href='{$link}' rel='stylesheet' type='text/css'>\r\n<p style=\"padding: 0 10px 0 10px; font-family: {$face}; font-style: {$style}; font-weight: {$weight}; font-size: {$size}px; line-height: {$line_height}em;\">\r\n\tGrumpy wizards make toxic brew for the evil Queen and Jack\r\n</p>\r\n";
    return $dom;
}