Skip to content

Instantly share code, notes, and snippets.

@dknight
Created March 27, 2012 12:45
Show Gist options
  • Save dknight/2215530 to your computer and use it in GitHub Desktop.
Save dknight/2215530 to your computer and use it in GitHub Desktop.
Web smooth for Lexus
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fix</title>
<link href="http://fast.fonts.com/cssapi/ffc13c3f-bd97-4083-bd23-6026005cd713.css" rel="stylesheet">
<script>
var windows = (navigator.appVersion.indexOf("Win") != -1);
var chrome = (navigator.userAgent.indexOf("Chrome") >= -1);
var ie = (navigator.userAgent.indexOf("MSIE") >= -1);
if( windows && (chrome || ie)) {
document.write('<link rel="stylesheet" href="lexus.css">');
}
</script>
</head>
<body>
Dragons be here
</body>
</html>
http://allcreatives.net/wp-content/uploads/demos/ieff-fix/hIEfix.png
/*
font-family:'Futura W02 Light'; // Baltic Light
font-family:'Futura W02 Book'; // Baltic Book
font-family:'Futura W02 Book Oblique'; // Baltic Book Italic
font-family:'Futura W02 Medium'; // Baltic Medium
font-family:'Futura T W10 Light'; // Russian Light
font-family:'Futura T W10 Book'; // Russian Book
font-family:'FuturaTW10-BookOblique'; // Russian Book Italic
font-family:'Futura T W10 Md'; // Russian Medium
font-family:'Futura PT W10 Book'; // Russian Book PT More smoother?
font-family:'Futura PT W10 Light'; // Russian Light PT More smoother?
*/
/* <link href="http://fast.fonts.com/cssapi/ffc13c3f-bd97-4083-bd23-6026005cd713.css" rel="stylesheet"> */
html, html a {
/* Anti-aliasing for windows and Chrome */
text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
/* Smoother for IE */
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=hIEfix.png,sizingMethod=crop);
zoom:1;
}
body {
font-family: 'Futura W02 Book', 'Futura PT W10 Book', Arial, sans-serif;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=hIEfix.png,sizingMethod=crop);
zoom:1;
}
strong {
font-family: 'Futura W02 Medium', 'Futura T W10 Md', Arial, sans-serif;
font-weight:bold;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=hIEfix.png,sizingMethod=crop);
zoom:1;
}
// Inject CSS hack to looks webfonts fonts smoother on Windows operating system.
var windows = (navigator.appVersion.indexOf("Win") != -1);
// Might be slow for large webpages
$(document).ready(function() {
// Firefox is ok?
if(windows && ($.browser.webkit || $.browser.msie) ) {
$("*").each(function() {
if( $(this).css("font-family").indexOf("Futura") != -1) {
$(this).css("zoom", "1").css("text-shadow", "1px 1px 1px rgba(0,0,0,0.05)");
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment