[MPEG-OTSPEC] TTC "Offsets2" and slot numbers
Ken Lunde
lunde at unicode.org
Wed Jan 10 01:08:46 CET 2024
Skef,
What you referred to as "slot numbers" are not guaranteed to be stable across different versions of a TTC or even different builds of the same version of a TTC, in terms of their relationship with a particular font in the font collection. The number of available weights may increase, or in the case of a Pan-CJK font collection, the number of supported languages may increase (this actually happened for the Source Han and Noto CJK fonts when HK support was added), both of which have a very strong potential (or to be honest, near-certainty) to destabilize the relationship between the slot numbers and their corresponding fonts in a font collection.
I would therefore recommend avoiding the use of slot numbers when storing references to fonts in a font collection.
Regards...
-- Ken
> On Jan 9, 2024, at 15:57, Skef Iterum <skef at skef.org> wrote:
>
> I had a thought about the TTC portion of the combined Google proposal after the meeting.
>
> I don't have much experience with the client-side of TTCs. I believe that in some cases one can pick out a font inside based on an identifying string. For example, the CSS font specification indicates that a font is picked out of its container by way of its PostScript name. However, I believe I've also seen contexts in which a font is picked out by slot number.
>
> In any context where slot number is a valid TTC interface, the second, overriding offset can potentially make a slot number ambiguous: On one client that understands the new specification you get one list, but on a different client that only understands the current spec you get a different list.
>
> This is not a problem as long as the lists are kept in sync, but unless slot numbers are irrelevant -- or we want to push implementations towards their being irrelevant going forward -- I think we should add some language to the spec indicating that when both offsets are in use their entires should be kept in sync, and perhaps even that validators can (and should?) flag fonts in which key entries in the name tables of the same slot differ between "Offsets" and "Offsets2".
>
> Skef
>
> _______________________________________________
> mpeg-otspec mailing list
> mpeg-otspec at lists.aau.at
> https://lists.aau.at/mailman/listinfo/mpeg-otspec
More information about the mpeg-otspec
mailing list