Index: Overview.html =================================================================== RCS file: /sources/public/webfonts/WOFF2/spec/Overview.html,v retrieving revision 1.29 retrieving revision 1.30 diff -r1.29 -r1.30 43c43 <
A complete WOFF2 file consists of several blocks: a 48-byte header, immediately followed < (in this order) by a variable-size table directory, a compressed font data block, --- >
A complete WOFF2 file consists of several blocks of data: a 48-byte header, immediately > followed (in this order) by a variable-size table directory, a compressed font data block, 477a479,488 >
The decompressed and reconstructed > table data MUST be stored in the format specified by the [OFF] > specification. Each > reconstructed table directory entry MUST contain a valid 'checkSum' value, > the decoder MUST recalculate the checkSum value for each decoded table. > Also, due to modifying transofrms applied to glyf and loca > tables, the decoder > MUST recalculate the checkSumAdjustmentglyf value of the entire > font and MUST store the updated value in the head table.
> 537,540c548,551 <For greater compression effectiveness, the glyf table is split into seven < substreams, to group like data together. The transformed table consists of < a header with the size of each of the substreams, followed by the substreams < in sequence. During the decoding process the reverse transformation takes place, --- >
For greater compression effectiveness, the glyf table is split > into seven substreams, to group like data together. The transformed table consists of > a number of fields speciffying the size of each of the substreams, followed by the > substreams in sequence. During the decoding process the reverse transformation takes place, 545c556 <
Included in the Transformed glyf Header is a --- >
Included in the Transformed glyf Table is a 576,581c594,615 < whether it contains an explicit bounding box, or whether the bounding < box is to be inferred from the coordinate values. If the bounding box is to < be inferred, the < explicit xMin, yMin, xMax and yMax values MUST be calculated at the time < of decoding the outline point coordinates. The total number of bytes < in this bitmap is equal to 4 * ((numGlyphs + 31) / 32). The bits are packed --- > whether it contains an explicitly encoded bounding box, or whether the bounding > box is to be inferred from the coordinate values. The relevant computations to determine > the bounding box status must be performed by both an encoder and a decoder. For each > simple glyph, > an encoder MUST calculate the the xMin, yMin, xMax and yMax coordinate values using > all outline points (both on- and off-curve points) and compare the calculate values > with the encoded bounding box info for the glyph. If the glyph bounding box info matches > the calculated values, an encoder MUST omit the bounding box info. Otherwise, > if the > calculated bounding box values do not equal the glyph values encoded in a font, > an encoder MUST set the corresponding bboxBitmap flag and record > the original bounding box values in the bboxStream. > For a composite glyph, > an encoder MUST always set the corresponding bboxBitmap flag and > record the original bounding box values in the bboxStream.
> >A decoder MUST perform similar > calculations if the bounding box is to be inferred. For a given glyph, when a corresponding > bit in bboxBitmap is not set, the xMin, yMin, > xMax and yMax values MUST be calculated at the time of decoding using all outline > point coordinates. The total number of bytes in bboxBitmap > is equal to 4 * ((numGlyphs + 31) / 32). The bits are packed 585c619 < byte, and so on. A 1 value indicates an explicitly set bounding box.
--- > byte, and so on. A bit=1 value indicates an explicitly set bounding box. 587c621 <After reading the TransformedGlyphHeader, the --- >
Upon reading the Transformed glyf Table , the 590,593c624,628 < TransformedGlyphHeader. Also, at the point of reconstructing a glyph, a < decoder should store for each glyph the corresponding offset in the < reconstructed glyph table, and this data will collectively become the < contents of the reconstructed locatable (see section --- > Transformed glyf Table . Also, at the point of reconstructing > a glyph, a decoder > MUST store for each glyph the corresponding offset in the > reconstructed glyph table, and this data will collectively become the > contents of the reconstructed loca table (see section 671c706 < composite glyph instructions and the specified scales of iindividual components, --- > composite glyph instructions and the specified scales of individual components, 884c919 < field of the transformed glyf header.
--- > field of the Transformed glyf Table. 1012,1013c1047,1048 < if present, MUST be the last block in the WOFF file, following all the font < tables and any extended metadata block. --- > if present, MUST be the last block in the WOFF file, following the compressed font > data stream and the extended metadata block, if one is present.