Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What should we do about legacy Mac font names?

40 views
Skip to first unread message

Henri Sivonen

unread,
Jul 5, 2016, 4:00:19 AM7/5/16
to dev-platform
Gecko has internal support for a number of legacy Mac encodings that
are not part of the Encoding Standard and that are *only* used for
decoding the names of legacy TrueType fonts.

As part of rewriting our Web-facing decoder/encoder infrastructure per
spec, some explicit action to deal with the font name code is needed
(drop support for non-Encoding Standard font names or support them in
a new non-Encoding Standard way).

Have I understood correctly that the TrueType font name is not exposed
by the Web Platform, is not used for identification by any Web Font
mechanism and is, therefore, only relevant to identifying system
fonts?

Telemetry shows that the usage of these encodings isn't the same
percentage across platforms, which suggests that fonts indeed aren't
coming from the Web but are coming from the system font directory.

Almost all OS X systems that run release-channel Firefox have a font
with a MacHebrew name installed. MacHebrew is non-zero but tiny on
Windows.

MacArabic, MacCE, MacGreek and MacGujarati are almost exclusively seen
on Windows! MacTurkish is more common on Windows than Mac.

MacRomanian and MacGurmukhi are non-zero but tiny.

MacIcelandic, MacDevanagari, MacFarsi and MacCroatian are at zero.

MacRoman and MacCyrillic are part of the Encoding Standard and will
continue to be supported in the form specified in the Encoding
Standard.

Legacy Mac encodings for CJK weren't Mac-specific and will continue to
be supported in the form specified in the Encoding Standard.

We don't support the rest of the legacy Mac encodings.

Since TrueType fonts can have multiple name records, it's possible
that the fonts that have legacy Mac name records also have Unicode or
Windows name records, in which case us dropping support for
(non-Roman, non-Cyrillic, non-CJK) legacy Mac font names wouldn't
break stuff.

How do we find out if we can remove support for (non-Roman,
non-Cyrillic, non-CJK) legacy Mac font names?

--
Henri Sivonen
hsiv...@hsivonen.fi
https://hsivonen.fi/

Jonathan Kew

unread,
Jul 5, 2016, 5:22:05 AM7/5/16
to Henri Sivonen, dev-platform
On 5/7/16 08:59, Henri Sivonen wrote:
> Have I understood correctly that the TrueType font name is not exposed
> by the Web Platform, is not used for identification by any Web Font
> mechanism and is, therefore, only relevant to identifying system
> fonts?

I believe that's correct.

> Since TrueType fonts can have multiple name records, it's possible
> that the fonts that have legacy Mac name records also have Unicode or
> Windows name records, in which case us dropping support for
> (non-Roman, non-Cyrillic, non-CJK) legacy Mac font names wouldn't
> break stuff.

It's highly likely that such fonts also have Unicode and/or Windows name
records; or even if they don't have those (some Mac fonts don't), it's
likely that they have legacy MacRoman names in addition to the
MacHebrew, MacArabic, or whatever. I don't recall ever seeing a font
that -only- had legacy, non-(Roman, Cyrillic, CJK) Mac names and nothing
else, although in theory it's possible.

However, just because the fonts have other names that will continue to
be supported doesn't necessarily mean nothing will break. Note that a
font's Unicode or Windows name need not be the same as its legacy Mac name.

The question is whether there's content out there that is relying on the
legacy Mac names to specify its fonts; such content could break.
Currently, if a page calls for 'font-family: "רעננה"' we'll find and use
the Raanana font on OS X. If we remove support for MacHebrew, that will
no longer work; the fact that the font -also- has a MacRoman name and
could still be accessed as 'font-family: "Raanana"' doesn't solve
anything for such content.

>
> How do we find out if we can remove support for (non-Roman,
> non-Cyrillic, non-CJK) legacy Mac font names?
>

So the question is not whether fonts with such names are present on
people's systems, but how widely such names are used by content to find
the fonts it wants. I can think of a couple of possible ways to try and
answer that. One is to crawl the web (or use some big archive, or
whatever) looking at all the CSS, legacy <font> tags, etc., to find uses
of non-(Roman, Cyrillic, CJK) font names. The other would be to "tag"
font names when we decode them in Gecko so that we know what encoding
they came from, and then have telemetry to tell us what's actually being
used.

A third option is to just do it and see if anyone complains. I notice
that 'font-family: "רעננה"' doesn't seem to work in either Chrome or
Safari today, for instance, so perhaps it's safe to assume that usage on
the web is in the minimal-to-nonexistent range.

JK

Anne van Kesteren

unread,
Jul 5, 2016, 5:33:41 AM7/5/16
to Jonathan Kew, Henri Sivonen, dev-platform
On Tue, Jul 5, 2016 at 11:21 AM, Jonathan Kew <jfkt...@gmail.com> wrote:
> A third option is to just do it and see if anyone complains. I notice that
> 'font-family: "רעננה"' doesn't seem to work in either Chrome or Safari
> today, for instance, so perhaps it's safe to assume that usage on the web is
> in the minimal-to-nonexistent range.

If that is the case in general that actually means that continuing to
support these font names is more of a risk for us, since we're not the
dominant browser on Mac.


--
https://annevankesteren.nl/
0 new messages