HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 10. FONT FAMILIES 101


it makes text harder to read.


http://en.wikipedia.org/wiki/Fonthas a wonderful article giving his-
toric background and more.


For our purposes, a font is a set of letter shapes used to create a message.


10.2.1 Word Processing Font Choices


When using a word processor like Microsoft Word, a variety of fonts, some-
times a huge variety, is available. And you can download and install even
more. You can create your document and then render it as a printed docu-
ment with full confidence that your letters will look the way you want.


But one seldom spoken nightmare of word processing is document sharing.
A document may look beautiful on your own computer, but when you send
it to a friend and they open it, if they do not have the same fonts installed,
the document may look dramatically different, especially if you are using a
carefully-chosen but obscure font.


That is because the fonts are not part of the document. Fonts are sold
separately. The document says what fonts it wants, and the computer is
expected to provide those fonts. Sadly this problem can also apply to PDF
files.


The good news is that modern computers generally come with a large enough
collection of fonts that the document-sharing problem is often minimal.


10.2.2 Web Page Font Choices


Word processing programs, such as Microsoft Word, provide a selection of
fonts that can be used in creating documents. Web designers would love to
have similar freedom in selecting fonts for their websites.


The document-sharing problem is much larger on the web. Your users may
be running Microsoft Windows, Mac OS X, Linux Ubuntu, Apple IOS, An-
droid, or who knows what else. They may be using Internet Explorer, Fire-
fox, Chrome, Safari, Opera, or who knows what else.


Getting your page to display the way you want, with the fonts you want, de-
pends on all your users having those same fonts, or something close enough.
It is not as easy as we might like.

Free download pdf