Sunday, August 5, 2012

Fonts in FF look crappy with Cleartype off. As a developer I should leave the default settings. IE9 by default is anti aliased & fonts are smooth, but not FF.

My dilemma is with using Google fonts. These cool fonts look like crap in FF (FF 14, Win7). Times and Arial are ok and readable, but when go outside the websafe fonts they are aliased and ugly. Now IE9 (IE9 Win7) has anti aliasing built in and it smooths out the fonts. This looks fine. That features annoys me in some other ways, but the fonts look good.

Look at http://www.google.com/webfonts/ using FF and IE. I am running Win7 and using FF 14 and IE9.

So, do I used these exotic fonts knowing I lot of people will see them with these ugly jagged edges? Every person with a somewhat new computer using FF will see it that way.

Chome is somewhere in between. It looks better than FF, but worse that IE. More people use Chrome on desktops than any other browser BTW. Didn't realize they has surpassed FF, but as of March 2012 they are winning.

OK, so I had turned Cleartype on and it smoothed the fonts in FF, but they I went back and turned it back off to see check Chrome, but now in FF the fonts are still smooth. Why didn't it return to being jagged? Maybe I need to reboot, but I didn't need to reboot to turn Cleartype on???

Friday, August 3, 2012

Never used Computed Style in JS to check CSS. I see now its relevance. I can't believe that's never come up til now.

I had a JS function that checked the CSS of a DIV to see if its display was set to 'none'. Well, as many times as I've used JS to manipulate the DOM and CSS, I guess it had never come up where I was checking a style's value in a style sheet (embedded or external). I just couldn't get it to work unless I set the style inline or used JS to set the style first.
According to Stephen Stchur...

"Trying to retrieve the a css style property via javascript will only work when that style property has previously been set via javascript OR when that style property was defined inline by using the style attribute in (X)HTML. Now this doesn't do you much good if you haven't first set said css property in javascript (and I certianly hope no one is using inline css styles), and you still want to retrieve it via javascript."

http://blog.stchur.com/2006/06/21/css-computed-style/

The helpful folks at StackOverflow.com came to my rescue in a matter of minutes. That's where I found the link to Mr. Stchur's blog, among the other approaches to my question.
http://stackoverflow.com/questions/11799410/javascript-only-recognizising-inline-style-and-not-style-set-in-head