Skip to content

Instantly share code, notes, and snippets.

@hanetooth
Last active January 7, 2018 23:00
Show Gist options
  • Save hanetooth/338a801d056fbe9a0462b8a0b75fc3c2 to your computer and use it in GitHub Desktop.
Save hanetooth/338a801d056fbe9a0462b8a0b75fc3c2 to your computer and use it in GitHub Desktop.
How to embed custom font with css?
@font-face {
font-family: 'unicode';
src: url(/font/unicode.ttf) format('truetype'); //link to font file
font-weight: 400;
font-style: normal;
}
body, html, p, code, *, table, td, tr, span, div, a, ul, li, input, textarea, h1, h2, h3, h4, h5, h6
{
font-family: 'unicode'; //force to html components
}
.unicode {
font-family: 'unicode'; // force to specific component
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment