Z
Z
Zakonoposlushniy2017-02-24 11:14:57
Fonts
Zakonoposlushniy, 2017-02-24 11:14:57

How to change the font in WordPress?

Good afternoon!
Is there any WordPress plugin that changes fonts?
I know it sounds silly, since there are a lot of similar plugins now, but my situation is a bit different.
I saw - "Easy Google Fonts", but it changes the font on the whole site at once.
I need to be able to change the font in each entry or in each line separately.
For example: I wrote some text, then selected it and chose which font to apply, specifically to this section of text.
I had one topic, so a similar function was implemented there. Directly in the WordPress text editor, there was a "Font Family" column. Select the desired text and apply a font to it.
d27d370f081bf4b81f5b1fbff64a459c.jpg
Thanks for the replies!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy Orlov, 2017-02-24
@orlov0562

if it’s just a dropdown with fonts, then you can activate it through the plugin:
https://ru.wordpress.org/plugins/tinymce-advanced/
if you need to add custom fonts, then like this:
- download fonts
- write in css

@font-face {
    font-family: 'Proxima Nova Regular';
    font-weight: 400;
    font-style: normal;
    src: url('./assets/fonts/proxima-nova/proxima-nova-regular.eot');
    src: url('./assets/fonts/proxima-nova/proxima-nova-regular.eot?#iefix') format('embedded-opentype'),   
         url('./assets/fonts/proxima-nova/proxima-nova-regular.woff')       format('woff'),  
         url('./assets/fonts/proxima-nova/proxima-nova-regular.ttf')        format('truetype'),  
         url('./assets/fonts/proxima-nova/proxima-nova-regular.otf')        format('opentype');
}

- add to functions.php
add_filter( 'tiny_mce_before_init', 'mce_custom_fonts' );
function mce_custom_fonts( $init ) {
    $theme_advanced_fonts = "Andale Mono=andale mono,times;" .
                            "Arial=arial,helvetica,sans-serif;" .
                            "Arial Black=arial black,avant garde;" .
                            "Book Antiqua=book antiqua,palatino;" .
                            "Comic Sans MS=comic sans ms,sans-serif;" .
                            "Courier New=courier new,courier;" .
                            "Georgia=georgia,palatino;" .
                            "Helvetica=helvetica;" .
                            "Impact=impact,chicago;" .
"Proxima Nova Regular=Proxima Nova Regular;" . /* <---------- This is my custom font */
                            "Symbol=symbol;" .
                            "Tahoma=tahoma,arial,helvetica,sans-serif;" .
                            "Terminal=terminal,monaco;" .
                            "Times New Roman=times new roman,times;" .
                            "Trebuchet MS=trebuchet ms,geneva;" .
                            "Verdana=verdana,geneva;" .
                            "Webdings=webdings;" .
                            "Wingdings=wingdings,zapf dingbats";
    $init['font_formats'] = $theme_advanced_fonts;
    return $init;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question