gfx/ots/src/cff.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
     2 // Use of this source code is governed by a BSD-style license that can be
     3 // found in the LICENSE file.
     5 #ifndef OTS_CFF_H_
     6 #define OTS_CFF_H_
     8 #include "ots.h"
    10 #include <map>
    11 #include <string>
    12 #include <vector>
    14 namespace ots {
    16 struct CFFIndex {
    17   CFFIndex()
    18       : count(0), off_size(0), offset_to_next(0) {}
    19   uint16_t count;
    20   uint8_t off_size;
    21   std::vector<uint32_t> offsets;
    22   uint32_t offset_to_next;
    23 };
    25 struct OpenTypeCFF {
    26   const uint8_t *data;
    27   size_t length;
    28   // Name INDEX. This name is used in name.cc as a postscript font name.
    29   std::string name;
    31   // The number of fonts the file has.
    32   size_t font_dict_length;
    33   // A map from glyph # to font #.
    34   std::map<uint16_t, uint8_t> fd_select;
    36   // A list of char strings.
    37   std::vector<CFFIndex *> char_strings_array;
    38   // A list of Local Subrs associated with FDArrays. Can be empty.
    39   std::vector<CFFIndex *> local_subrs_per_font;
    40   // A Local Subrs associated with Top DICT. Can be NULL.
    41   CFFIndex *local_subrs;
    42 };
    44 }  // namespace ots
    46 #endif  // OTS_CFF_H_

mercurial