-
AuthorPosts
-
December 7, 2014 at 5:16 pm #364294
hello dear team devs,
so i’m building the 5th website now using your wonderful theme and loving every minute-great theme!
i have one problem though: the customer has its own type face he wants to use. he bought the licence and sent me the files, which only comes in woff format.
this is what i did – both changes were made only on the child theme files – but its not working and i will be glad to find out why:
/* Theme Name: Enfold Child Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold WordPress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating wil be much easier then. Version: 1.0 Author: Kriesi Author URI: http://kriesi.at Template: enfold */ /*Add your own styles here:*/ @font-face { font-family: ‘DINWeb’; src: url(fonts/DINWeb.woff) format(‘woff’), font-weight: normal; font-style: normal; } @font-face { font-family: ‘DINWebBold’; src: url(fonts/DINWeb-Bold.woff) format(‘woff’), font-weight: normal; font-style: normal; } @font-face { font-family: ‘DINWebLight’; src: url(fonts/DINWeb-Light.woff) format(‘woff’), font-weight: normal; font-style: normal; } body, h1, h2, h3, h4, h5, h6, tr.pricing-row td, #top .portfolio-title, .callout .content-area, .avia-big-box .avia-innerbox { font-family:‘DINWeb’, 'Terminal Dosis', ‘HelveticaNeue’, ‘Helvetica Neue’, Helvetica, Arial, sans-serif; }
note: i inserted the terminal dosis as a fallback font so i will recognize best that the actual web font is not showing.
and in funcsions.php:
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ if(isset($avia_config['use_child_theme_functions_only'])) return; add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Ropa'] = 'Ropa Sans:400'; $fonts['Ek Mukta'] = 'Ek Mukta:200,300,400,500,600,700'; $fonts['Ek Mukta 800'] = 'Ek Mukta:800'; $fonts['DINWebLight'] = 'DINWebLight'; $fonts['DINWebBold'] = 'DINWebBold'; $fonts['DINWeb'] = 'DINWeb'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Ropa'] = 'Ropa Sans:400'; $fonts['Ek Mukta'] = 'Ek Mukta:400'; $fonts['Ek Mukta 800'] = 'Ek Mukta:800'; $fonts['DINWebLight'] = 'DINWebLight'; $fonts['DINWebBold'] = 'DINWebBold'; $fonts['DINWeb'] = 'DINWeb'; return $fonts; }
any idea why its not working and how i can fix this?
thanks,
eynav
December 8, 2014 at 2:52 am #364394This reply has been marked as private.December 8, 2014 at 3:01 am #364396the } i was missing was corrected but still no results, the fonts are acting strange.
sometimes it takes a weight of 200,
sometimes its written as bold and sometimes as weight:600.see picture:
in this example, i put “DINWebBold” in advance styling for menu. it will only recognise the “DINWeb” and not the “DINWebBold”, so it falls back into helvetica…December 8, 2014 at 3:13 am #364397another take on this subject:
i KNOW the font face is working since using a special tags i CAN in fact use these fonts.so the problem is somewhere in the general styling, if that helps you figure out what is going on.
for example when using <bb> tag, the bold weight is shown. when using <ll> tag the light weight is shown.
/*typography*/ ll { font-family: 'DINWebLight'; font-weight: normal; font-style: normal; } rr { font-family: 'DINWeb'; font-weight: normal; font-style: normal; } bb { font-family: 'DINWebBold'; font-weight: normal; font-style: normal; }
now, i will solve almost all of my problems beside the main menu, where i don’t have access to add the tag i created.
- This reply was modified 9 years, 11 months ago by graphico.
December 8, 2014 at 7:20 pm #364882Hey!
Try this.
@font-face { font-family: "DINWeb"; src: url("URL to the regular font"); } @font-face { font-family: "DINWeb"; src: url("URL to the bold font"); font-weight: bold; }
I think that will have it pick up the bold styling automatically.
Regards,
Elliott- This reply was modified 9 years, 11 months ago by Elliott.
-
AuthorPosts
- You must be logged in to reply to this topic.