Home New Guten Forums WoodMart support forum Font from TaypeKit

Font from TaypeKit

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #64362

    ludniko
    Participant

    Hi, I would like to use a font which is not on google Fonts (DIN FONT) and Im using this code on the custom css

    @font-face {
    font-family: ‘Din’;
    src: url(‘http://www.convitemezcal.com/fonts/din.eot’); /* IE9 Compat Modes */
    src: url(‘http://www.convitemezcal.com/fonts/din.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
    url(‘http://www.convitemezcal.com/fonts/din.woff’) format(‘woff2’), /* Super Modern Browsers */
    url(‘hhttp://www.convitemezcal.com/fonts/din.woff’) format(‘woff’), /* Pretty Modern Browsers */
    url(‘http://www.convitemezcal.com/fonts/din.ttf’) format(‘truetype’), /* Safari, Android, iOS */
    url(‘http://www.convitemezcal.com/fonts/din.svg#Din’) format(‘svg’); /* Legacy iOS */
    }
    .textoDIN72 {font-family: ‘Din’; font-size:72px; color:#ffffff;}

    but it is not working, also Im trying to use custom fonts and upload the .woff, .eot, svg and .ttf and it says that it is forbidden to upload those files

    Attachments:
    You must be logged in to view attached files.
    #64388

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file and upload again

    	add_filter( 'upload_mimes', 'woodmart_upload_mimes', 100, 1 );
    	function woodmart_upload_mimes( $mimes ) {
    		$mimes['svg'] = 'image/svg+xml';
    		$mimes['svgz'] = 'image/svg+xml';
    		$mimes['woff'] = 'font/woff';
    		$mimes['woff2'] = 'font/woff2';
    		$mimes['ttf'] = 'font/ttf';
    		$mimes['eot'] = 'font/eot';
    		 $mimes['svg'] = 'font/svg';
    		 $mimes['woff'] = 'application/x-font-woff';
    		 $mimes['ttf'] = 'application/x-font-ttf';
    		 $mimes['eot'] = 'application/vnd.ms-fontobject';
    }
    #64403

    ludniko
    Participant

    I just tried and it didn’t work, this is what I have on my child functions.php

    <?php
    /**
    * Enqueue script and styles for child theme
    */
    function woodmart_child_enqueue_styles() {
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘woodmart-style’ ), woodmart_get_theme_info( ‘Version’ ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘woodmart_child_enqueue_styles’, 1000 );

    add_filter( ‘upload_mimes’, ‘woodmart_upload_mimes’, 100, 1 );
    function woodmart_upload_mimes( $mimes ) {
    $mimes[‘svg’] = ‘image/svg+xml’;
    $mimes[‘svgz’] = ‘image/svg+xml’;
    $mimes[‘woff’] = ‘font/woff’;
    $mimes[‘woff2’] = ‘font/woff2’;
    $mimes[‘ttf’] = ‘font/ttf’;
    $mimes[‘eot’] = ‘font/eot’;
    $mimes[‘svg’] = ‘font/svg’;
    $mimes[‘woff’] = ‘application/x-font-woff’;
    $mimes[‘ttf’] = ‘application/x-font-ttf’;
    $mimes[‘eot’] = ‘application/vnd.ms-fontobject’;
    }

    Attachments:
    You must be logged in to view attached files.
    #64408

    Artem Temos
    Keymaster

    Please, send us your FTP access so we can check it.

Tagged: 

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