#font-face not working on tumblr - html

I've decided to make my own tumblr theme and I have a little problem. I'm trying to add a personal font and I used theme assets, so the font is uploaded here.
The css code is:
#font-face {
font-family: moon;
src: url('http://static.tumblr.com/ql72inh/AyIomnie6/moon_light.ttf') format('truetype');
}
If you acces the blog here you will see that the menu on the right doesn't have the font that I want. I used font-family:moon; so I really don't understand why doesn't it work

Related

#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.

How to add new fonts in CSS for local testing

I'm currently making a webpage that imports the needed fonts from Google Fonts this way:
#import url(http://fonts.googleapis.com/css?family=Italianno);
The problem is that every time I load the page I need to be connected to the Internet and it also takes time to load the font. Is there any way I can load the font offline because while testing the page I'll be refreshing it countless number of times and I might not be connected to the internet all the time and I don't want to wait for 3-5 seconds every time for the font to be loaded.
I tried installing the font in the system and then using it in the CSS. It didn't work.
Hey make a fonts folder with css folder and put the desired font there. Then in CSS call this code as example for MeriyoUI font as mentioned below. This would load the font onto your app.
For this you just need to download the font and put that in fonts folder. (pre-requisite).Try using web safe fonts.
Hope it helps.
CSS
#font-face
{
font-family: 'Meiryo UI';
font-weight: normal;
font-style: normal;
src: url('../fonts/MeiryoUI.ttf');
}
1. create a folder in website directory and move your fonts
to it! ( .ttf , .eot , .woff )
example: directory --> webfonts
2. create a css document for that!
example: directory --> css --> webfont.css
3. use this code into webfonts.css
#font-face {
font-family: 'name';
font-style: normal;
font-weight: 400;
src: url('../webfonts/fontname.eot');
src: url('../webfonts/fontname.eot?#iefix') format('embedded-opentype'),
url('../webfonts/fontname.woff2') format('woff2'),
url('../webfonts/fontname.woff') format('woff'),
url('../webfonts/fontname.ttf') format('truetype');
}
4. and in the first line of haed element into your webpage, use bellow code:
<link rel="stylesheet" href="css/webfonts.css" type="text/css"/>
Use CSS3 #font-face. Try making font face of your fonts from any fontface generator like this http://www.fontsquirrel.com/tools/webfont-generator. And to learn how to use them take a look in here http://css-tricks.com/snippets/css/using-font-face/

How can I use custom fonts on a website? [duplicate]

This question already has answers here:
How to embed fonts in HTML?
(6 answers)
Closed 6 years ago.
In order for my website to look good I need to use a custom font, specifically, Thonburi-Bold. The problem is - the font does not get displayed unless the user has installed it. It also isn't displayed in firefox.
Is there a workaround to this problem?
You have to import the font in your stylesheet like this:
#font-face{
font-family: "Thonburi-Bold";
src: url('Thonburi-Bold.ttf'),
url('Thonburi-Bold.eot'); /* IE */
}
You can use CSS3 font-face or webfonts
#font-face usage
#font-face {
font-family: Delicious;
src: url('Delicious-Roman.otf');
}
webfonts
take a look at Google Webfonts, http://www.google.com/webfonts
Yes, there is a way. Its called custom fonts in CSS.Your CSS needs to be modified, and you need to upload those fonts to your website.
The CSS required for this is:
#font-face {
font-family: Thonburi-Bold;
src: url('pathway/Thonburi-Bold.otf');
}
CSS lets you use custom fonts, downloadable fonts on your website. You can download the font of your preference, let’s say myfont.ttf, and upload it to your remote server where your blog or website is hosted.
#font-face {
font-family: myfont;
src: url('myfont.ttf');
}
First, you gotta put your font as either a .otf or .ttf somewhere on your server.
Then use CSS to declare the new font family like this:
#font-face {
font-family: MyFont;
src: url('pathway/myfont.otf');
}
If you link your document to the CSS file that you declared your font family in, you can use that font just like any other font.

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

#font-face, firefox and wordpress

I've built a custom wordpress theme that uses font-face for typography. All works fine when running in localhost, but after uploading the theme to a live site, font-face fails in FF. Still works fine in IE9
I've tried hardcoding the CSS link in header.php, moving the font files out of the theme to the site root, using a separate stylesheet for the #font-face declaration, but nothing wants to work.
Any ideas?
Cheers
Nathan
Did you include all the font files necessary? Different browsers support different types. For example, here's one I used on a site recently:
font-face {
font-family: 'GentiumBookBasicRegular';
src: url('_/fonts/GenBkBasR-webfont.eot');
src: url('_/fonts/GenBkBasR-webfont.eot?#iefix') format('embedded-opentype'),
url('_/fonts/GenBkBasR-webfont.woff') format('woff'),
url('_/fonts/GenBkBasR-webfont.ttf') format('truetype'),
url('_/fonts/GenBkBasR-webfont.svg#GentiumBookBasicRegular') format('svg');
font-weight: normal;
font-style: normal;
}
A fantastic resource for this is http://fontsquirrel.com - they'll even let you upload fonts that they don't have and they'll create the package and the css for you.