Typography is the art of arranging and setting type traditionally for print and now extended to digital devices and interfaces.
Fonts, also referred to as typefaces, can be recognized by looking closely at a particular set of defining characteristics used to describe them.
Fonts are generally divided into three categories according to their most obvious characteristics
Note: monospace, script fonts, handwritten fonts and typewriter fonts can be either serif or non(sans) serif fonts
Thousands of variations of these families exist making up a rich selection of typefaces available for print. For the web, however, designers who wish to have some control or ability to foresee how their designs will look, must restrict themselves to fonts available on the users' systems, meaning that usually designers select amongst the fonts common to both Mac and PC systems (and even the fonts common to both do not display precisely the same).
Link: [www.ampsoft.net/webdesign-l/WindowsMacFonts.html Common fonts to all versions of Windows & Mac equivalents]
Font type refers to whether a font is normal, italic or oblique. It is the equivalent of the font-style property in CSS
Property | Description |
---|---|
font | Sets all the font properties in one declaration |
font-family | Specifies the font family for text |
font-size | Specifies the font size of text |
font-style | Specifies the font style for text |
font-variant | Specifies whether or not a text should be displayed in a small-caps font |
font-weight | Specifies the weight of a font |
In the world of print and typesetting, font sizes were measured in points (1/72 of an inch) and their size referred to the number of points from the baseline to the cap height. The typical body text font was 12 points high (12pt). Early computer monitors had a resolution of 72 pixels per inch (almost) which corresponded nicely with the print typesetting measurement of points. The default screen font in browsers was typically 12 pixels. With the improvement of screen resolutions, a physical inch on a monitor corresponds to 96 pixels. This makes the default fonts on most browsers is now 12 points or 16 pixels high.
Other measures important to type-setting and determining legibility at prescribed sizes are the x-height: the height of the letter x of a particular typeface and the height of the ascenders and descenders. The spacing between the baselines of two lines of text is called the leading or line spacing or the line-height property in CSS (See figure above).
An excellent overview with examples on Kyle Schaeffer's blog CSS Font-Size: em vs. px vs. pt vs. percent
Font size refers to the height of a capital "E" of a particular font face.
In HTML font sizes can be specified in various ways:
CSS can be used to embed fonts so that fonts not included in the user's computer can be used within HTML pages. This allows designers to extend font use beyond web safe fonts.
Google Fonts provides a wide selection of free and for fee fonts that can be embedded in web pages and a guide on how to embed selected fonts by linking to a Google fonts generated style sheet.
Fonts can also be embedded using the @font-face rule
CSS tricks - Using @font-face Choosing web font
See also CSS text styling tutorial