0

I am using @font-face tag in my website. Everything works fine in Mac, Vista and Win 7, but fonts are incredibly ugly in XP. This is because font anti-aliasing is kept at very primitive level by default.

In my opinion, the best way through this problem is to make a JS to change style according to user's OS. If it is Win XP, a simple stylesheet is used, if it is not- the standard one.

I am using PHP embedded in HTML (index.php, rather than index.html) everywhere, so this complicates things a little. I am trying the following script, but it does not work:

<script type="text/javascript">
<!--
	var browserInfo=string;
	browserInfo=navigator.appVersion;
	if (browserInfo.indexOf("XP")=-1)
	{
		document.styleSheets[0].href="style-xp.css";
	}
       else
       {
       document.styleSheets[0].href="style.css";
       }
//-->
</script>

Edited by VartotojoVardas: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Airshow
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.