michael@0: // Copyright (c) 2009 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef OTS_CFF_H_ michael@0: #define OTS_CFF_H_ michael@0: michael@0: #include "ots.h" michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: namespace ots { michael@0: michael@0: struct CFFIndex { michael@0: CFFIndex() michael@0: : count(0), off_size(0), offset_to_next(0) {} michael@0: uint16_t count; michael@0: uint8_t off_size; michael@0: std::vector offsets; michael@0: uint32_t offset_to_next; michael@0: }; michael@0: michael@0: struct OpenTypeCFF { michael@0: const uint8_t *data; michael@0: size_t length; michael@0: // Name INDEX. This name is used in name.cc as a postscript font name. michael@0: std::string name; michael@0: michael@0: // The number of fonts the file has. michael@0: size_t font_dict_length; michael@0: // A map from glyph # to font #. michael@0: std::map fd_select; michael@0: michael@0: // A list of char strings. michael@0: std::vector char_strings_array; michael@0: // A list of Local Subrs associated with FDArrays. Can be empty. michael@0: std::vector local_subrs_per_font; michael@0: // A Local Subrs associated with Top DICT. Can be NULL. michael@0: CFFIndex *local_subrs; michael@0: }; michael@0: michael@0: } // namespace ots michael@0: michael@0: #endif // OTS_CFF_H_