Created
April 25, 2014 17:05
-
-
Save MrUzu/11296423 to your computer and use it in GitHub Desktop.
Google Web fonts hacking for chrome Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1/ get the SVG version of your font : | |
a - spoof the user agent | |
=> Mozilla/4.0 (iPad; CPU OS 4_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/4.1 Mobile/9A405 Safari/7534.48.3 | |
b - Display font stylesheet : | |
=> ex :http://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext | |
c - copy the font face declaration | |
=> ex : @font-face { | |
font-family: 'Open Sans'; | |
font-style: normal; | |
font-weight: 400; | |
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/licensed/font?kit=u-WUoqrET9fUeobQW7jkRZbd9NUM7myrQQz30yPaGQ4#OpenSans) format('svg'); | |
} | |
d - paste the css in a specific media query : | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
@font-face { | |
font-family: 'Open Sans'; | |
font-style: normal; | |
font-weight: 400; | |
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/licensed/font?kit=u-WUoqrET9fUeobQW7jkRZbd9NUM7myrQQz30yPaGQ4#OpenSans) format('svg'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment