Having issues with a custom font on my Storenvy page - html

I'm using a web font from FontSquirrel, that provided the webfont kit. I currently have the files in the root folder of "StilettoRedBand.com" but in my Storenvy page (stilettored.storenvy.com) the webfont isn't working in the title, or the footer.
I've been working on this project so much that I've appeared to have missed something and am having a hard time locating the issue, as it was working at first and then just stopped.
Can anyone help me out?
Here's the font source: http://www.fontsquirrel.com/fonts/WC-Mano-Negra-Bta

try that
#font-face {
font-family:WCManoNegraBta;
font-weight:bold;
src:url("path-to-the-font-file/WCManoNegraBta.otf") format("opentype");}
div {
font-family:WCManoNegraBta;
}

You need to make sure you got all the needed font-files (.eot, .ttf, .woff and .svg). Click the "Webfont kit" tab and download the whole package. Use this code and make sure your links are correct. You should also try removing 'text-rendering: optimizeLegibility;' if you are using this.
#font-face {
font-family: 'WCManoNegraBtaRegular';
src: url('WCManoNegraBta-webfont.eot');
src: url('WCManoNegraBta-webfont.eot?#iefix') format('embedded-opentype'),
url('WCManoNegraBta-webfont.woff') format('woff'),
url('WCManoNegraBta-webfont.ttf') format('truetype'),
url('WCManoNegraBta-webfont.svg#WCManoNegraBtaRegular') format('svg');
font-weight: normal;
font-style: normal;
}

I am having the same issue with firefox for my storenvy store. Here is the fix I found:
How to add an Access-Control-Allow-Origin header
You just need the following code in a .htaccess file in the same folder as your fonts:
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
I haven't gotten it to work yet, but my website is hosted on godaddy so I don't know if my issue is related to that or not.
Good luck!

I was having the same problem! After reading this article I ended up getting the font to work for me.
What I did was add the #font-face code into my hosting site and saved it as a.css file
Example: http://lovepollution.com/andadrifont.css
Then I went to the theme section and clicked "css mode". I added below on the style sheet.
#import url('http://lovepollution.com/andadrifont.css');
Saved and works now.

Related

Grails load CSS from custom URL

Using Grails version 2.4.4. and trying to load CSS resource from URL
http://myAppName.com:7777/myApp/assets/style.css
/myApp/assets/style.css
I've set in style.css:
#font-face {
font-family: 'icomoon';
src: url('../fonts/icomoon.eot?t0751g');
src: url('../fonts/icomoon.eot?t0751g#iefix') format('embedded-opentype'),
url('../fonts/icomoon.ttf?t0751g') format('truetype'),
url('../fonts/icomoon.woff?t0751g') format('woff'),
url('../fonts/icomoon.svg?t0751g#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
Beside this, I added few other options for proper icon load.
Assets structure:
/assets/fonts/icomoon.ttf (and all other icomoon files are here)
/assets/stylesheets/style.css
when I use 2. url it loads my custom icons normally but when I set the 1. url in <style> as shown above, icon loading fails.
Both url-s should point to the same file and I don't understand why this is not working. Anyone knows what I am doing wrong ?
Any help will be appreciated!
So I found out that fonts does not support cross-origin domain, and I used icomoon icons as font to import it from another domain. On the other hand, i found out you can use Fontello which generates embedded JS and automatically fixes this issues, so it is generally better to use.

How to set url of fonts in css file into mvc project?

I set url of fonts in css file such as this.
#font-face {
font-family: 'soap-icons';
src: url("../fonts/soap-icons.eot?26664784");
src: url("../fonts/soap-icons.eot?26664784#iefix") format("embedded-opentype"), url("../fonts/soap-icons.woff?26664784") format("woff"), url("../fonts/soap-icons.ttf?26664784") format("truetype"), url("../fonts/soap-icons.svg?26664784#soap-icons") format("svg");
font-weight: normal;
font-style: normal; }
This run currently in html file.But after that I use this html file as a layout into mvc project It don't work currently .I test all css files path and found its are true.I change this urls to complete path of root site but don't work.
my project folders image :
Please advice
try like this src: url("/Content/Travelo/fonts/oap-icons.eot?26664784")
or
try moving your fonts to default fonts folder of MVC application
In your browser debug mode (F12), check in the network tag to see what the exact URL is that it is trying to retrieve your fonts from. It might be using a ../ too many.

#font-face not displaying locally or in browser

I can't seem to get my #font-face to work at all, neither locally or when previewing in browser. my CSS is as follows:
#font-face {
font-family: chopin-script.regular;
src: local('chopin-script.regular'),
url('/fonts/chopin-script.regular.ttf') format('truetype');
}
My folder structure:
HTML: Site folder > HTML files
CSS: Site folder > CSS folder > CSS files
Fonts: Site folder > Fonts folder > Font files
I have been through all the other similar questions, and as far as I know, I've done everything that's been said, and to no avail, apologies if there is something I haven't tried somewhere that I'm not seeing. I have tried this same code with an .otf version of the font too.
regards.
Edit:
I used FontSquirrel to generate the font, and installed it as so:
#font-face {
font-family: 'ChopinScript';
src: url('/fonts/ChopinScript.eot');
src: url('/fonts/ChopinScript.eot?#iefix') format('embedded-opentype'),url('/fonts/ChopinScript.woff') format('woff'), url('/fonts/ChopinScript.ttf') format('truetype'), url('/fonts/ChopinScript.svg#webfont') format('svg');
}
It now displays correctly locally, but when previewing it in Firefox and IE it still doesn't show. However, it does work in Chrome. They're the only browsers I have installed.
Sorry to post this as an answer but I can't comment. Are you allowed dots in the name of fonts without needing quotes? I usually put quotes around it if it has spaces or dots to ensure the name is alright with CSS. Try it as font-family: 'chopin-script.regular'; and see if there's any difference.

#font-face doesn't work online

I've got a problem with fonts, exactly with "#font-face".
When i tried to run this local HTML page, all fonts worked, but now when i try to run online HTML page, only one font is working.
now i have two fonts, one work, and one other doesn't
CSS :
#font-face {
font-family: 'RemachineScript';
src: url(fonts/SCRIPTIN.ttf);
}
#font-face {
font-family: 'Quicksand';
src: url(fonts/Quicksand.otf);
}
header#subheader div.title {
font-family: 'RemachineScript';
}
header#subheader p.subheader {
font-family: 'Quicksand';
}
You can see the HTML at http://gspinaci.com/
The URLs are right, because they are in the same folder. What can I do?
The console says there is no Quicksand.otf file, be sure of two things, first, that the file is there and the name is exactly the same (case sensitive) and the second this is that your font-face call is very specific, use the webkit font that you can download from font squirrel here: http://www.fontsquirrel.com/fonts/Quicksand
and be sure to paste in you CSS file the WHOLE font-face call, like this:
#font-face {
font-family: 'triplex';
src: url('fonts/triplexsans-light-webfont.eot');
src: url('fonts/triplexsans-light-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/triplexsans-light-webfont.woff') format('woff'),
url('fonts/triplexsans-light-webfont.ttf') format('truetype'),
url('fonts/triplexsans-light-webfont.svg#triplexlight') format('svg');
font-weight: normal;
font-style: normal;
}
And remember to include all font format files, not only .otf.
EDIT
You do not need to configure your server, you only need to modify your .htaccess file, add this lines to it:
AddType application/vnd.ms-fontobject eot
AddType font/opentype otf
AddType font/truetype ttf
AddType application/x-font-woff woff
check this answer: #font-face issue
What you have in accepted answer is not nearly close to bulletproof;)
you can also try out my little converter http://freedockstar.com/fontface/
also i'm not sure if you need to set mime types for fonts. It works just fine from my server without it. Every font is server as text/html and there are no problems. you define type in css, and that seams to be enough ;)
you need to add:
format (truetype)
or
format (opentype)
or someone else after src attribute
#font-face{
font-family: 'RemachineScript';
src: url(fonts/SCRIPTIN.ttf) format (truetype);
}
you can find format type in fonts ttf file
Maybe is too late, but for the record... I solved this issue by granting read permission on the .ttf file.
chmod +r font.ttf

Fonts not showing up #font-face 000webhost

I have set up a website. I was hosting it on webs.com, but they started to place an ad bar on html-only hosting. As it would not look good, I changed it to 000webhost. Since I uploaded everything to 000webhost, I can't make the fonts to load.
webs:
http://bluescreen-ofdeath.webs.com/
000webhost:
http://bsod.comze.com/
I have tried pointing the ttf fonts from my webs account, but it won't load.
As the 000webhost take a day to answer free accounts, I decided to ask you. Is there anything I am missing?
Edit: Here is an example of my #Font-face
#font-face {
font-family: 'fixedsys500c-webfont';
src: url('../font/fixedsys500c-webfont.eot');
src: url('../font/fixedsys500c-webfont.eot?#iefix') format('embedded-opentype'),
url('../font/fixedsys500c-webfont.woff') format('woff'),
url('../font/fixedsys500c-webfont.ttf') format('truetype'),
url('../font/fixedsys500c-webfont.svg#fixedsys500c-webfont') format('svg');
font-weight: normal;
font-style: normal;
}
The font(s) have to be imported before the stylesheet, as Google Web Fonts dictate.
Instructions: To embed your Collection into your web page, copy the
code as the first element in the <head> of your HTML document.
Don't use single quotes. Your fonts will work nicely. It's so easy, look below:
#font-face {
font-family:Arial;
src:url(Arial.ttf)format(.ttf);
}
remind it, internet explorer only works with EOT font files.
As far as I can tell, 000webhost only accepts .woff files.
.ttf and .eot do not work for me