https://developer.mozilla.org/en-US/docs/Web/CSS/font-family recommends
that a font-family specification should always include one of the generic
font-family names to serve as a fallback. For PSPP, sans-serif is a
reasonable fixed fallback.
This addresses bug #63020, which asks for "Sans Serif" to mean sans-serif.
It obviously doesn't generalize to other font name translations, but it
does address the case that the bug filer complained about. If we need a
more general mechanism, we can invent it later.
Thanks to Frans Houweling for reporting this issue.
{
put_style (&style, "font-family", "\"");
escape_string (html->file, fs->typeface, " ", "\n");
- putc ('"', html->file);
+
+ /* Always include a generic font family name as a fallback. */
+ fputs ("\", sans-serif", html->file);
}
if (fs->bold)
put_style (&style, "font-weight", "bold");