Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Google Web Fonts

Open ghost opened this issue 11 years ago • 3 comments

Hi,

how can i include some fonts to google web font json file ?

thanks

ghost avatar Dec 06 '14 21:12 ghost

i would like to use this font for my theme, for example, "https://www.google.com/fonts/specimen/Hind" but in typography option type, it is not present. so looking for a way to extend font list. thanks

ghost avatar Dec 06 '14 22:12 ghost

In version 2.1.4 was fixed the filter 'fw_google_fonts'. Try to add in your theme file 'inc/hooks.php' the following code:

function _filter_theme_add_hind_google_font($fonts) {
    $fonts['Hind']  = array(
        'family'    => 'Hind',
        'variants'  => array(
            300, 400, 500, 600, 700
        ),
    );
    //ksort($fonts);
    return $fonts;
}
add_filter('fw_google_fonts', '_filter_theme_add_hind_google_font');

valeriuzdrobau avatar Dec 09 '14 14:12 valeriuzdrobau

Wonderful. Just tested it, and it is working. Thank you very much.

ghost avatar Dec 09 '14 14:12 ghost