Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › @font-face
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › @font-face
- This topic has 11 replies, 3 voices, and was last updated 9 years by Swift Ideas – Ed.
-
Posted in: Neighborhood
-
February 1, 2015 at 10:02 am #146048
Dear Team,
After updating to the latest version of the theme my @font-face in my stylesheet does not to seem working. Before I encountered difficulties as well with this and it had me importing the fonts through placing them in the font folder of the parent theme, because adding them to the child theme in a fonts folder did not seem to work.
Can you resolve the issue for me. In such a way that when I update to the latest version of the theme I do not encounter this anymore?
your help is appreciated,
Regards,
Maarten
February 2, 2015 at 3:30 pm #146398Getting an incorrect password error.
– Ed
February 2, 2015 at 3:33 pm #146402This reply has been marked as private.February 2, 2015 at 8:13 pm #146494Dear Ed,
I checked the password I sent in the last reply and it should be OK. Could you please have a look.
Regards,
Maarten
February 2, 2015 at 9:07 pm #146508This reply has been marked as private.February 2, 2015 at 11:43 pm #146543February 3, 2015 at 8:17 am #146599This reply has been marked as private.February 4, 2015 at 3:18 am #147016Thanks for the reply @Brookebot, really appreciate it.
@MaartenPex – your font links are all returning 404s, hence why it isn’t working. @brookebot kindly offered her child theme solution, which is this:=======================================================
My @font-face works great w/ my child theme and this is how I did it:
I added this to child theme’s functions.php (child theme name is ‘brookebot’):
// Add Fetching Font function myfetchingfont_headlink() { ?> <link rel="stylesheet" type="text/css" href="http://brookebot.com/wp-content/themes/brookebot/fetching-font/fetching-regular.css"> <?php } add_action('wp_head', 'myfetchingfont_headlink');
Then add entire font folder named “fetching-font” to child theme folder which contains:
fetching-regular.css
fetching-regular-webfont.woff2
fetching-regular-webfont.woff
fetching-regular-webfont.ttf
fetching-regular-webfont.svg
fetching-regular-webfont.eotHere are the contents of the fetching-regular-webfont.css file:
@font-face { font-family: 'fetchingregular'; src: url('fetching-regular-webfont.eot'); src: url('fetching-regular-webfont.eot?#iefix') format('embedded-opentype'), url('fetching-regular-webfont.woff2') format('woff2'), url('fetching-regular-webfont.woff') format('woff'), url('fetching-regular-webfont.ttf') format('truetype'), url('fetching-regular-webfont.svg#fetchingregular') format('svg'); font-weight: normal; font-style: normal; }
And finally to put it to use, here is an example of CSS for using it in my Custom CSS/JS box:
h1, h2, .impact-text-large { font-family: 'fetchingregular'; }
I also had trouble getting the @font-face to work with my child theme until I finally figured out how to put everything in its right place. Maybe this can help solve issue. Just ignore if this does not help.
===============================
Hope that helps!
– Ed
February 4, 2015 at 3:28 am #147022Typo correction:
Here are the contents of the
fetching-regular-webfont.cssfetching-regular.css file:February 4, 2015 at 10:23 am #147091Dear both,
Still no luck with the solution offered by Brooke. Strangely enough all was well since the last update. @ed if my font links are returning 404s what does that indicate? As I do not see what is wrong about the links. They direct to the webfonts.
Please help me out on the matter which should be a simple task, but is taking up at least three days already.
Regards,
Maarten
February 4, 2015 at 12:43 pm #147166Dear All,
Just found the solution to my problem. As it turns out the solution of Brooke was sufficient. The thing that was not, was the webfont converter I used. It made wrong conversions of the fonts. Font Squirrel turned out to be my hero. It converted the font as it should have done in the first place.
Thanks for the help and time to Brooke and Ed,
Regards,
Maarten
February 4, 2015 at 4:50 pm #147290Glad to hear it!
– Ed
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.