Tagged: custom font, enfold
-
AuthorPosts
-
January 18, 2016 at 2:44 pm #567231
Hello
I followed some previous discussions on here and managed to add a custom font to the site I am working on:
http://www.fivequills.co.uk/ (password = SVtiger99)
Problem is every time you click a link you see another font flash up briefly. Looks weird. I guess it is loading another font before it loads the one I want. I defined the fonts in the Quick CSS box and put the following in the GA Tracking Code box:
<style>@font-face {
font-family: ‘five_quills_medium’;
src: url(‘/wp-content/fonts/five_quills-webfont.eot’);
src: url(‘/wp-content/fonts/five_quills-webfont.eot?#iefix’) format(’embedded-opentype’),
url(‘/wp-content/fonts/five_quills-webfont.woff2’) format(‘woff2’),
url(‘/wp-content/fonts/five_quills-webfont.woff’) format(‘woff’),
url(‘/wp-content/fonts/five_quills-webfont.ttf’) format(‘truetype’),
url(‘/wp-content/fonts/five_quills-webfont.svg#five_quills_medium’) format(‘svg’);
font-weight: normal;
font-style: normal;
}
</style>January 19, 2016 at 4:10 am #567555Hey jimjiber!
I would try adding that to the Quick CSS as well but remove the style tags. Or try placing it at the top of the style.css file.
Cheers!
ElliottJanuary 19, 2016 at 11:18 am #567754Thanks. I have put it in both those places but still the problem. Never seen this happen before!
January 20, 2016 at 3:25 am #568323Hey!
What’s the CSS your using to apply it?
You could try doing this, https://kriesi.at/support/topic/installing-own-fonts/#post-421325, to add it to our styling options and apply it that way.
Cheers!
ElliottJanuary 20, 2016 at 12:20 pm #568553I am using this CSS in Quick CSS to apply it:
.avia-menu-text {
font-family: ‘five_quills_medium’; font-size:32px; letter-spacing:3px; text-transform:uppercase;
}Regarding your other idea, will that replace the Google fonts? I still want to use Open Sans for the body copy and some headings. Also, is it really necessary to use a child theme? I have not done this before. Can I add a child theme now even though I have done quite a lot on the existing theme (without losing my work)?
January 21, 2016 at 4:58 am #569139Hey!
It will not replace the google fonts, it just adds your custom font as a selection in addition to the google fonts.
You can download a child theme here, http://kriesi.at/documentation/enfold/downloads/, you can still use it in addition to your other customizations but I recommend doing them inside a child theme so they do not need to be redone on theme updates.
Also, when you activate the child theme navigate to Dashboard > Enfold > Import/Export to import your settings.
Best regards,
ElliottJanuary 21, 2016 at 11:32 am #569318Thanks Elliott – that has sorted that issue and I have the font I want in the menu. Problem is that then changes all of my headers!
I want the other headers, anything not in the menu, to be Open Sans! I am sure I can figure out in time…
January 22, 2016 at 4:01 am #569746Hi!
If your only wanting to change the menu font then navigate to Dashboard > Enfold > Advanced Styling and create a rule for the primary menu links. Your font will be selectable there as well.
Cheers!
ElliottJanuary 27, 2016 at 1:31 am #572485I added Google font and it doesn’t display correctly. I followed instructions on this forum and added the following code to child theme>functions.php:
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Play’] = ‘Play :400,700’;
$fonts[‘Play’] = ‘Play :400,700’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Play’] = ‘Play :400,700’;
$fonts[‘Play’] = ‘Play :400,700’;
return $fonts;
}January 28, 2016 at 4:01 am #573451Hey!
@ckwellington, You have a space right after the font name so it was not loading. It needs to look like this with no spaces.$fonts[‘Play’] = ‘Play:400,700’;
Best regards,
ElliottJanuary 29, 2016 at 12:22 am #574197Thank you -it worked great!
February 1, 2016 at 5:02 am #575520February 4, 2016 at 12:57 pm #577736I tried this method to add a custom font to the website and the font is loading just fine, but browser tries to download the font from google (which is not there) and it takes like 13 seconds to cancel the request !
The website is loading too slow as a result.February 5, 2016 at 6:58 am #578305Hi,
This can’t be found: http://fonts.googleapis.com/css?family=BYekan, are you sure there’s not a typo there? If not then please start a new thread and include admin login details in private so that we can have a closer look.
Thanks,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.