HTML using unknown font - html

I downloaded a font which I would like to use on a webpage. Of course this font isn't installed on the user's computer. How can I let a user's computer display that font? (I thought is was called: embedding a font but I could be wrong)
Thx for any help
VVW

You need to use #font-face.
A very easy way to generate the required cross-browser CSS and different formats of font file is to use:
http://www.fontsquirrel.com/fontface/generator
You simply upload your font and the generator does all the hard work.

If the users have a relatively new/up-to-date browser:
#font-face {
font-family: font-name
src: url(path/to/font.ttf);
}
element {
font-family: font-name;
}
First, we add the #font-face declaration wherein we specify the path, filename, and font-family name for our custom font. Then we add the font choice in a CSS rule to our...element.1
Citation:
A List Apart: Taking Advantage of HTML5 and CSS3 with Modernizr.
References:
#font-face, Mozilla Developer Center
CSS #ten, by HÃ¥kon Wium Lie

You are right that is called font-embedding. Here is what you need:
Embedding fonts in CSS

Related

how to use font face attribute to html without using html?

I am in a condition where I cannot use spreadsheet like CSS , but I want to use font face in HTML but how can I add external fonts here only using HTML.
#font-face{
font-family: diploma;
src: url('../fonts/diploma.ttf');
}
here i can use src but how can i use src and Font face in HTML
The obsolete <font> element allowed you to specify the name of a font which a browser will try to load from the user's system.
Support for external font files was first implemented using CSS and has never been available without CSS.
In short: You can't.

add any font to an HTML page

Newbie question: Can I embed any font into HTML. For example the Rockwell font?
Thanks!
Yes. Where FontFamilyName is what ever you want to call it and src: url('/font/font.otf'); is a link to the fonts file (much like using a background image).
#font-face {
font-family: FontFamilyName;
font-weight: bold;
src: url('/font/font.otf');
}
You can then use the font like any other font family. ex:
p
{
font-family: FontFamilyName;
}
Google offers a pretty nice service called Webfonts, check it out!
If you follow the bulletproof font-face syntax you can embed most any font into webpages.
You can use a free font-conversion service like font squirrel to convert your font's into the formats you need to support all browsers :)
take a look at #font-face that allows you to use any font on your page - if the user does not have that font installed, it can be downloaded from a server and used to render the web page.
An example
#font-face {
font-family: DeliciousRoman;
src: url(http://www.font-face.com/fonts/delicious/Delicious-Roman.otf);
font-weight:400;
}
Take a look at font-face website for more details. Be aware that there are some cross browser issues with #font-face - for this, I would recommend looking at the stellar work of Paul Irish in this regard.
It is possible using #font-face in your stylesheet, but you have to remember that IE doesn't always handle these properly. Use this code:
#font-face {
font-family: (the name you want to call it by);
src: url('path/to/font.eof');
}
You can also use .otf, or .ttf.
Not really. You are limited to cross-browser fonts if you want to be sure the page will display the same across browsers.
That being said, there is an interesting service called Typekit that lets you embed fonts using JS and CSS3. It only works for modern browsers.

HTML how to use different fonts

if i place my ttf font file in my websites root folder lets say named AMC.tff and in my website use <font face="AMC"> is it going to work... if not than what is the method to use unusual fonts in your website
You can include True Type Fonts with the help of the CSS 3 property #font-face. The following CSS would apply your AMC font to all <h1/> tags:
#font-face {
font-family: "AMC";
src: url("./AMC.ttf") format("truetype");
}
h1 {
font-family: "AMC", sans-serif;
}
For browsers that have no support for webfonts you should specify a similar alternative to your font. In the above example sans-serif would be used if AMC cannot be found because the #font-face tag was not recognized by the browser.
No, the fonts in a browser is based on fonts installed on the visitor's machine.
I don't know much about this area, so I can't tell you which one of these works or is considered best practices, but check out:
SiFr
typeface.js
Cufon
No. Apart from the fact that <font>is deprecated, you have to use the CSS3 #font-face directive, or older more compatible methods such as Cufon and Sifr.
If you need to use Custom Font for your site, you can give a go for Cufon
http://cufon.shoqolate.com/generate/
Detailed Tutorial for using CUfon on your site
http://net.tutsplus.com/articles/news/the-easiest-way-to-use-any-font-you-wish/
Forgot to add, You can also use CSS3 property
#font-face
Supported by FF3.5 and above, Opera 10 and above, IE 7,8(not sure about 6)
Check this link out:
How to get non-standard font with effect in use of web site?
I have explained in detail how to embed fonts in a webpage and make it browser compatible.
Font embedding is also a risky affair, as the font license sometimes doesn't allow.
PS - And please make sure that you don't repeat questions in stackoverflow as this question has been answered many times.

font face properties of font selector is not working in my website

I m getting a problem while embedding a font in my web site i m using a css3 rule of font selector code is
#font-face {
font-family:'VoltaEFTU-Regular';
src: url(/fonts/VoltaEFTU-Regular.ttf) format("truetype");
}
.sample { font-family: 'VoltaEFTU-Regular'; font-size: 10em; }
I put my volta font in truetype format in fonts folder of my website folder but its not working
my html code is :
<div class="sample">
typetrigger
</div>
Check if the ttf file is at the location you point to.
You should use firebug to check if your font gets applied in the css.
If yes, your font is not loaded.
If no, then the css class is not applied or overwritten by something else.
Firstly, you need to add comas to the src. It should be:
src: url('fonts/VoltaEFTU-Regular.ttf') format('truetype');
I also would recommend heading over to font squirrel though, and creating a woff and eot files to use along side the ttf.
You can read up on all the different formats here:
http://www.fontsquirrel.com/fontface/generator
Code looks good. I agree with Thariama. Try specifying the path relatively to your CSS instead of absolute (../fonts/VoltaEFTU-Regular.ttf) if your css file is in a subdir of your web root. Also, make sure the browser you are testing in supports #font-face and truetype fonts

How can I make my users automatically download the font I use for my website if they don't have it?

My website uses the font ff-clifford-eighteen-web-pro-1. I want all my text to be displayed using that font even for the users that don't have it installed on their machine.
Is it possible?
You can use the #font-face generator. It allows you to upload your fonts and it will create a nifty .zip download with CSS and all the related files you need to get your custom font working for your site.
http://www.fontsquirrel.com/fontface/generator
They also have a whole lot of licensed font-kits ready for use on your site too:
http://www.fontsquirrel.com/fontface
Another great site that allows you to "lease" licensed fonts is TypeKit.
http://typekit.com/
You can't. If the font is not on the system where the browser is, the font will not be found and cannot be loaded.
You will need to distribute the font to the client systems (if you have the licensing to do that).
Short answer: you can't
Long answer: you could, but it's not easy and not widely supported. Read this article for more information.
I use Cufon. Works great, but you also have to verify licensing.
Here is a link to A million ways to embed custom fonts (and keep typography nerds off your back)
He recommends sIFR3
With the font stored in a font folder (ex: fontFolder), you would use the #font-face generator to automatically make the user download the font so it would appear wherever on the site you specify. Below, fontFolder represents the directory (folder) where the font files live, and fontName represents the font name (sitting inside the fontFolder). If you currently have the .eot .tff .woff, and .svg variations of the font stored in the fontFolder, you can copy the below code into the top of your style sheet and replace fontFolder with your own directory's name, and replace fontName with the name of your font:
#font-face {
font-family: "fontName";
src: url('fontFolder/fontName.eot');
src: url('fontFolder/fontName.eot?#iefix') format('embedded-opentype'),
url('fontFolder/fontName.woff') format('woff'),
url('fontFolder/fontName.ttf') format('truetype'),
url('fontFolder/fontName.svg')format('svg');
}
When you're ready to use your font, just use its name:
h1 {
font-family: yourFont;
}