- From: Behdad Esfahbod <behdad@google.com>
- Date: Sat, 28 Mar 2015 14:58:19 -0400
- To: WOFF Working Group <public-webfonts-wg@w3.org>
- Message-ID: <CAOY=jUR=RdWywmOGUGaTw1GqOD6fc10hfcao38GfM7MY-yRgBA@mail.gmail.com>
Also, in this clause: An encoder SHOULD choose shorter encodings, and MUST be consistent in choice of encoding for the same value, as this will tend to compress better. I think the second part (MUST) is excessive. On Sat, Mar 28, 2015 at 2:55 PM, Behdad Esfahbod <behdad@google.com> wrote: > Hi all, > > I suppose this is the latest draft: > > http://dev.w3.org/webfonts/WOFF2/spec/#DataTypes > > Reading the section on 255UInt16 encoding, I found a few issues: > > The table is really confusing: > > Data TypeSyntaxDescription and CommentsUInt8 Codeif (Code < 253) Value > = Code; /* [0..252] */if ((Code == 254) || (Code == 255))UInt8 Value1if > (Code == 255) Value = 253 + Value1; /* [253..508] */ > if (Code == 254) Value = 506 + Value1; /* [506..761] */else if (Code == > 253)UInt16 ValueValue; /* [0..65535] */ > > IMO this is a very clumsy description of the encoding. What do "Data > Type" and "Syntax" columns mean in this context?! I understand the > encoding from putting everything together, but think the table should be > rewritten. > > In the example following it is all bogus: > > For example, the value 506 can be encoded as [255, 203], [254, 0], and > [253, 1, 250] > > I know it can't be changed now, but why was it designed in a way that 253 > and 506-508 can be represented redundantly using one / two byte sequences? > > Thanks, > behdad >
Received on Saturday, 28 March 2015 18:59:02 UTC