Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Last active November 30, 2016 17:35
Show Gist options
  • Save fernandiez/8a06d7eb17fdcb36f1a085e77d2ecef2 to your computer and use it in GitHub Desktop.
Save fernandiez/8a06d7eb17fdcb36f1a085e77d2ecef2 to your computer and use it in GitHub Desktop.
Using custom fonts CSS @font-face in a WordPress theme
/* Fonts
--------------------------------------------- */
@font-face {font-family: "Century Gothic";
src: url("fonts/century-gothic.eot");
src: url("fonts/century-gothic.eot?#iefix") format("embedded-opentype"),
url("fonts/century-gothic.woff2") format("woff2"),
url("fonts/century-gothic.woff") format("woff"),
url("fonts/century-gothic.ttf") format("truetype"),
url("fonts/century-gothic.svg#Century Gothic") format("svg");
}
@font-face {font-family: "Handel Gothic BT";
src: url("fonts/handel-gothic-bt.eot");
src: url("fonts/handel-gothic-bt.eot?#iefix") format("embedded-opentype"),
url("fonts/handel-gothic-bt.woff2") format("woff2"),
url("fonts/handel-gothic-bt.woff") format("woff"),
url("fonts/handel-gothic-bt.ttf") format("truetype"),
url("fonts/handel-gothic-bt.svg#HandelGothic BT") format("svg");
}
body {
background-color: #fff;
color: #000;
font-family: "Century Gothic", Helvetica, sans-serif;
font-size: 16px;
font-weight: 200;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
h1 {
color: #000;
font-family: "Handel Gothic BT", Helvetica, sans-serif;
font-size: 24px;
-webkit-font-smoothing: antialiased;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment