OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2011,2012 Google, Inc. | 2 * Copyright © 2011,2012 Google, Inc. |
3 * | 3 * |
4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
5 * | 5 * |
6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
10 * all copies of this software. | 10 * all copies of this software. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * | 23 * |
24 * Google Author(s): Behdad Esfahbod | 24 * Google Author(s): Behdad Esfahbod |
25 */ | 25 */ |
26 | 26 |
27 #ifndef HB_OT_NAME_TABLE_HH | 27 #ifndef HB_OT_NAME_TABLE_HH |
28 #define HB_OT_NAME_TABLE_HH | 28 #define HB_OT_NAME_TABLE_HH |
29 | 29 |
30 #include "hb-open-type-private.hh" | 30 #include "hb-open-type-private.hh" |
31 | 31 |
32 | 32 |
| 33 namespace OT { |
| 34 |
33 | 35 |
34 /* | 36 /* |
35 * name -- The Naming Table | 37 * name -- The Naming Table |
36 */ | 38 */ |
37 | 39 |
38 #define HB_OT_TAG_name HB_TAG('n','a','m','e') | 40 #define HB_OT_TAG_name HB_TAG('n','a','m','e') |
39 | 41 |
40 | 42 |
41 struct NameRecord | 43 struct NameRecord |
42 { | 44 { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 109 |
108 inline bool sanitize (hb_sanitize_context_t *c) { | 110 inline bool sanitize (hb_sanitize_context_t *c) { |
109 TRACE_SANITIZE (); | 111 TRACE_SANITIZE (); |
110 return TRACE_RETURN (c->check_struct (this) && | 112 return TRACE_RETURN (c->check_struct (this) && |
111 likely (format == 0 || format == 1) && | 113 likely (format == 0 || format == 1) && |
112 c->check_array (nameRecord, nameRecord[0].static_size,
count) && | 114 c->check_array (nameRecord, nameRecord[0].static_size,
count) && |
113 sanitize_records (c)); | 115 sanitize_records (c)); |
114 } | 116 } |
115 | 117 |
116 /* We only implement format 0 for now. */ | 118 /* We only implement format 0 for now. */ |
117 private: | 119 protected: |
118 USHORT format; /* Format selector (=0/1). */ | 120 USHORT format; /* Format selector (=0/1). */ |
119 USHORT count; /* Number of name records. */ | 121 USHORT count; /* Number of name records. */ |
120 Offset stringOffset; /* Offset to start of string storage (fr
om start of table). */ | 122 Offset stringOffset; /* Offset to start of string storage (fr
om start of table). */ |
121 NameRecord nameRecord[VAR]; /* The name records where count is the n
umber of records. */ | 123 NameRecord nameRecord[VAR]; /* The name records where count is the n
umber of records. */ |
122 public: | 124 public: |
123 DEFINE_SIZE_ARRAY (6, nameRecord); | 125 DEFINE_SIZE_ARRAY (6, nameRecord); |
124 }; | 126 }; |
125 | 127 |
126 | 128 |
| 129 } // namespace OT |
| 130 |
127 | 131 |
128 #endif /* HB_OT_NAME_TABLE_HH */ | 132 #endif /* HB_OT_NAME_TABLE_HH */ |
OLD | NEW |