Fonts and lint
|
|
Linux comes with a bitmap font called Helvetica. It looks terrible; nothing like the Helvetica that comes with Mac OS, except at large sizes. I'd change the Also, why all the empty |
|
|
Thanks - now that the style declarations are inline with the script, they can just directly reference the font name, not call a file name. This project is a way for me to learn javascript, so this advice is really helpful. Most of my informal coding is in perl, which has no switch statement, and converts types on the fly. The catch statements are for exception handling under development. Now that I've dabbled in this bit of js, I can go back and tighten up my style. |
|
|
Interesting---You're trying to learn JavaScript by writing in GreaseMonkey, and I'm trying to learn GreaseMonkey by reading some scripts (haven't written anything yet) :-) For learning JS, check out Douglas Crockford's articles[0] which explain how to avoid some of JavaScript's pitfalls. Also nice is JSLint[1] which warns about things that may have unpredictable results. For example, JS doesn't have block scope, only function scope, so any [0]: http://www.crockford.com/javascript/
|
|
|
Very interesting scope issues. I tend to cargo cult a lot when self-teaching and eventually go through entire rewrites (and more rewrites) as I grow. |
![]() ![]() |
On the Linux and Windows font front - what are you all using? It looks like FreeSans is the closest common Linux font? |


