Skip to content

Instantly share code, notes, and snippets.

@z-------------
Created June 18, 2014 13:46
Show Gist options
  • Select an option

  • Save z-------------/dbfcc7c7d9f3f8126f1f to your computer and use it in GitHub Desktop.

Select an option

Save z-------------/dbfcc7c7d9f3f8126f1f to your computer and use it in GitHub Desktop.
var fontFamily = getComputedStyle(document.body).getPropertyValue("font-family");
if (fontFamily.indexOf("Arial") < fontFamily.indexOf("Helvetica") || fontFamily.indexOf("Helvetica") == -1) {
document.body.style.fontFamily = "'Helvetica Neue', Helvetica, Arial, sans-serif";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment