views:

71

answers:

3

Details on fonts: When you have some text in specific font, there's a header that says what the font is and then characters that are X number of bytes apiece. The computer looks up what that character is supposed to look like in the font and displays it. Underlines, Bolds, and Italics are added using a set algorithm that applies to all fonts.

Question: When you zoom in on a font, it doesn't loose any quality, so is each letter represented by some sort of vector graphic?

+1  A: 

TrueType is probably the most common format for fonts these days. The specification is available via http://www.truetype-typography.com/ttspec.htm

There are other formats, and not all of them exhibit the features you describe. See, for example, BDF (which you don't want to zoom in on)

David Dorward
+1  A: 

It depends on the font format. Some fonts are bitmapped, in which case zooming in can lead to jagged edges and such. Bitmapped fonts were once quite common because they allow hand-tuning for specific sizes, and they're very fast to display.

Most reasonably recent font formats are based on some sort of vectors -- typically something like quadratic b-splines. Most font formats like Adobe type 1, TrueType and OpenType basically use a small virtual machine, and the font is defined, in essence, as a set of instructions to be executed on that virtual machine. This adds considerable flexibility, such as adding "hints" so the font still looks good when rendered at a small size.

There are also a few "intermediate" formats -- for example, 16-bit Windows used a vector font format that just described characters in terms of lines to be drawn, without anything like hints. These scaled somewhat better than bitmapped fonts, but they still tended to look fairly poor at extremely small or extremely large sizes.

Jerry Coffin
A: 

Here's a link to some more details at Wikipedia.

http://en.wikipedia.org/wiki/Computer%5Ffont

Chris Persichetti