- This topic has 19 replies, 2 voices, and was last updated 3 years, 10 months ago by David.
-
AuthorPosts
-
June 1, 2020 at 2:05 am #1309511Bob
Hi guys,
Last month you helped me out with adding a Google Font to a website. Your advice worked perfectly.
Today I am working on another website and unfortunately I have to use a font which is not a Google Fong. The font is called is called ‘caviar-dreams’.I have followed the same method as last time and added the fonts to my Child theme in a fonts folder. However, as the font is not a Google Font, I cannot use the handy Google websfonts helper tool to create the code I need.
How do I add this font?
The IP address for your hostfile is 103.27.34.47
June 1, 2020 at 4:08 am #1309618DavidStaffCustomer SupportHi there,
simplest way is to use a service like either of these:
https://www.fontsquirrel.com/tools/webfont-generator
https://transfonter.orgJune 1, 2020 at 8:11 pm #1310532BobHey David,
Thanks, all working fine now.
June 2, 2020 at 2:05 am #1310817DavidStaffCustomer SupportYou’re welcome
June 14, 2020 at 11:06 pm #1328048BobHi guys,
Really sorry about this, but strange things are happening with these fonts. I thought this was all fixed as from my computer, I see the fonts as I want to see them.
However, when I look at the website from any other computer, the font is not the one I have selected.I am thinking this is some kind of caching issue and what I am seeing is incorrect. If that is the case, why is the new font not showing to the rest of the world?
Here is what I see;
https://www.thepetparcel.com.au/wp-content/uploads/2020/06/Fonts-how-I-see-them-1.png
https://www.thepetparcel.com.au/wp-content/uploads/2020/06/Fonts-how-i-see-them-2.pngWhat I believe you will see is this;
https://www.thepetparcel.com.au/wp-content/uploads/2020/06/Wrong-Font-as-world-sees.jpegAnother issue that I feel is probably related, is the responsiveness of the Image Gallery on the Home page. When I look on a lap top, in full screen, I only see two columns.
Again, I feel caching is at play here, so how do I make my font appear to the world and gallery respond as it should?
Thanks
June 15, 2020 at 3:08 am #1328238DavidStaffCustomer SupportDid you follow all of this method ( aside from the Google bit ) to add your font ?
June 15, 2020 at 3:54 pm #1329206BobThis is so confusing. I think I have, but the process fro non-Google fonts appears to be completely different. The instructions that have come down with the Fontface kit are completely useless and make no reference to where things are supposed to go?
https://www.thepetparcel.com.au/wp-content/uploads/2020/06/How_to_use_webfonts.htmlJune 15, 2020 at 4:38 pm #1329242BobSo I have started all over again and still no luck.
Where I think I am messing this up is in part 2 and 3 of Font Squirell’s rubbish instructions. This is what is baffling me;We’ve already gone ahead and generated the code for you. All you have to do is link to the stylesheet in your HTML, like this:
<link rel=”stylesheet” href=”stylesheet.css” type=”text/css” charset=”utf-8″ />
What is this, do I need to edit it this and where does it go?
Then there is this;
3. Modify your own stylesheet
To take advantage of your new fonts, you must tell your stylesheet to use them. Look at the original @font-face declaration above and find the property called “font-family.” The name linked there will be what you use to reference the font. Prepend that webfont name to the font stack in the “font-family” property, inside the selector you want to change. For example:p { font-family: ‘MyWebFont’, Arial, sans-serif; }
Again, what and where does this go?
Here is a link to the complete FontFace Kit I am using.
https://www.thepetparcel.com.au/wp-content/uploads/2020/06/webfontkit-20200615-205501.zip
I used the ‘Optimal’ setting which gave me woff2 and woff formats. Do I also need to add TTF’sWhen I look at my source code I see this;
<link rel=’stylesheet’ id=’generate-fonts-css’ href=’//fonts.googleapis.com/css?family=caviar-dreams
But this is not in my style sheet, so where is it getting this from?Thanks
June 15, 2020 at 10:05 pm #1329388BobSome additional information that may help.
Today I have also been trying to find answers in the many forums that are out there and came across this
https://stackoverflow.com/questions/11183154/font-not-working-from-fontsquirrelBased on their suggestions, I have tried every configuration I can think of for the ‘url’ but none have been successful. Here is how it has been left now on the style.css;
@font-face {
font-family: ‘caviar_dreamsbold’;
src: url(‘wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;}
@font-face {
font-family: ‘caviar_dreamsbold_italic’;
src: url(‘wp-content/themes/generatepress_child/Fonts/caviardreams_bolditalic-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviardreams_bolditalic-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;}
@font-face {
font-family: ‘caviar_dreamsitalic’;
src: url(‘wp-content/themes/generatepress_child/Fonts/caviardreams_italic-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviardreams_italic-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;}
@font-face {
font-family: ‘caviar_dreamsregular’;
src: url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;}
June 16, 2020 at 1:53 am #1329576DavidStaffCustomer SupportLooking at your site here is an example of the @font-face CSS:
@font-face { font-family: 'caviar_dreamsbold'; src: url('wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff2') format('woff2'), url('wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff') format('woff'); url('wp-content/themes/generatepress_child/Fonts/Caviar_Dreams_Bold-webfont.ttf') format('ttf'); font-weight: normal; font-style: normal; }
The second URL for the
woff
is ending with a;
it needs to be a,
.
This is the same for every @font-face rule.June 16, 2020 at 1:58 am #1329583BobHey David,
Just corrected that and still no go?
When you say ‘@fontface Rule, do you mean replace all of the ; with ,@font-face {
font-family: ‘caviar_dreamsregular’,
src: url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff’) format(‘woff’),
url(‘wp-content/themes/generatepress_child/Fonts/CaviarDreams-webfont.ttf’) format(‘ttf’),
font-weight: normal,
font-style: normal,}
Also, I have added the .ttf files as well. Do I need these?
June 16, 2020 at 3:18 am #1329671DavidStaffCustomer SupportNo – only the second URL so this is how it should look:
@font-face { font-family: 'caviar_dreamsbold'; src: url('wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff2') format('woff2'), url('wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff') format('woff'), url('wp-content/themes/generatepress_child/Fonts/Caviar_Dreams_Bold-webfont.ttf') format('ttf'); font-weight: normal; font-style: normal; }
June 16, 2020 at 3:57 am #1329715BobHey David,
Done that and still not working. Could something be overriding it?@font-face {
font-family: ‘caviar_dreamsregular’;
src: url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff2’) format(‘woff2’),
url(‘wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff’) format(‘woff’),
url(‘wp-content/themes/generatepress_child/Fonts/CaviarDreams-webfont.ttf’) format(‘ttf’);
font-weight: normal;
font-style: normal;June 16, 2020 at 4:16 am #1329739DavidStaffCustomer SupportOk – think we’re almost there.
Make them the full URLs now. eg.@font-face { font-family: 'caviar_dreamsbold'; src: url('https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff2') format('woff2'), url('https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/caviar_dreams_bold-webfont.woff') format('woff'), url('https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/Caviar_Dreams_Bold-webfont.ttf') format('ttf'); font-weight: normal; font-style: normal; }
June 16, 2020 at 4:45 am #1329765BobHey David,
I tried that trick earlier, but had no luck. Nevertheless, I have added it again to them all, but still not working?
@font-face {
font-family: ‘caviar_dreamsregular’;
src: url(‘https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff2’) format(‘woff2’),
url(‘https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/caviardreams-webfont.woff’) format(‘woff’),
url(‘https://www.thepetparcel.com.au/wp-content/themes/generatepress_child/Fonts/CaviarDreams-webfont.ttf’) format(‘ttf’);
font-weight: normal;
font-style: normal; -
AuthorPosts
- You must be logged in to reply to this topic.