wxMaxima
Loading...
Searching...
No Matches
normalize.h
1/* Copyright 2013 Google Inc. All Rights Reserved.
2
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5*/
6
7/* Functions for normalizing fonts. Since the WOFF 2.0 decoder creates font
8 files in normalized form, the WOFF 2.0 conversion is guaranteed to be
9 lossless (in a bitwise sense) only for normalized font files. */
10
11#ifndef WOFF2_NORMALIZE_H_
12#define WOFF2_NORMALIZE_H_
13
14namespace woff2 {
15
16struct Font;
17struct FontCollection;
18
19// Changes the offset fields of the table headers so that the data for the
20// tables will be written in order of increasing tag values, without any gaps
21// other than the 4-byte padding.
22bool NormalizeOffsets(Font* font);
23
24// Changes the checksum fields of the table headers and the checksum field of
25// the head table so that it matches the current data.
26bool FixChecksums(Font* font);
27
28// Parses each of the glyphs in the font and writes them again to the glyf
29// table in normalized form, as defined by the StoreGlyph() function. Changes
30// the loca table accordigly.
31bool NormalizeGlyphs(Font* font);
32
33// Performs all of the normalization steps above.
34bool NormalizeFont(Font* font);
35bool NormalizeFontCollection(FontCollection* font_collection);
36
37} // namespace woff2
38
39#endif // WOFF2_NORMALIZE_H_