Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-open-file-private.hh

Issue 396393005: Roll HarfBuzz to 0.9.32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for include order presubmit issue Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright © 2007,2008,2009 Red Hat, Inc. 2 * Copyright © 2007,2008,2009 Red Hat, Inc.
3 * Copyright © 2012 Google, Inc. 3 * Copyright © 2012 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 public: 104 public:
105 inline bool sanitize (hb_sanitize_context_t *c) { 105 inline bool sanitize (hb_sanitize_context_t *c) {
106 TRACE_SANITIZE (this); 106 TRACE_SANITIZE (this);
107 return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, Table Record::static_size, numTables)); 107 return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, Table Record::static_size, numTables));
108 } 108 }
109 109
110 protected: 110 protected:
111 Tag sfnt_version; /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */ 111 Tag sfnt_version; /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */
112 USHORT numTables; /* Number of tables. */ 112 USHORT numTables; /* Number of tables. */
113 USHORT» searchRange;» /* (Maximum power of 2 <= numTables) x 16 */ 113 USHORT» searchRangeZ;» /* (Maximum power of 2 <= numTables) x 16 */
114 USHORT» entrySelector;» /* Log2(maximum power of 2 <= numTables). */ 114 USHORT» entrySelectorZ;»/* Log2(maximum power of 2 <= numTables). */
115 USHORT» rangeShift;» /* NumTables x 16-searchRange. */ 115 USHORT» rangeShiftZ;» /* NumTables x 16-searchRange. */
116 TableRecord tables[VAR]; /* TableRecord entries. numTables items */ 116 TableRecord tables[VAR]; /* TableRecord entries. numTables items */
117 public: 117 public:
118 DEFINE_SIZE_ARRAY (12, tables); 118 DEFINE_SIZE_ARRAY (12, tables);
119 } OpenTypeFontFace; 119 } OpenTypeFontFace;
120 120
121 121
122 /* 122 /*
123 * TrueType Collections 123 * TrueType Collections
124 */ 124 */
125 125
126 struct TTCHeaderVersion1 126 struct TTCHeaderVersion1
127 { 127 {
128 friend struct TTCHeader; 128 friend struct TTCHeader;
129 129
130 inline unsigned int get_face_count (void) const { return table.len; } 130 inline unsigned int get_face_count (void) const { return table.len; }
131 inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+t able[i]; } 131 inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+t able[i]; }
132 132
133 inline bool sanitize (hb_sanitize_context_t *c) { 133 inline bool sanitize (hb_sanitize_context_t *c) {
134 TRACE_SANITIZE (this); 134 TRACE_SANITIZE (this);
135 return TRACE_RETURN (table.sanitize (c, this)); 135 return TRACE_RETURN (table.sanitize (c, this));
136 } 136 }
137 137
138 protected: 138 protected:
139 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ 139 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
140 FixedVersion version; /* Version of the TTC Header (1.0), 140 FixedVersion version; /* Version of the TTC Header (1.0),
141 » » » » * 0x00010000 */ 141 » » » » * 0x00010000u */
142 LongOffsetLongArrayOf<OffsetTable> 142 ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG>
143 table; /* Array of offsets to the OffsetTable for each font 143 table; /* Array of offsets to the OffsetTable for each font
144 * from the beginning of the file */ 144 * from the beginning of the file */
145 public: 145 public:
146 DEFINE_SIZE_ARRAY (12, table); 146 DEFINE_SIZE_ARRAY (12, table);
147 }; 147 };
148 148
149 struct TTCHeader 149 struct TTCHeader
150 { 150 {
151 friend struct OpenTypeFontFile; 151 friend struct OpenTypeFontFile;
152 152
(...skipping 24 matching lines...) Expand all
177 case 1: return TRACE_RETURN (u.version1.sanitize (c)); 177 case 1: return TRACE_RETURN (u.version1.sanitize (c));
178 default:return TRACE_RETURN (true); 178 default:return TRACE_RETURN (true);
179 } 179 }
180 } 180 }
181 181
182 protected: 182 protected:
183 union { 183 union {
184 struct { 184 struct {
185 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ 185 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
186 FixedVersion version; /* Version of the TTC Header (1.0 or 2.0), 186 FixedVersion version; /* Version of the TTC Header (1.0 or 2.0),
187 » » » » * 0x00010000 or 0x00020000 */ 187 » » » » * 0x00010000u or 0x00020000u */
188 } header; 188 } header;
189 TTCHeaderVersion1 version1; 189 TTCHeaderVersion1 version1;
190 } u; 190 } u;
191 }; 191 };
192 192
193 193
194 /* 194 /*
195 * OpenType Font File 195 * OpenType Font File
196 */ 196 */
197 197
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } u; 252 } u;
253 public: 253 public:
254 DEFINE_SIZE_UNION (4, tag); 254 DEFINE_SIZE_UNION (4, tag);
255 }; 255 };
256 256
257 257
258 } /* namespace OT */ 258 } /* namespace OT */
259 259
260 260
261 #endif /* HB_OPEN_FILE_PRIVATE_HH */ 261 #endif /* HB_OPEN_FILE_PRIVATE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-icu.cc ('k') | third_party/harfbuzz-ng/src/hb-open-type-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698