chromium/third_party/woff2/src/woff2_common.h

/* Copyright 2014 Google Inc. All Rights Reserved.

   Distributed under MIT license.
   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/

/* Common definition for WOFF2 encoding/decoding */

#ifndef WOFF2_WOFF2_COMMON_H_
#define WOFF2_WOFF2_COMMON_H_

#include <stddef.h>
#include <inttypes.h>

#include <string>

namespace woff2 {

static const uint32_t kWoff2Signature =;  // "wOF2"

// Leave the first byte open to store flag_byte
const unsigned int kWoff2FlagsTransform =;

// TrueType Collection ID string: 'ttcf'
static const uint32_t kTtcFontFlavor =;

static const size_t kSfntHeaderSize =;
static const size_t kSfntEntrySize =;

struct Point {};

struct Table {};


// Size of the collection header. 0 if version indicates this isn't a
// collection. Ref http://www.microsoft.com/typography/otspec/otff.htm,
// True Type Collections
size_t CollectionHeaderSize(uint32_t header_version, uint32_t num_fonts);

// Compute checksum over size bytes of buf
uint32_t ComputeULongSum(const uint8_t* buf, size_t size);

} // namespace woff2

#endif  // WOFF2_WOFF2_COMMON_H_