Skip to content

Instantly share code, notes, and snippets.

@deshack
Last active September 9, 2023 08:24
Show Gist options
  • Save deshack/6317554 to your computer and use it in GitHub Desktop.
Save deshack/6317554 to your computer and use it in GitHub Desktop.
Add Roboto Condensed to your project with @font-face CSS rule. See http://deshack.net/use-roboto-condensed-font-face-css-rule/ for a complete and detailed tutorial.
/**
* Include Roboto Condensed font in your project
*
* Download Roboto Condensed ttf files from Google Fonts and place it in the same directory of this CSS file
* You can then use this font in your project by setting
* font-face: "Roboto Condensed", Helvetica, Arial, sans-serif;
*
* @author Mattia Migliorini (deshack)
* @license MIT
*/
/* Light */
@font-face {
font-family: "Roboto Condensed";
font-style: normal;
font-weight: 300;
src: local('Roboto Condensed Light'), local('RobotoCondensed-Light'), url("RobotoCondensed-Light.ttf") format('truetype');
}
@font-face {
font-family: "Roboto Condensed";
font-style: italic;
font-weight: 300;
src: local('Roboto Condensed Light Italic'), local('RobotoCondensed-LightItalic'), url("RobotoCondensed-LightItalic.ttf") format('truetype');
}
/* Normal */
@font-face {
font-family: "Roboto Condensed";
font-style: normal;
font-weight: 400;
src: local('Roboto Condensed Regular'), local('RobotoCondensed-Regular'), url("RobotoCondensed-Regular.ttf") format('truetype');
}
@font-face {
font-family: "Roboto Condensed";
font-style: italic;
font-weight: 400;
src: local('Roboto Condensed Italic'), local('RobotoCondensed-Italic'), url("RobotoCondensed-Italic.ttf") format('truetype');
}
/* Bold */
@font-face {
font-family: "Roboto Condensed";
font-style: normal;
font-weight: 700;
src: local('Roboto Condensed Bold'), local('RobotoCondensed-Bold'), url("RobotoCondensed-Bold.ttf") format('truetype');
}
@font-face {
font-family: "Roboto Condensed";
font-style: italic;
font-weight: 700;
src: local('Roboto Condensed Bold Italic'), local('RobotoCondensed-BoldItalic'), url("RobotoCondensed-BoldItalic.ttf") format('truetype');
}
@ruzzll
Copy link

ruzzll commented Apr 27, 2018

Please fix the download link

@JPDesign
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment