Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1306150

    Hi I am trying to use a premium font purchased and the paragraph fonts are all in italics. After reviewing a couple of closed threads, I figured I needed to add some code into the child theme’s function.php file. I tried:

    /* Fix for https://kriesi.at/support/topic/font-manager-handles-font-files-with-suffix-regularitalic-wrong/ */
    if ( ! function_exists( 'enfold_add_missing_google_font_filenames') ) {
    	function enfold_add_missing_google_font_filenames($enfold_font_manager_types) {
    		return array_merge($enfold_font_manager_types, array('regularitalic' => array( 400, 'italic' )));
    	}
    
    	add_filter( 'avf_google_fonts_style_definitions', 'enfold_add_missing_google_font_filenames', 10, 1 );
    }
    

    I tried to delete and re-upload the fonts and its still not working.
    Any assistance would be super helpful. Thank you!

    Here is what I am seeing:
    Fonts

    • This topic was modified 3 years, 5 months ago by DIAZTORTILLAS.
    #1306519

    Hey DIAZTORTILLAS,
    Thank you for your patience, and for the screenshots, do you mean that the font is supposed to be in italics, or is in italics in error?
    From your Custom Font Manager screenshot it looks like the original zip file also has a Macosx directory which is adding the fonts twice, please delete both of these, then extract the zip on your desktop and remove the unneeded directories and files, then zip again and upload.
    I recommend trying to upload the one font you plan on using the most as a test, for example, Forza-Black, then put that in a zip file by itself Forza-Black.zip, and upload and test.
    Typically the regular & italics are in the same ttf file for normal use, but you would have to use a font viewer to check.
    You would not be using a function in this case.

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.