Helmut Richter wrote:
> I have the following choices:
>
> (1) how to provide the font to the reader
> (2) which properties of the font to consider required or preferable
>
> (1a) The easiest way is to use a font that is already installed on all
> reasonably expected systems and to provide a general specification of its
> features, e.g. „font-family: Georgia, serif;“: that is Georgia if installed,
> otherwise another serif font. Now Georgia, which I do like, is not installed
> everywhere. How could I find out enough names of fonts so that on most
> systems at least one of them is installed?
I’m afraid there is no general procedure for that. There used to be web
pages that listed commonly available fonts, but they were based on
questionable methodology, and they seem to have disappeared. The
situation has become more complicated e.g. due to mobile devices that
may have their own, limited font repertoires – which might be specially
designed for them.
Using “font-family: Georgia, serif” may well be the right way when you
have a reason to suggest Georgia when available. If you add alternative
fonts, there is no guarantee that the result is better than the generic
fallback to “serif”.
> If I specify features (like
> serif), how many of them can I specify without running the risk that there
> are systems where no font matches all of them?
I’m not sure I understand this part. The name “serif” does not speficy a
feature; it refers to an implementation-defined serif font (and possibly
user-defined, as a browser may let the user specify how the name “serif”
is mapped to an actual font).
> (1b) Another way is to provide a free – proprietary or not – font on my
> server and specify in the style sheets that it shall be downloaded from my
> site prior to use. Does the time for downloading matter until the user sees
> the contents?
It may, but this is probably not a big issue these days in most
circumstances.
> Are there any other drawbacks of this approach?
If the downloadable font is on a server different from that of the HTML
document, it may happen that the page is loaded without the font. In
this case, a default font (as defined in font-family or the browser
configuration) will be used instead.
If the download of the font is slow, it may happen that the browser
first renders the page without it, using a default font, then redraws
the page when it gets the font. Somewhat disturbing.
> What have I to
> do (up to now, I have not yet seen a straightforward recipe)?
I’d suggest starting with a Google font used remotely, i.e. with a
reference to it hosted on a Google server. From this simple approach you
can then move to other, perhaps more effective and more efficient
solutions, if suitable.
Here’s a simple example from a page of mine, where I wish to display
some texts in a Fraktur font, and it does not matter much which Fraktur,
so I use the Google font UnifrakturMaguntia: On the <head> I have
<link href=
"
https://fonts.googleapis.com/css?family=UnifrakturMaguntia&subset=all"
rel="stylesheet">
<style>
.fr {
font-family: UnifrakturMaguntia;
}
/* change Fraktur to default serif on mouseover: */
span.fr:hover { font-family: serif }
</style>
And in <body> I use class=fr for texts to be displayed in Fraktur, e.g.
<span class=fr>abc</a>.
If you find a suitable font at
https://fonts.google.com/ you will see
instructions on using it that way, with some extra stuff suggested there.
> (1d) I rule out solutions where the reader’s browser loads a font from
> a server other than mine.
If you do so, you exclude the simple approach outlined above, but you
could still use it for testing (the suitability of a font etc.) and then
move to the approach where you download a font family and prepare it for
use on your own server. (I don’t know how good Google instructions for
that are. You might need to use a “Download family” button, unzip the
package and study its contents.
> (1f) A possible solution could also be to specify two of three fonts that are
> widely installed (=1a), and one for download (=1b) as fallback when none of
> the first group is installed.
That would be suitable if the two or three fonts are essentially better
than the downloadable font. And with suitable use of CSS, it’s almost as
simple as using just a downloadable font.
> Required and desired features of fonts to be used are:
>
> (2a) support of a reasonable subset of Unicode
That’s a lot to ask for, for many values of “reasonable”. Even for a
modest basic repertoire of about 1,000 “European” characters (like the
old MEs-2 subset), there is a rather limited set of fonts that contain
all of them. On the other hand, most web pages in European languages
probably have a much more limited character repertoire.
> (2b) one clearly readable serif font for body text; preferably with wide
> characters (e.g. Georgia); required to have a matching set of italic
> characters thoroughly distinct from non-italics;
I think this boils down to a font family that has (at least) both
regular and italic typeface. For serif fonts, they tend to be different
enough.
It’s different for sans-serif fonts and for fonts that lack an italic
typeface,
so that the “italic” you get from them e.g. by using <i>...</i> is
“false italic”,
i.e. regular characters slanted algorithmically.
> preferably support of
> medieval numbers (which, as I find, fit typographically better in serif
> fonts).
I suppose you mean “oldstyle figures”, i.e. digit glyphs that vary in height
like lowercase letters do. Most fonts used on web pages do not have them.
Some, like Georgia and Constantia, have them as default glyphs for digits.
Some, like Cambria, have them as optional alternatives, i.e. you need to do
something special to get them. In CSS, you would use the font-variant
property or the older, possibly better supported font-feature-settings
property. This means that you can use, say, Georgia for different texts
so that oldstyle numbers are used in normal text but the other design,
lining figures, e.g. in numerical tables or with text in capital letters.
> (2c) one clearly readable sans-serif font for headlines
That’s a natural requirement, but it means you need to select another
font family, though sometimes a serif font family and a sans-serif font
family are available as members of a “superfamily”, such as Noto Serif
and Noto Sans, As for Georgia for example, there is no such concept; you
need to decide which sans-serif font to use with it.
Yucca