blob: d516cd4eb2d9fa92b1b16a67624cf01a08de141d [file] [log] [blame]
yusukes@chromium.orgd257d182009-11-04 04:56:32 +00001// 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.
4
5#ifndef OTS_CMAP_H_
6#define OTS_CMAP_H_
7
8#include <vector>
9
10#include "ots.h"
11
12namespace ots {
13
14struct OpenTypeCMAPSubtableRange {
15 uint32_t start_range;
16 uint32_t end_range;
17 uint32_t start_glyph_id;
18};
19
20struct OpenTypeCMAP {
21 OpenTypeCMAP()
yusukes@chromium.orga4099a32009-11-12 01:43:51 +000022 : subtable_3_0_4_data(NULL),
23 subtable_3_0_4_length(0),
24 subtable_3_1_4_data(NULL),
25 subtable_3_1_4_length(0) {
yusukes@chromium.orgd257d182009-11-04 04:56:32 +000026 }
27
yusukes@chromium.orga4099a32009-11-12 01:43:51 +000028 // Platform 3, Encoding 0, Format 4, MS Symbol table.
29 const uint8_t *subtable_3_0_4_data;
30 size_t subtable_3_0_4_length;
31 // Platform 3, Encoding 1, Format 4, MS Unicode BMP table.
32 const uint8_t *subtable_3_1_4_data;
33 size_t subtable_3_1_4_length;
34
35 // Platform 3, Encoding 10, Format 12, MS Unicode UCS-4 table.
36 std::vector<OpenTypeCMAPSubtableRange> subtable_3_10_12;
37 // Platform 3, Encoding 10, Format 13, MS UCS-4 Fallback table.
38 std::vector<OpenTypeCMAPSubtableRange> subtable_3_10_13;
39 // Platform 1, Encoding 0, Format 0, Mac Roman table.
40 std::vector<uint8_t> subtable_1_0_0;
yusukes@chromium.orgd257d182009-11-04 04:56:32 +000041};
42
43} // namespace ots
44
45#endif