Web typography
Web typography, like typography generally, is the design of pages their layout and typeface choices. Unlike traditional print-based typography, pages intended for display on the World Wide Web have additional technical challenges andgiven its ability to change the presentation dynamicallyadditional opportunities. Early web page designs were very simple due to technology limitations; modern designs use Cascading Style Sheets, JavaScript and other techniques to deliver the typographer's and the client's vision.
When HTML was first created, typefaces and styles were controlled exclusively by the settings of each web browser. There was no mechanism for individual Web pages to control font display until Netscape introduced the
font element in 1995, which was then standardized in the HTML 3.2 specification. However, the computer font specified by the font element had to be installed on the user's computer or a fallback font, such as a browser's default sans-serif or monospace font, would be used. The first CSS specification was published in 1996 and provided the same capabilities.The CSS2 specification was released in 1998 and attempted to improve the font selection process by adding font matching, synthesis and download. These techniques did not gain much use, and were removed in the CSS2.1 specification. However, Internet Explorer added support for the font downloading feature in version 4.0, released in 1997. Font downloading was later included in the CSS3 fonts module, and has since been implemented in Safari 3.1, Opera 10 and Mozilla Firefox 3.5. This has subsequently increased interest in Web typography, as well as the use of font downloading.
CSS1
In the first CSS specification, authors specified font characteristics via a series of properties:Web-safe fonts
Web-safe fonts are computer fonts that may reasonably be expected to be present on a wide range of computer systems, and used by Web content authors to increase the likelihood that content displays in their chosen font. If a visitor to a Web site does not have the specified font, their browser tries to select a similar alternative, based on the author-specified [|fallback fonts] and [|generic families] or it uses font substitution defined in the visitor's operating system.Microsoft's Core fonts for the Web
To ensure that all Web users had a basic set of fonts, Microsoft started the Core fonts for the Web initiative in 1996. Released fonts include Arial, Courier New, Times New Roman, Comic Sans, Impact, Georgia, Trebuchet, Webdings and Verdana—under an EULA that made them freely distributable but also limited some rights to their use. Their high penetration rate has made them a staple for Web designers. However, most Linux distributions don't include these fonts by default.CSS2 attempted to increase the tools available to Web developers by adding font synthesis, improved font matching and the ability to download remote fonts.
Some CSS2 font properties were removed from CSS2.1 and later included in CSS3.
Fallback fonts
The CSS specification allows for multiple fonts to be listed as fallback fonts. In CSS, thefont-family property accepts a list of comma-separated font faces to use, like so:The first font specified is the preferred font. If this font is not available, the Web browser attempts to use the next font in the list. If none of the fonts specified are found, the browser displays its default font. This same process also happens on a per-character basis if the browser tries to display a character not present in the specified font.
Generic font families
To give Web designers some control over the appearance of fonts on their Web pages, even when the specified fonts are not available, the CSS specification allows the use of several generic font families. These families are designed to split fonts into several categories based on their general appearance. They are commonly specified as the last in a series of fallback fonts, as a last resort in the event that none of the fonts specified by the author are available. For several years, there were five generic families:Sans-serif
Serif
Monospace
Cursive
Fantasy
CSS fonts working draft 4 with lesser browser support
, the CSS Working Group of W3C proposes that systems specify a default font using tags; as of the same date, these are not widely supported yet.- : Default fonts on a given system: the purpose of this option is to allow web content to integrate with the look and feel of the native OS.
- : Default fonts on a given system in a serif style
- : Default fonts on a given system in a sans-serif style
- : Default fonts on a given system in a monospace style
- : Default fonts on a given system in a rounded style
- : Fonts using emoji
- :Fonts for complex mathematical formula and expressions.
- * Chinese typefaces that are between serif Song and cursive Kai forms. This style is often used for government documents.
Web fonts
History
A technique to refer to and automatically download remote fonts was first specified in the CSS2 specification, which introduced theMicrosoft first added support for downloadable EOT fonts in Internet Explorer 4 in 1997. Authors had to use the proprietary WEFT tool to create a subsetted font file for each page. EOT showed that webfonts could work and the format saw some use in writing systems not supported by common operating systems. However, the format never gained widespread acceptance and was ultimately rejected by W3C.
In 2006, Håkon Wium Lie started a campaign against using EOT and rather have web browsers support commonly used font formats. Support for the commonly used TrueType and OpenType font formats has since been implemented in Safari 3.1, Opera 10, Mozilla Firefox 3.5 and Internet Explorer 9.
In 2010, the WOFF compression method for TrueType and OpenType fonts was submitted to W3C by the Mozilla Foundation, Opera Software and Microsoft, and browsers have since added support.
Google Fonts was launched in 2010 to serve webfonts under open-source licenses. By 2016, more than 800 webfont families are available.
Webfonts have become an important tool for web designers and as of 2016 a majority of sites use webfonts.
File formats
By using a specific CSSTrueDoc
, while not specifically a webfont specification, was the first standard for embedding fonts. It was developed by the type foundry Bitstream in 1994, and became natively supported in Netscape Navigator 4, in 1996. Due to open source license restrictions, with Netscape unable to release Bitstream's source code, native support for the technology ended when Netscape Navigator 6 was released. An ActiveX plugin was available to add support for TrueDoc to Internet Explorer, but the technology had to compete against Microsoft's Embedded OpenType fonts, which had natively supported in their Internet Explorer browser since version 4.0. Another impediment was the lack of open-source or free tool to create webfonts in TrueDoc format, whereas Microsoft made available a free Web Embedding Fonts Tool to create webfonts in their format.Embedded OpenType
Internet Explorer has supported font embedding through the proprietary Embedded OpenType standard since version 4.0. It uses digital rights management techniques to help prevent fonts from being copied and used without a license. A simplified subset of EOT has been formalized under the name of CWTScalable Vector Graphics
Web typography applies to SVG in two ways:- All versions of the SVG 1.1 specification, including the SVGT subset, define a font module allowing the creation of fonts within an SVG document. Safari introduced support for many of these properties in version 3. Opera added preliminary support in version 8.0, with support for more properties in 9.0.
- The SVG specification lets CSS apply to SVG documents in a similar manner to HTML documents, and the
@font-face rule can be applied to text in SVG documents. Opera added support for this in version 10, and WebKit since version 325 also supports this method using SVG fonts only.