Error: JavaScript is needed to render this site: please enable it.
This page gives information about web fonts:
Separate pages give additional information about web fonts:
NB: many of the above pages which use JavaScript are very slow, especially with Chrome-based browsers, and may appear to freeze; have patience.
NB: this page uses the word font for what is more correctly termed a font family. E.g., this page uses “Arial font” to refer to all members of the Arial font family, in all sizes, weights, and variations — but not including fonts in the similarily named Arial Nova font family. Likewise this page uses “generic font” for the term “generic font family” which appears in CSS specifications.
Web characters and other web glyphs are defined in the Unicode Standard.
It is important to note that usually have only a small subset of the full Unicode character set. For example, the Unicode 15.1 Standard defines almost 145,000 characters, but many major fonts support only the MES-1 set, with 335 characters, the WGL4 set, with 656, or the MES-2 set, with 1062.
Some fonts have a very large number of characters, e.g. the Noto and Bitstream’s Cyberbit font families, though they are handicapped by being available in few weights, and Cyberbit is further handicapped by being dated.
If you try to use a character which is not available in the first font in the applicable font stack, the browser will try to find that character in succeeding fonts in the font stack: this can result in text with odd characters from other fonts; or, if the character can’t be found in any of the fonts, this can result in the character not being rendered. You should, therefore, choose fonts with all the characters you use in your website.
NB: there is no easy way to determine which fonts offer a desired character, and there is a risk that a given user will have no font with the character. The question then arises: “What will the browser do if no font in the font stack has a certain character?” I don’t pretend to know what the answer is for all operating systems, but for Windows the answer appears to be that the browser will check a few more fonts as if the fonts were also in the font stack. E.g., with one website, the browser also checked the Helvetica (Arial) and Segoe UI Symbol fonts for the character.
Caution: one problem with local fonts — but not with embedded fonts — is that there is no easy way to keep them up-to-date: indeed, when a font is updated, the version number is often unchanged, and there is often no easy way to determine where the latest versions of fonts may be found. What is worse, some font sources update their fonts very seldom, so their fonts are often out-of-date, whereas other font sources update their fonts very frequently (sometimes even several times a week), so it’s unlikely that many people will have absolutely up-to-date fonts. As a result, different people will have different versions of fonts, with older fonts having fewer characters or more defects. Also, there is no way for a site to know which users have which versions of fonts, so a site which works well for one user may not work as well for another user with older versions.
Caution: another problem with fonts — with Windows — is that, if you install new versions of font files, Windows often retains old versions of the files. Worse, if you delete font files, Windows often says that the fonts are still installed.
Caution: a further problem with Windows is that, if you install new fonts, programs may not recognize the fonts until you either restart the programs or restart Windows.
There are two classes of fonts which users may be able to choose:
User Fonts: these are fonts which users can set to tell browsers what defaults they should use if either 1a pages don’t suggest fonts, or 1b a user has set an option to override the suggested fonts.
A browser typically lets a user choose a default font, a default serif font, a default sans-serif font, and (often) a default monospace font. However, remember that a browser uses these fonts if 1a pages decline to suggest any fonts (which is very rare), or if 1b a user sets an option to override the fonts which the pages suggest (also very rare).
Generic CSS Fonts: these are fonts which browsers should use if none of the suggested fonts is available.
For example, the browser should use the generic CSS sans-serif font if a page suggests fonts using
font-family: Arial, Helvetica, sans-serif; and if neither Arial nor Helvetica is available.
I have seen browsers choose wildly inappropriate generic fonts, with no obvious way to make the browser choose other fonts which are sensible:
for example, I have seen a popular browser choose an illegible sans-serif font, and I have seen another
popular browser choose an ordinary serif font as the fantasy font.
Some browsers reasonably set generic CSS fonts to their corresponding user fonts: for example, some browsers set the generic CSS sans-serif font
to Arial Nova if the user has configured their san-serif user font to be Arial Nova. But some browser don’t.
Few browsers — Seamonkey and Vivaldi are notable exceptions — let the user choose all the defined generic CSS fonts. Browsers more typically choose the various generic CSS fonts magically, using algorithms which are hidden, which vary from browser to browser, which can result in the browsers choosing incredibly inappropriate fonts, and with no way (or no obvious way) to make the browsers make more sensible choices.
When using the CSS font-family property to style text, there are five defined generic fonts:
serif, sans-serif, cursive, fantasy, and monospace.
Here are samples of your browser’s generic CSS fonts:
| Standard generic font | Sample |
|---|---|
serif |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
sans-serif |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
cursive |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
fantasy |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
monospace |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
NB: some fonts do not clearly belong to one of the classes of CSS generic fonts. For example, Optima is generally classified as a sans-serif
font, but it should more correctly be considered a semi-sans or semi-serif font. Or, for example, Rockwell and Zilla Slab are classified as serif fonts, but should more precisely be considered
either slab or serif fonts. Unfortunately, CSS does not define semi-sans, semi-serif, slab, uncial, or additional classes of generic fonts. It would be nice if it were possible (for example) to use CSS of the
form font-family:Rockwell, 'Zilla Slab', slab, serif;, with slab being a new font-family property, with this CSS selecting
the first available font from the list “Rockwell, Zilla Slab, generic slab, or generic serif”.
NB: most browsers render monospace text smaller than other text. There is, however, a trick to make monospace text the same size as other text:
in the font-family CSS which specifies the monospace font(s), follow the monospace keyword with “, serif”.
For example, “font-family: monospace, serif;” instead of “font-family: monospace;”.
Eight more generic fonts — system-ui,
emoji, math,
fangsong, ui-sans-serif,
ui-serif, ui-monospace,
and ui-rounded —
have been proposed for CSS 4 (Sep 2021). As of Sep 2021, many modern browsers — Chrome-based and Firefox-based —
support system-ui. The proposed generic fonts are shown below,
but of course they will appear properly only if your browser supports these fonts:
| Proposed generic font | Sample |
|---|---|
system-ui |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
emoji |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
math |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
fangsong |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
ui-sans-serif |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
ui-serif |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
ui-monospace |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
ui-rounded |
A quick brown fox jumps over the lazy dog ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
There are two important issues to consider about the generic fonts. First, the user’s browser will pick an installed (local) font for each generic font, but may not let the user change what it picks, even if the browser makes a poor choice. And second, a fall-back font should be specified in the font stack for browsers which don’t support the proposed generic fonts.
Let’s consider each of these issues.
The user’s browser will pick an installed (local) font for each generic font. E.g., one user’s browser might choose Arial as the generic sans-serif font, and another user’s browser might choose Luxi Sans.
Unfortunately, a browser may choose a font which is unsuitable, or even unreadable. Users should therefore be able to change their generic fonts; but many browsers, sadly, won’t let users do so:
about:config page
and adding a property named font.name.fantasy.x-western whose value is the name of the desired fantasy font.NB: designers should avoid specifying the cursive and fantasy generic fonts, especially the latter, since it’s more likely that the browser will pick unsuitable generic cursive and fantasy fonts, and most users can’t change them if their browsers make bad choices.
If you choose to specify a proposed generic font, you should also specify fall-back fonts for browsers which don’t support the proposed generic fonts. For example:
This selects the generic system-ui font if the browser supports that font, but otherwise would select the generic
sans-serif font.
Another, more flexible example, is:
This selects a user interface font in several versions of Android, Linux, MacOS, and Windows, with fall-backs to common system fonts and the generic sans-serif font.
In addition to the generic fonts and proposed generic fonts, some browsers honour a few font names which select common user-interface fonts which can be selected using the
CSS font property — but not using the font-family property. These are listed below:
| User-interface font | Sample |
|---|---|
caption |
User-preference font used in objects that have captions: buttons, labels, and so on ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
icon |
User-preference font used in icon labels ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
menu |
User-preference font used in menus ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
message-box |
User-preference font used in dialog boxes ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
small-caption |
User-preference font used in small controls ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
status-bar |
User-preference font used in window status bars ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789¶ |
There are a number of ways to suggest Fonts, Font Weights, and Font Widths.
There are four ways for designers to suggest which fonts are to be used in a page:
The designer can suggest no fonts at all.
In this case the page uses the user default fonts. This gives the user the greatest control over how pages are rendered, so it’s a possible approach if the fonts are unimportant to the design.
An example is this concept site.
There is a possible problem with this approach: if the user’s fonts lack a character used on the site, there is no fall-back. As a result, this approach is viable only if the site only contains universally available characters.
The designer can use the <font> tag.
NB: <font> is deprecated and is less capable than other methods: never use it.
The designer can use CSS to suggest generic fonts, e.g. using:
This gives the user more control over how pages look if the browser lets the user choose the generic fonts: however, as discussed above, few browsers enable users to pick the generic fonts, and therefore if a browser selects a poor generic font, pages may look ugly or be unreadable.
There is a further problem with this approach: if the generic font lacks a character used on the site, there is no fall-back. As a result, this approach is viable only if the site only contains universally available characters.
The designer can use CSS to suggest a list of fonts (alias a font set or font stack), e.g. using:
This gives the designer more control over how pages look; this can make pages more attractive and easier to read; this can help to make pages look much the same for different users; this provides fall-backs in case the site uses a character which is not in the first font; but it reduces the user’s ability to choose. NB: it’s important to suggest a list of fonts from similar typefaces; this ensures more consistent results; the browser will use the first font in the list that is installed or embedded and which contains a site’s characters.
An example is this site, the Browser News site.
More details about this appears below, in Suggest Alternate Fonts in a Font Stack.
Sometimes a combination of the above techniques makes sense. E.g., if the site is for a company which prefers a particular font, but this font isn’t easy to read in body text sizes, it may make sense to use the company’s preferred font for headings, but to use a more legible font for body text. An example is this hockey association’s former site.
| Weight | Weight names |
|---|---|
| 100 | Thin, Hairline, Extra Light |
| 200 | Extra Light, Light, Ultra Light |
| 300 | Light, Semi Light |
| 400 | Normal, Book, Plain, Regular, Text, Thick |
| 500 | Medium, Dark, Extra Thick |
| 600 | Semi Bold, Demi bold, Bold, Extra Dark |
| 700 | Bold, Extra Bold, Ultra Bold |
| 800 | Extra Bold, Black, Heavy, Ultra Bold |
| 900 | Black, Heavy |
| 950 | Extra Black, Ultra Black (CSS4 only) |
Historically most fonts came in only two weights: regular and bold, and many software applications do not support more than this. Today, however, many fonts come in more weights, and more and more applications are supporting more weights. This author does not consider a font to be adequate for 1 body text unless it comes in regular, semibold, and bold weights, or 2 header text unless it comes in regular, bold, and either extrabold or black weights.
A problem with font weights is that there is no standard nomenclature for the various font weights: e.g., as shown in the table at the right, a font with weight 300 might be called ‘Light’ with one font, but ‘Semi Light’ with another. If in doubt as to which weight corresponds to which name, see the (very, very slow) page Fonts ⮞ True Weights. NB: bold names in this table are the names suggested in the proposed CSS 4 specification, and large names are the names recognized in CSS rules.
There are four ways for designers to suggest which font weights are to be used in a page:
When the designer wants bold text, the designer can use HTML tags for which browsers commonly set bold font weights: for example,
<b>, <h1>–<h6>, <strong>, <th>.
This approach can work for simple pages, but it’s quite limited: only two weights are possible — normal and bold — it’s semantically weak, and it makes it harder to later change the format of particular classes of text.
NB: generally speaking, <b> should not be used, because it’s semantically meaningless.
When the designer wants more nuanced control of weights of tags, the designer can use CSS to specify more nuanced weights for HTML tags: for example:
This CSS specifies the maximum weight to <h1> and <h2> tags, a somewhat lesser weight to <h3> and <h4> tags,
and a lesser semibold weight to double <em> tags.
Again, this approach can work for simple pages, but it’s still fundamentally limited: still semantically weak, and still harder to later change the format of particular classes of text.
The designer can use inline styles to define the format of text. For example:
This produces text in which the initial instance of ‘foxes’ has weight 700, and each instance of a colour has weight 500. For example:
Foxes: quick foxes — whether red, brown, grey, or white — jump over lazy dogs.
This is a very poor technique unless the format specified is to be used for that text alone, and nowhere else in the website.
The designer can put CSS rules in a stylesheet to specify the appearance of content, and use tags — and class attributes within tags — to select the rule(s) which are to apply to that tag.
For example, the designer could create a stylesheet containing:
and then put the following in an HTML document:
which will render:
Foxes: quick foxes — whether red, brown, grey, or white — jump over lazy dogs.
This is by far the best technique to use. It allows any valid font weight to be used, is semantically strong, and makes it easy to later change the appearance of content.
| Font Stretch Name | Examples of Widths |
|---|---|
ultra-condensed |
|
extra-condensed |
61%, 74%, 76%, 80%, 83% |
condensed |
60%, 62%, 67%, 68%, 73%, 76%, 78%, 79%, 82%, 83%, 86%, 87%, 88%, 90%, 92% |
semi-condensed |
87%, 88%, 90%, 91%, 93% |
normal |
100% |
semi-expanded |
107% |
expanded |
113%, 122% |
extra-expanded |
|
ultra-expanded |
One problem with working with font widths is that there is no standard width for each of the values of the CSS font-stretch property: for example, what is called condensed
for one font may be as wide as semi-condensed for another font, or extra-condensed for a third font.
(It would be much better if it were possible to specify desired widths in percentages — e.g. by doing font-stretch:80% — and in fact this has been proposed for CSS 4.)
The standard names of widths appear in the table at the right,
along with the widths (percentages of the parent fonts’ widths) of various fonts with that width. One consequence of this problem is that it can be very hard to create a font stack
in which all the fonts in the stack have similar widths.
Having said that, there is only one way to specify a desired font-width: by setting the font’s CSS font-stretch property in a font stack that takes into
account Coping with DirectWrite Issues; for example:
The hard part of this is identifying fonts with similar metrics. You can find font metrics at Fonts ⮞ Metrics.
Each user will have different fonts installed. This lists common fonts, by operating system.
The green checkmarks indicate very common fonts; yellow checkmarks indicate fonts which are somewhat less common.
| Font | Windows | Mac MacOS |
Linux Unix |
|||||
|---|---|---|---|---|---|---|---|---|
| 2000/XP | Vista | 7 | 8 | 10 | 11 | |||
| serif | ||||||||
| Cambria | ||||||||
| Constantia | ||||||||
| Georgia | ||||||||
| Georgia Pro | ||||||||
| Georgia Pro Cond | ||||||||
| Palatino Linotype | ||||||||
| Rockwell Nova | ||||||||
| Rockwell Nova Condensed | ||||||||
| Times New Roman | ||||||||
| Times | ||||||||
| sans-serif | ||||||||
| Arial | ||||||||
| Arial Black | ||||||||
| Arial Narrow | ||||||||
| Arial Nova | ||||||||
| Arial Nova Condensed | ||||||||
| Aptos | ||||||||
| Calibri | ||||||||
| Candara | ||||||||
| Corbel | ||||||||
| Gill Sans Nova | ||||||||
| Gill Sans Nova Cond | ||||||||
| Helvetica | ||||||||
| Impact | ||||||||
| Microsoft Sans Serif | ||||||||
| Neue Haas Grotesk Text Pro | ||||||||
| Segoe UI | ||||||||
| Tahoma | ||||||||
| Trebuchet MS | ||||||||
| Verdana | ||||||||
| Verdana Pro | ||||||||
| Verdana Pro Cond | ||||||||
| cursive | ||||||||
| Comic Sans MS | ||||||||
| fantasy | ||||||||
| monospace | ||||||||
| Andale Mono | ||||||||
| Consolas | ||||||||
| Courier | ||||||||
| Courier New | ||||||||
| Lucida Console | ||||||||
Until Aug 2002 Microsoft made its Core Web Fonts freely available in Windows and Mac formats; the fonts could also be installed on Unix and Linux systems. Up-to-date Core Web Fonts, sadly, are now legally available only with various Microsoft products, but old versions are legally available elsewhere.
Microsoft created a set of 6 excellent fonts for Vista and Office 2007 — Calibri, Cambria, Candara, Consolas, Constantia, and Corbel — that should be popular web fonts: however, these fonts are smaller than traditional fonts, therefore there is a risk that, if you use them for body text, users will find the text harder to read.
Microsoft offers a free font Selawik which is like its system font Segoe UI but which may be used on non-Windows systems.
Microsoft created a set of excellent fonts for Windows 10 — Arial Nova, Arial Nova Condensed, Georgia Pro, Georgia Pro Cond, Gill Sans Nova, Gill Sans Nova Cond, Neue Haas Grotesk Text Pro, Rockwell Nova, Rockwell Nova Condensed, Verdana Pro, and Verdana Pro Cond — that should be popular web fonts: however, many are smaller than traditional fonts, therefore there is a risk that, if you use them for body text, users will find text harder to read.
Microsoft created a set of excellent fonts for Office 2021 — Aptos (alias Bierstadt), Grandview, Seaford, Skeena, and Tenorite — with Aptos chosen in mid-July of 2023 as the new default Office font.
Microsoft offers a resource to find out what fonts come with their products, though sadly it isn’t kept up-to-date.
Google has collected hundreds of free fonts, some quite good, available using Google’s Font API. Very few visitors to websites will have them installed on their PCs, however, its fonts can be embedded, which makes them available to everyone: for details, see Choosing Embedded (Downloaded) Fonts.
Fonts supplied with Apple’s MacOS are listed in Wikipedia.
Chromatic fonts have multi-coloured characters, for example:
![]()
These chromatic fonts — indeed, most chromatic fonts — are best used in larger font sizes, for very specialized purposes: e.g. as dropcaps, decorative headers, in splash pages, and in artwork. The Gilbert Color font is particularily specialized: it’s best suited for publications of LGBTQ groups.
Though most chromatic fonts are best used in large font sizes, it’s easy to imagine that some fonts may be good for body text, e.g. with characters having subtly sculpted 3D highlights, with tints of black, with tints of colours, in glittering gold, or in shimmering silver. Trajan Color is an example of a chromatic font which is readable at smaller font sizes while retaining some of its gold glitter.
Chromatic fonts often have multiple layers, with characters created by laying down layers upon other layers, sometimes with CSS tricks to control which layers are used, in which order, in which colours. For example, these images of a glyph in a first, red layer below is overlaid by a glyph in a second, black layer to produce the final, composite chromatic character:

The number of layers can be large. The Sutro Deluxe font pictured above comes with 5 layers. The Bixa font comes with 12 distinct layers with 200 combinations.
NB: an example of CSS which may be used in controlling chromatic fonts is the font-feature-settings property. For more about this, see Mozilla’s font-feature-settings and Adobe’s Using OpenType-SVG fonts with CSS.
NB: one thing that is a tad confusing is that chromatic emojis will appear with recent versions of Windows 10 and 11 even if no font in the applicable font stack offers chromatic emojis. It would appear that Windows 10 and 11 are doing font substitution, using built-in emoji fonts if a character is a Unicode emoji. E.g., recent versions of Windows 10 and 11 automagically use Microsoft’s Segoe UI Emoji font for emoji characters. It is also possible, though this author has not been able to confirm it, that Windows likewise automagically uses Microsoft’s Segoe MDL2 Assets, Segoe UI Historic, and/or Segoe UI Symbol fonts.
See also: for chromatic font standards, see OpenType-SVG; and see the SVG - The SVG (Scalable Vector Graphics) table; and see the draft CSS Fonts Module Level 4 Recommendation, including the section titled Color Font Support for controlling chromatic effects.
See also: for details about chromatic fonts, see colorfonts.wtf, The Evolution of Chromatic Type, Windows Dev Center Color Fonts, and Wikipedia’s OpenType#Color_Fonts.
Caution: because websites must be accessible to the visually impaired, chromatic fonts should not be used in a way that would harm site usability.
Variable fonts are fonts whose font files define multiple weights, widths, styles, and other font attributes.
There are two advantages to variable fonts: 1 a variable font file can be smaller than multiple regular font files, thereby reducing page load times, and 2 a variable font file can specify a wider variety of font variations, e.g. not only weights of 100, 200, 300, etc., but also intermediate weights such as 150.
There are three disadvantages to variable fonts: 1 old browsers don’t support variable fonts, 2 browsers which support variable fonts may not support all variable font capabilities, and 3 few variable fonts are available (as of Feb 2019).
Examples of free variable fonts are: Source Sans Pro ✦ Secuela Variable.
Apple devices generally support a wide variety of fonts, including many fonts found on desktop devices. Other mobile devices tend to support a very small, idiosyncratic range of fonts.
For mobile devices, text clarity is especially important, and makers of mobile devices have gone to a lot of effort to create generic fonts which are especially clear on their devices. For this reason it’s generally best to make the generic fonts the default fonts.
Some font families are similar enough that they can be considered reasonable alternatives. E.g. Palatino-like font families include Book Antiqua, Palatino, Palatino Linotype, and URW Palladio L:
When using CSS to style text, it’s wise to suggest a list of similar fonts to ensure more consistency for different users. For example, if the preferred paragraph font is Palatino:
| Generic | Similar Fonts (in alphabetic order) |
|---|---|
| serif | Palatino: Book Antiqua, Palatino, Palatino Nova, Palatino Linotype, Palatino LT Std, URW Palladio L |
| Times: CG Times, Liberation Serif, Linux Libertine, Nimbus Roman No9 L, Noto Serif, Noto Serif Display, Source Serif Pro, Spectral, Times, TimesNR, Times New Roman, Tinos | |
| Georgia: Bookman Old Style, DejaVu Serif, Droid Serif, Georgia, Georgia Pro, IBM Plex Serif, Lucida Bright, LucidaBright, Martel, Noto Serif, Sitka Small, Sitka Text, Trirong | |
| sans-serif | Arial: Alegreya Sans, Archivo, Arial, Arial Nova, Arial Unicode MS, Arimo, Barlow, Cabin, Droid Sans, Dubai, Encode Sans, Fira Sans, FreeSans, Helvetica, IBM Plex Sans, Lato, Liberation Sans, Microsoft Sans Serif, Nimbus Sans L, Nunito, Nunito Sans, Source Sans Pro, Ubuntu, Univers, Univers Nova |
| Arial Narrow: Archivo Narrow, Arial Narrow, Arial Nova Condensed, Cabin Condensed, Encode Sans Condensed, Fira Sans Compressed, Fira Sans Condensed, Helvetica Condensed, Liberation Sans Narrow, Ubuntu Condensed, Univers Condensed | |
| Verdana: DejaVu Sans, Input Sans, Lucida Grande, Lucida Sans, Lucida Sans Unicode, Montserrat, Noto Sans, Noto Sans Display, Open Sans, Verdana, Verdana Pro | |
| Verdana Pro Cond: IBM Plex Sans Condensed, Noto Sans Cond, Noto Sans Display Cond, Verdana Pro Cond | |
| Avant Garde: Avant Garde, Avantgarde, Century Gothic | |
| Optima: CG Omega, Eterna, Optane, Optima, Opulen, Oregon LDO, Ottawa, URW Classico, ZapfHumnst BT, Zapf Humanist 601 | |
| monospace | Courier New: Anonymous Pro, CamingoCode, Cascadia Code, Consolas, Courier, Courier New, Cousine, Dark Courier, DejaVu Sans Mono, Droid Sans Mono, Edlo, Fira Code, Fira Mono, Freemono, Hack, IBM Plex Mono, Inconsolata, Input Mono, League Mono, Liberation Mono, Lucida Console, Lucida Sans Typewriter, Luculent, Meslo LG S, Monaco, Nimbus Mono, Noto Mono, Office Code Pro, Office Code Pro D, Oxygen Mono, Roboto Mono, Source Code Pro, Space Mono, Ubuntu Mono |
NB: one way to determine whether fonts are similar is to determine whether the fonts have similar metrics, e.g. similar widths and x-heights. Certain font metrics are reported in Fonts ⮞ Font Metrics.
NB: some fonts that are similar to each other are depicted in Fonts ⮞ Font Sets.
Normally a web page can only use installed (local) fonts: if a font isn’t installed, the browser picks another font in the current font stack that is installed. With modern browsers, however, it’s possible to specify embedded (downloadable) fonts: i.e., fonts that are hosted on a server and temporarily downloaded to the browser and cached so that the browser can use those fonts. This site, for example, uses two embedded fonts — Fira Sans and Fira Sans Condensed — hosted by Google’s font service.
NB: fonts may not be embedded if their copyright license does not allow them to be embedded.
NB: some fonts can’t be embedded; the tools to create embedded fonts report that the static fonts are corrupt.
NB: to learn about choosing embedded fonts, go here.
Embedded fonts are specified in several ways:
Fundamentally, embedded fonts are specified using using a CSS @font-face rule. For example, to specify
the regular weight of a font named ‘Fira Sans’, whose font files are stored on the site’s server in directory fonts:
Note that this CSS specifies font files in multiple formats — EOT, WOFF2, WOFF, Truetype, and SVG — because different browsers recognize different embedded font file formats.
A similar rule must be specified for each weight and style used in the web page: e.g. six rules are needed if the regular, semibold, and bold weights of the font are needed in both normal and italic styles. In addition, the font files for each weight and style must appear on the server in all the font formats listed in the CSS.
Several sites — e.g. Transfonter.org,
fontie.pixelsvsbytes.com,
FontSquirrel.com, and
Web-font-generator.com — offer services whereby you can upload a set of fonts to their sites, and the sites will download the CSS
and the equivalent web fonts in EOT, TTF or OTF, WOFF2, WOFF, and SVG formats to your PC: you incorporate the CSS into your site’s CSS, and upload the web fonts to (for example) directory
fonts of your site’s server.
Google’s Font Service greatly simplifies use of the @font-face rule by allowing a single link tag to be used instead for all the weights and
styles. For example, for the Fira Sans regular, semibold, and bold weights in both normal and italic styles:
This automatically generates all the necessary @font-face rules, and the web fonts are hosted on Google’s server.
Adobe’s Edge Web Font Service likewise simplifies use of the @font-face rule by allowing a single script tag to be used for all the
weights and styles. For example, for the Fira Sans regular, semibold, and bold weights in both normal and italic styles:
This automatically generates all the necessary @font-face rules, and the web fonts are hosted on Adobe’s server.
Other font services may allow the use of other types of code to generate the @font-face rules, and the web fonts may or may not be hosted on the service’s server.
See also: W3C’s CSS3 Fonts, Mozilla’s “Web Fonts”, CSS-Trick’s “Using @font-face”, Sitepoint’s “Optimizing Web Fonts for Performance”, and Wikipedia’s “Web Typography”.
With conventional TTF and OTF fonts, an individual font file is required for each possible variant of the font, e.g. one file for each combination of weight, width, and style. This can require a large number of large font files: for example, the Noto Sans font requires 72 individual font files totalling over 30M of files. This can result in very long font file load times.
There is, however, a type of OTF font file called a variable font file, which contains within a single file the information needed to generate multiple combinations of weights, widths, and/or styles. Using a variable font file can drastically cut font file load times.
Note, however, that there are few variable fonts, and that operating system and browser support is limited: for details, see Variable Fonts and Variable Fonts Guide.