Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23166

    Hello!

    I want to connect a custom font that supports Cyrillic characters, for example, PT Sans.

    My actions:

    1) I got the code from Google and put it in header.php. See screenshot: https://dl.dropboxusercontent.com/u/21689806/1.JPG

    2) Set Heading Font to “No custom font”

    3) Add new style properties(as Google says). See screenshot: https://dl.dropboxusercontent.com/u/21689806/2.JPG

    But it does not work. What’s the problem?

    Thank you!

    #118789

    Hi,

    Refer to this link http://www.kriesi.at/support/topic/how-to-use-cufon-font-on-abundance. The only difference is on the register-admin-options.php

    $avia_elements[] =		array(	"name" 	=> "Heading Font",
    "slug" => "styling",
    "desc" => "The Font heading utilizes google fonts and allows you to use a wide range of custom fonts for your headings",
    "id" => "google_webfont",
    "type" => "select",
    "no_first" => true,
    "class" => "av_2columns av_col_1",
    "onchange" => "avia_add_google_font",
    "std" => "Open Sans",
    "subtype" => apply_filters('avf_google_heading_font', array('no custom font'=>'',

    'Alice'=>'Alice',
    'Allerta'=>'Allerta',
    'Arvo'=>'Arvo',
    'Antic'=>'Antic',

    'Bangers'=>'Bangers',
    'Bitter'=>'Bitter',

    'Cabin'=>'Cabin',
    'Cardo'=>'Cardo',
    'Carme'=>'Carme',
    'Coda'=>'Coda',
    'Coustard'=>'Coustard',
    'Gruppo'=>'Gruppo',

    'Damion'=>'Damion',
    'Dancing Script'=>'Dancing Script',
    'Droid Sans'=>'Droid Sans',
    'Droid Serif'=>'Droid Serif',

    'EB Garamond'=>'EB Garamond',

    'Fjord One'=>'Fjord One',

    'Inconsolata'=>'Inconsolata',

    'Josefin Sans' => 'Josefin Sans',
    'Josefin Slab'=>'Josefin Slab',

    'Kameron'=>'Kameron',
    'Kreon'=>'Kreon',

    'Lobster'=>'Lobster',
    'League Script'=>'League Script',

    'Mate SC'=>'Mate SC',
    'Mako'=>'Mako',
    'Merriweather'=>'Merriweather',
    'Metrophobic'=>'Metrophobic',
    'Molengo'=>'Molengo',
    'Muli'=>'Muli',

    'Nobile'=>'Nobile',
    'News Cycle'=>'News Cycle',

    'Open Sans'=>'Open Sans:400,600',
    'Orbitron'=>'Orbitron',
    'Oswald'=>'Oswald',

    'Pacifico'=>'Pacifico',
    'Poly'=>'Poly',
    'Podkova'=>'Podkova',
    'PT Sans'=>'PT Sans',

    'Quattrocento'=>'Quattrocento',
    'Questrial'=>'Questrial',
    'Quicksand'=>'Quicksand',

    'Raleway'=>'Raleway',

    'Salsa'=>'Salsa',
    'Sunshiney'=>'Sunshiney',
    'Signika Negative'=>'Signika Negative',

    'Tangerine'=>'Tangerine',
    'Terminal Dosis'=>'Terminal Dosis',
    'Tenor Sans'=>'Tenor Sans',

    'Varela Round'=>'Varela Round',

    'Yellowtail'=>'Yellowtail',

    )));

    $avia_elements[] = array( "name" => "Defines the Font for your body text",
    "slug" => "styling",
    "desc" => "Choose between web save fonts (faster rendering) and google webkit fonts (more unqiue)",
    "id" => "default_font",
    "type" => "select",
    "no_first" => true,
    "class" => "av_2columns av_col_2",
    "onchange" => "avia_add_google_font",
    "std" => "Helvetica-Neue,Helvetica-websave",
    "subtype" => apply_filters('avf_google_content_font', array( ':: :: Web save fonts :: ::'=>'',
    'Arial'=>'Arial-websave',
    'Georgia'=>'Georgia-websave',
    'Verdana'=>'Verdana-websave',
    'Helvetica'=>'Helvetica-websave',
    'Helvetica Neue'=>'Helvetica-Neue,Helvetica-websave',
    'Lucida'=>'"Lucida-Sans",-"Lucida-Grande",-"Lucida-Sans-Unicode-websave"',
    ':: :: Google fonts :: ::'=>'',
    'Arimo'=>'Arimo',
    'Cardo'=>'Cardo',
    'Droid Sans'=>'Droid Sans',
    'Droid Serif'=>'Droid Serif',
    'Kameron'=>'Kameron',
    'Maven Pro'=>'Maven Pro',
    'Open Sans'=>'Open Sans:400,600',
    'Lora'=>'Lora',

    )));

    Another way is to use a this plugin http://wordpress.org/extend/plugins/wp-google-fonts/.

    Regards,

    Ismael

    #118790

    Thanks for the fast reply, Ismael

    I’d like to use first way, without additional plugins.

    But it doesn’t work.

    What i did:

    1) Generate Cufon js font file here: http://cufon.shoqolate.com/generate/ and at the fifth input field from the top with the label: “Use the following value as the font-family of the generated font (optional)” enter the word “cufon” (without quotation marks).

    2) Then place the cufon file into the enfoldframeworkjsfonts folder

    3) Open up enfoldincludesadminregister-admin-options.php and add font to the font array. I put the font in 2 places:

    HERE:________________________________________________________________

    $avia_elements[] = array( “name” => “Heading Font”,

    “subtype” => apply_filters(‘avf_google_heading_font’, array(‘no custom font’=>”,

    ‘Kelson’=>’cufon_400-cufon_700.font.js’,

    AND HERE:____________________________________________________________

    $avia_elements[] = array( “name” => “Defines the Font for your body text”,

    “subtype” => apply_filters(‘avf_google_content_font’, array( ‘:: :: Web save fonts :: ::’=>”,

    ‘:: :: Google fonts :: ::’=>”,

    ‘Kelson’=>’cufon_400-cufon_700.font.js’,

    ______________________________________________________________

    I also tried to write file name without extension, like this:

    ‘Kelson’=>’cufon_400-cufon_700′,

    #118791

    I’m sorry but it seems like Ismael mixed something up. Enfold doesn’t support Cufon but only google fonts. You can use filters to add them to the font list – see: http://www.kriesi.at/support/topic/google-fonts-with-cyrilic-support

    Note that you can only use a font from the google font api: http://www.google.com/fonts/

    #118792

    Dude, I want to install PT Sans font with cyrillic sybbols. I added filter like this:

    <?php

    global $avia_config;
    if(isset($avia_config['use_child_theme_functions_only'])) return;

    /*custom font
    */

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Open Sans'] = 'Open Sans';
    return $fonts;
    }

    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Open Sans'] = 'Open Sans';
    return $fonts;
    }

    I put the following code into header.php:

    <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin,cyrillic' rel='stylesheet' type='text/css'>

    Where shoud I put this code?:

    font-family: 'PT Sans', sans-serif;

    Also, I shoud “replace “Open Sans” (on both sides) with your cyrillic font.”And how would look like this line in filter?:

    $fonts['Open Sans'] = 'Open Sans:400,600';

    Thanks

    #118793

    Actually it’s much easier:

    1) use following code:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic&subset=cyrillic';
    return $fonts;
    }

    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic&subset=cyrillic';
    return $fonts;
    }

    2) Go to Enfold > Styling and select the PT Sans font from the dropdowns.

    Enfold will automatically load the right stylesheet and change the font family for you.

    #118794

    Thank you very much! Now it finally works!

    #118795

    Hi!

    Great :)

    Regards,

    Peter

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Custom font with cyrillic symbols’ is closed to new replies.