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>

VaVa,

Suggest you try this before proceeding any further with a javascript solution.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.