@font-face CSS font injection


/ Published in: CSS
Save to your folder(s)

Summary
@font-face allows authors to specify online fonts to display text on their webpages. By allowing authors to provide their own fonts, @font-face eliminates the need to depend on the limited number of fonts users have installed on their computers.

Syntax
@font-face {
font-family: ;
src: [,]*;
[font-weight: ];
[font-style: ];
}
Values

Specifies a font name that will be used as font face value for font properties.

URL for the remote font file location, or the name of a font on the user's computer in the form local("Font Name").

A font weight value.

A font style value.
You can specify a font on the user's local computer by name using the local() syntax. If that font isn't found, other sources will be tried until one is found.


Copy this code and paste it in your HTML
  1. @font-face {
  2. font-family: <a-remote-font-name>;
  3. src: <source> [,<source>]*;
  4. [font-weight: <weight>];
  5. [font-style: <style>];
  6. }

URL: https://developer.mozilla.org/index.php?title=En/CSS/%40font-face

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.