As you've already seen, you specify a font in JavaScript like this:
ctx.font = "bold 12px Arial";
FUN WITH FONTS: Here are a sample fonts for you to inspect. Take a look at the page source to see the code for the entire applet. This applet only displays a sample of nine fonts. You will need to find more fonts to experiment with when you get to the assignment. | FIXED VERSUS VARIABLE WIDTH: Obviously a "w" is wider than an "i", but in fixed width fonts they are alloted the same amount of space. Assuming that the fonts in the example to the right are properly rendered on your screen, you will notice that the letters in the top three lines line up consistantly. However, you will notice that this is not the case with the bottom three lines. |