W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [css3-fonts] new editor's draft

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Wed, 21 Jan 2009 15:39:37 +0000
Cc: www-style <www-style@w3.org>
Message-Id: <5596901A-5040-4203-A016-99916B7903EF@jfkew.plus.com>
To: John Daggett <jdaggett@mozilla.com>

On 21 Jan 2009, at 14:40, John Daggett wrote:

>> I'd suggest that for TrueType/OpenType fonts, the PostScript name (ID
>> = 6) is probably the best choice. Unlike the Full name, this is not
>> subject to localization, and it should be equally adequate to  
>> uniquely
>> identify a particular font on the system. (That's not guaranteed, of
>> course, but if the user has conflicting fonts installed locally, I
>> don't think that's our problem here.)
>
> I agree that relying on Postscript names would be best.  But I don't
> think there's good support for Postscript name lookups across all
> platforms (e.g. Windows GDI).

There may not be good support for Full Name lookups across all  
platforms either (e.g., fontconfig, at least in some versions I've  
worked with). But I suspect that user agents will end up wanting to  
cache font lists anyway, so it may not be necessary to let the  
convenience of platform APIs determine this.

> I could be wrong about this but aren't Postscript names
> technically optional?  I'm sure most fonts have them these days but  
> that
> may not be true for older TrueType fonts.

Hmmm.... that surprised me, but you're right, the OpenType spec does  
allow for the possibility that it's missing. Although it says "If no  
name ID 6 is present, then there is no defined method for invoking  
this font on a PostScript interpreter", which would make such a font  
rather less generally useful. I'd be surprised if there really are  
fonts out there that lack this entry, though, as every font-creation  
tool I remember seeing has filled it in by default.

Actually, it's not clear that the Full Name (ID = 4) will necessarily  
be present either; AFAICT, the OpenType spec doesn't make it explicit  
whether certain name table entries are required and others optional.  
It seems clear that *some* of them must be optional, but we're left to  
guess exactly which ones.

The MS version of the spec does say that Windows uses the Full Name,  
so in practice this is likely to be present in all real-world fonts;  
however, it's still not entirely satisfactory given the possibility of  
localized variants. Also, the form of the Windows-platform Full Name  
may be difficult for users to predict, as it can depend whether the OT  
font is TT- or CFF-flavored. The spec says:

<quote>
Full font name; this should be a combination of strings 1 and 2.  
Exception: if the font is "Regular" as indicated in string 2, then use  
only the family name contained in string 1.
An exception to the above definition of Full font name is for  
Microsoft platform strings for CFF OpenType fonts: in this case, the  
Full font name string must be identical to the PostScript FontName in  
the CFF Name INDEX.
</quote>

and later in its example, it illustrates this:

<quote>
4. The complete, hopefully unique, human readable name of the font.  
This name is used by Windows. "Times New Roman Bold"
(If this were the Microsoft platform string for a CFF OpenType font,  
then the value would be "TimesNewRoman-Bold", as described in the  
definition of name ID 4 above.)
</quote>

It all seems a bit of a mess. :(  Overall, I think I'd still favor the  
Postscript name.

JK
Received on Wednesday, 21 January 2009 15:40:30 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT