Skip to content

Instantly share code, notes, and snippets.

@kogakure
Created August 17, 2014 12:00
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 kogakure/77bd100fb728245e8662 to your computer and use it in GitHub Desktop.
Save kogakure/77bd100fb728245e8662 to your computer and use it in GitHub Desktop.
A Pen by Stefan Imhoff.
<p>Simple subsetting and inheritance trick using Google Fonts. The key part is the <code>text=%26</code> parameter in the Lobster Two font <code>@import</code>. This makes Google send a font containing just the "&amp;" character.</p>
<!-- Look, Mum, no <span>s! -->
<h1>ROCK & ROLL</h1>
@import url(http://fonts.googleapis.com/css?family=Bevan);
@import url(http://fonts.googleapis.com/css?family=Lobster+Two&text=%26);
h1 {
font-family: Lobster Two, Bevan;
text-ALIGN: center;
font-size: 9vw;
margin-top: 0;
}
/* Just for the explanation */
p {
width: 70vw;
margin: 1em auto 0;
font-size: 20px;
font-family: sans-serif;
}
code {
background: #ccc;
padding: 0 0.5em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment