-
AuthorPosts
-
August 5, 2014 at 10:00 pm #78623
Hi,
How do I add a custom font? I have the font files on my PC and would like to use them on the site.
Thanks
August 5, 2014 at 10:12 pm #78625Not sure if this will help, but I did this once using this method.
http://stackoverflow.com/questions/7961721/how-do-i-install-a-custom-font-on-an-html-siteGood Luck.
August 6, 2014 at 7:43 am #78776Hi Anthony,
First To make your font compatible to most browsers you may convert your font in http://www.font2web.com/
download the files and upload them to fonts folder in your theme directoryTo do it in X put these line of codes in customizer >custom >css .
@font-face { font-family: 'myFirstFont'; src: url('http://www.yoursite.com/fonts/webfont.eot'); src: url('http://www.yoursite.com/fonts/webfont.eot?#iefix') format('embedded-opentype'), url('http://www.yoursite.com/fonts/webfont.woff') format('woff'), url('http://www.yoursite.com/fonts/webfont.ttf') format('truetype'), url('http://www.yoursite.com/fonts/webfont.svg#webfontitalic') format('svg'); font-weight: normal; font-style: normal; }
Don’t forget to change the url and font filename.
You can then use the font like this
div { font-family: myFirstFont; }
Thanks
August 7, 2014 at 11:31 am #79848Thanks!!! I’ll try it.
August 7, 2014 at 12:06 pm #79864Glad we were able to help. 🙂 Have a nice day.
January 10, 2015 at 4:28 am #180262Hi there, I am trying to add a custom font to the X theme. I am using Ethos 1. I have added the various web fonts to my server and copied the code above to the custom CSS section in customizer and added the links to the files where appropriate.
However I can’t see the font in the typography dropdown which is where I want it to be. I want to use my new font for the logo and headings so I need it to be added in the typography dropdown. Is this possible using the process above or do I need to do something different.
Thanks in advance.
Andy
January 10, 2015 at 8:30 pm #180532Hi Andy,
Thanks for posting in.
Font dropdown selection is just for google fonts. The selection pulls font from google then generate styling for the theme. Like styling for head lines, logo, text, and etc.
And since you’re using custom font, you will have to add your own styling for head lines, logo, text, and etc.
Eg.
h1.entry-title { font-family : 'myFirstFont'; }
Hope this helps.
January 11, 2015 at 7:58 am #180723Ok thanks, I’ll give it a go.
January 11, 2015 at 11:16 pm #180985You’re welcome Andy.
May 27, 2015 at 10:26 pm #283884If I may push this post up, I’m dealing with the same issue, I’ve done everything as instructed above but my title font still does not change. Here’s my code:
@font-face { font-family: 'museo'; src: url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.eot'); src: url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.eot?#iefix') format('embedded-opentype'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.woff') format('woff'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.ttf') format('truetype'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.svg#webfontitalic') format('svg'); font-weight: normal; font-style: normal; }
Then below, I assigned it like this:
.entry-title { line-height: 1.4; font-family : 'museo'; }
However, it still does not work. Am I missing something? Please help.
May 28, 2015 at 2:03 am #284083Hi There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
June 2, 2015 at 4:51 pm #290303This reply has been marked as private.June 3, 2015 at 8:35 am #290957Hi there,
Upon checking your site you didn’t put the code in style.css file, please add following code to style.css file:
@font-face { font-family: 'museo'; src: url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.eot'); src: url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.eot?#iefix') format('embedded-opentype'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.woff') format('woff'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.ttf') format('truetype'), url('http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris - MuseoSlab-300.svg#webfontitalic') format('svg'); font-weight: normal; font-style: normal; } .entry-title { line-height: 1.4; font-family : 'museo'; }
Thanks.
June 3, 2015 at 12:09 pm #291199This reply has been marked as private.June 3, 2015 at 5:28 pm #291734Hi there,
Please remove the spaces from the file name it should not contain any space, for example change the file name from this exljbris – MuseoSlab-300.otf to exljbris-MuseoSlab-300.otf then your file path will become
http://www.samsungupdate.com/testserver/wp-content/themes/x/framework/fonts/museo/exljbris-MuseoSlab-300.eot
without spaces.Don’t forget to change the path in the code after fixing the file names. Let us know how this goes!
-
AuthorPosts