Skip to content

Instantly share code, notes, and snippets.

@rharriso
Created March 4, 2016 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rharriso/a0b01da6f5e2299de94c to your computer and use it in GitHub Desktop.
Save rharriso/a0b01da6f5e2299de94c to your computer and use it in GitHub Desktop.
Embedding Font with many faces in Hype
<!-- How to embed Roboto locally -->
<!-- see instructions here: http://tumult.com/hype/documentation/2.0/fonts/ -->
<!-- download files from Google (google it) -->
<style>
/* base face */
@font-face {
font-family: 'Roboto', Arial, Helvetica;
src: url('${resourcesFolderName}/Roboto-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto', Arial, Helvetica;
src: url('${resourcesFolderName}/Roboto-Italic.ttf') format('truetype');
font-style: italic;
}
/* Other Weights */
@font-face {
font-family: 'Roboto', Arial, Helvetica;
src: url('${resourcesFolderName}/Roboto-Bold.ttf') format('truetype');
font-weight: 700;
}
@font-face {
font-family: 'Roboto', Arial, Helvetica;
src: url('${resourcesFolderName}/Roboto-BoldItalic.ttf') format('truetype');
font-weight: 700;
font-style: italic;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment