Skip to content

Instantly share code, notes, and snippets.

@fernandojsg
Created May 5, 2013 09:31
Show Gist options
  • Save fernandojsg/5520282 to your computer and use it in GitHub Desktop.
Save fernandojsg/5520282 to your computer and use it in GitHub Desktop.
JS: Google fonts
http://www.google.com/fonts/
<link href='http://fonts.googleapis.com/css?family=Iceland' rel='stylesheet' type='text/css'>
@media screen {
@font-face {
font-family: 'Iceland';
font-style: normal;
font-weight: 400;
src: local('Iceland'), local('Iceland-Regular'), url('http://themes.googleusercontent.com/static/fonts/iceland/v1/F6LYTZLHrG9BNYXRjU7RSw.woff') format('woff');
}
}
gameCanvas.getContext("2d").font = "18px Iceland";
gameCanvas.getContext("2d").textBaseline = "top";
gameCanvas.getContext("2d").fillText("Score: " + ticksSurvived, 5, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment