gfx/ots/src/kern.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/ots/src/kern.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#ifndef OTS_KERN_H_
     1.9 +#define OTS_KERN_H_
    1.10 +
    1.11 +#include <vector>
    1.12 +
    1.13 +#include "ots.h"
    1.14 +
    1.15 +namespace ots {
    1.16 +
    1.17 +struct OpenTypeKERNFormat0Pair {
    1.18 +  uint16_t left;
    1.19 +  uint16_t right;
    1.20 +  int16_t value;
    1.21 +};
    1.22 +
    1.23 +struct OpenTypeKERNFormat0 {
    1.24 +  uint16_t version;
    1.25 +  uint16_t coverage;
    1.26 +  uint16_t search_range;
    1.27 +  uint16_t entry_selector;
    1.28 +  uint16_t range_shift;
    1.29 +  std::vector<OpenTypeKERNFormat0Pair> pairs;
    1.30 +};
    1.31 +
    1.32 +// Format 2 is not supported. Since the format is not supported by Windows,
    1.33 +// WebFonts unlikely use it. I've checked thousands of proprietary fonts and
    1.34 +// free fonts, and found no font uses the format.
    1.35 +
    1.36 +struct OpenTypeKERN {
    1.37 +  uint16_t version;
    1.38 +  std::vector<OpenTypeKERNFormat0> subtables;
    1.39 +};
    1.40 +
    1.41 +}  // namespace ots
    1.42 +
    1.43 +#endif  // OTS_KERN_H_

mercurial