Search code examples
cssoperating-systemos-detection

Operating sytem detection for CSS hacks (aka need a "PC only" CSS hack)


I don't like Microsoft's font rendering.

I've created a site for a client and the last unticked box on my debugging list is the biggest. (it's not 'live' yet btw so please ignore any other bugs - http://baked-beans.tv/bb)

I'm using font-family to import a non standard web font. It renders fine on Mac, but it looks like sick old man on its last legs on PC.

The biggest irony is that the font is actually ok to read in internet explorer 8. This is the first time I've EVER seen IE beat other browsers in anything. But anyway, the font doesn't look good in FF, Chrome, or Opera, on a PC.

So my solution is to serve different fonts to PC users. There are a lot of css hacks for different browsers, but not for different OS. the php OS detections are really really complex. I'm just looking for something simple like if(PC) do this; else do that;

Any advice would be immensely helpful

Just one other thing... Just wondering if there is a way I could prevent Windows from anti-aliasing type on the Internet? The reason why it looks so bad is because it's trying to anti-alias it, maybe if it left the poor font alone it wouldn't look so bad.


Solution

  • The CSS Browser Selector can target different OS's. :)