Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #514709

    Hi,

    I have again trouble with the fonts integration.

    So I followed a lot of topics. The most helpful posted this link:
    http://justcreative.com/2013/01/22/how-to-use-custom-fonts-with-font-face-on-wordpress/

    So I followed this instructions.
    Generated the font files as described, uploaded to the childtheme new folder “customfonts”.
    Added the css:

    @font-face {
        font-family: 'freightbigmediumregular';
        src: url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.eot');
        src: url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.eot?#iefix') format('embedded-opentype'),
             url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.woff2') format('woff2'),
             url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.woff') format('woff'),
             url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.ttf') format('truetype'),
             url('http://http://madlener.wom.server49.vorschauseite.eu/wp-content/themes/enfold-child/customfonts/freightbigmedium-webfont.svg#freightbigmediumregular') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }

    for all fonts.

    Added to functions.php:

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['FreightBigMedium'] = 'freightbigmediumregular';
    $fonts['FreightSansLight'] = 'freightsans_lightregular';
    $fonts['FreightSansBold'] = 'freightsans_boldregular';
    $fonts['FreightSansBook'] = 'freightsansbook';
    return $fonts;
    }
    
    add_filter('avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['FreightBigMedium'] = 'freightbigmediumregular';
    $fonts['FreightSansLight'] = 'freightsans_lightregular';
    $fonts['FreightSansBold'] = 'freightsans_boldregular';
    $fonts['FreightSansBook'] = 'freightsansbook';
    return $fonts;
    }
    

    Used with the advanced styling setting and also tried with

        h1 { 
        font-family: 'freightbigmediumregular'; 
        font-size: 95px; 
        line-height: 100px; 
        letter-spacing: 0px;
        text-transform: initial;
    
        }

    But I don’t get loaded the correct font on the H1
    http://madlener.wom.server49.vorschauseite.eu/

    It should be:
    http://pasteboard.co/1b7adyu2.jpg

    but it is:
    http://pasteboard.co/1b7cBGJF.jpg

    First Headline is special Headline from ALB, second is with normal Texteditor H1.

    Do you have a hint to get it work?

    Thanks a lot !!

    Greetings
    Michael

    #514723

    CLOSE – CLOSE – CLOSE

    ..oh dear….searching so long..found a simple code error:
    src: url('http://http://madlener. I took http:// in double…

    Now it’s working !!!!

    Close…sorry for this ticket….

    #514960

    Hi,

    I was just about to tell you that, glad you found the error :-)

    Regards,
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Problem with FONT usage – always wrong font’ is closed to new replies.