gfx/ots/src/cmap.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.

michael@0 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 #ifndef OTS_CMAP_H_
michael@0 6 #define OTS_CMAP_H_
michael@0 7
michael@0 8 #include <vector>
michael@0 9
michael@0 10 #include "ots.h"
michael@0 11
michael@0 12 namespace ots {
michael@0 13
michael@0 14 struct OpenTypeCMAPSubtableRange {
michael@0 15 uint32_t start_range;
michael@0 16 uint32_t end_range;
michael@0 17 uint32_t start_glyph_id;
michael@0 18 };
michael@0 19
michael@0 20 struct OpenTypeCMAPSubtableVSRange {
michael@0 21 uint32_t unicode_value;
michael@0 22 uint8_t additional_count;
michael@0 23 };
michael@0 24
michael@0 25 struct OpenTypeCMAPSubtableVSMapping {
michael@0 26 uint32_t unicode_value;
michael@0 27 uint16_t glyph_id;
michael@0 28 };
michael@0 29
michael@0 30 struct OpenTypeCMAPSubtableVSRecord {
michael@0 31 uint32_t var_selector;
michael@0 32 uint32_t default_offset;
michael@0 33 uint32_t non_default_offset;
michael@0 34 std::vector<OpenTypeCMAPSubtableVSRange> ranges;
michael@0 35 std::vector<OpenTypeCMAPSubtableVSMapping> mappings;
michael@0 36 };
michael@0 37
michael@0 38 struct OpenTypeCMAP {
michael@0 39 OpenTypeCMAP()
michael@0 40 : subtable_0_3_4_data(NULL),
michael@0 41 subtable_0_3_4_length(0),
michael@0 42 subtable_0_5_14_length(0),
michael@0 43 subtable_3_0_4_data(NULL),
michael@0 44 subtable_3_0_4_length(0),
michael@0 45 subtable_3_1_4_data(NULL),
michael@0 46 subtable_3_1_4_length(0) {
michael@0 47 }
michael@0 48
michael@0 49 // Platform 0, Encoding 3, Format 4, Unicode BMP table.
michael@0 50 const uint8_t *subtable_0_3_4_data;
michael@0 51 size_t subtable_0_3_4_length;
michael@0 52
michael@0 53 // Platform 0, Encoding 5, Format 14, Unicode Variation Sequence table.
michael@0 54 size_t subtable_0_5_14_length;
michael@0 55 std::vector<OpenTypeCMAPSubtableVSRecord> subtable_0_5_14;
michael@0 56
michael@0 57 // Platform 3, Encoding 0, Format 4, MS Symbol table.
michael@0 58 const uint8_t *subtable_3_0_4_data;
michael@0 59 size_t subtable_3_0_4_length;
michael@0 60 // Platform 3, Encoding 1, Format 4, MS Unicode BMP table.
michael@0 61 const uint8_t *subtable_3_1_4_data;
michael@0 62 size_t subtable_3_1_4_length;
michael@0 63
michael@0 64 // Platform 3, Encoding 10, Format 12, MS Unicode UCS-4 table.
michael@0 65 std::vector<OpenTypeCMAPSubtableRange> subtable_3_10_12;
michael@0 66 // Platform 3, Encoding 10, Format 13, MS UCS-4 Fallback table.
michael@0 67 std::vector<OpenTypeCMAPSubtableRange> subtable_3_10_13;
michael@0 68 // Platform 1, Encoding 0, Format 0, Mac Roman table.
michael@0 69 std::vector<uint8_t> subtable_1_0_0;
michael@0 70 };
michael@0 71
michael@0 72 } // namespace ots
michael@0 73
michael@0 74 #endif

mercurial