| Page 1 of 2 | [ 11 posts ] | Go to page 1, 2 Next |
|
How will i use custom fonts in HTML or CSS pages?
|
|
Hi Jennifer,
One requirement for a font to show in a visitors web page is that the specified font is installed in the visitors operating system. That is why, when you specify a font in CSS you should always specify a font-family. This way the web browser can select a similar font if the font is missing. There is a solution to use a custom font in your web pages based on CSS3.
2. Upload the custom font files to your web site. 3. Add a @font-face declaration to your CSS file: Code: @font-face{ font-family: my_custom_font; src:url('http://www.website.com/path/to/font/nice_font.eot'); src: local(my_custom_font), url(''http://www.website.com/path/to/font/nice_font.ttf') format('opentype'); } As you can see there are 2 src-assignments above. What happens is that the second assignment will overwrite the first one but since Internet Explorer doesn't understand the "local" keyword it will skip this assignment. It is not pretty but it gets the job done. It is very important that the IE assignment comes first and the "local" assignment after this. 4. Then you can use the font in your CSS Code: .span{ font-family: my_custom_font; } There are also font tools that you can upload your font to and it will create the necessary files ttf/otf and eot files + CSS declarations. Hope this was what you were looking for. |
|
Thanks Stefan, I had no idea. This sure beats the boring limitations of Ariel, Times and Verana...
|
Juan Ignacio DopazoYUI Contributor
|
Google has this awesome service that makes embedding fonts really easy http://www.google.com/webfonts.
When do we get Yahoo! Fonts on the Yahoo CDN? |
|
Hi guys
I am wanting to make some changes with my current fonts on my wordpress website. I want to specifically change my theme fonts so can I do this by pasting the custom script above into the custom.php file?? I wait to hear your reply Jonathan |
mike williams
|
Hi,
Can you explain how to include fonts in your css file? Pretty new to this stuff Thanks Mike |
|
i want to try some fonts of my own.. font-family somewhat similar to segoe scipt.
|
|
With CSS you can use custom fonts on your website, usually visitors can only see the fonts that are already installed on their computers. So if you use a font that is not installed on your website visitor’s computer then his or her browser will show some other font that is there on the computer.
|
|
I've had some success with FontSquirrel as well. If you have embedding rights on a font, you can plug it into their @font-face generator to build a package that includes all the stuff you need to get a font onto a web site.
It even supports character subsetting, so you can pick out a handful of beautiful symbols from a font (such as ampersands) and stick them at the top of your font stack. Whenever one of those symbols is encountered, the custom font version will be used, otherwise it will pass through to the next font-face in the stack. |
|
Hi, lots of the Google fonts looked really good and original but disappointing (though obvious) to read that others who visit your site will only be able to appreciate them if they happen to have them installed on their computer.
That wouldn't bother me too much except that I don't think you can predict what visitors default font will be and therefore won't be able to predict the relative font size, which makes it very risky to deviate from the boring standard stuff. For example, I nearly always use Freestyle Script in blue to appear to be my signature. But this font is tiny compared to Tahoma or Georgia etc so I have to go up three sizes to get the scale right. So if there was a similar Google font, it would be likely to look huge in someone esle's browser, which would make you look like an egomaniac! Helen |
| Page 1 of 2 | [ 11 posts ] | Go to page 1, 2 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group