OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
9 | 9 |
10 #include "../../../include/fxge/fx_freetype.h" | 10 #include "../../../include/fxge/fx_freetype.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 virtual ~TCoverageFormatBase() {} | 159 virtual ~TCoverageFormatBase() {} |
160 | 160 |
161 private: | 161 private: |
162 TCoverageFormatBase(const TCoverageFormatBase&); | 162 TCoverageFormatBase(const TCoverageFormatBase&); |
163 TCoverageFormatBase& operator=(const TCoverageFormatBase&); | 163 TCoverageFormatBase& operator=(const TCoverageFormatBase&); |
164 }; | 164 }; |
165 struct TCoverageFormat1 : public TCoverageFormatBase { | 165 struct TCoverageFormat1 : public TCoverageFormatBase { |
166 TT_uint16_t GlyphCount; | 166 TT_uint16_t GlyphCount; |
167 TT_uint16_t* GlyphArray; | 167 TT_uint16_t* GlyphArray; |
168 TCoverageFormat1() : GlyphCount(0), GlyphArray(NULL) { CoverageFormat = 1; } | 168 TCoverageFormat1() : GlyphCount(0), GlyphArray(NULL) { CoverageFormat = 1; } |
169 ~TCoverageFormat1() { | 169 ~TCoverageFormat1() override { |
170 if (GlyphArray) { | 170 if (GlyphArray) { |
171 delete[] GlyphArray; | 171 delete[] GlyphArray; |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 private: | 175 private: |
176 TCoverageFormat1(const TCoverageFormat1&); | 176 TCoverageFormat1(const TCoverageFormat1&); |
177 TCoverageFormat1& operator=(const TCoverageFormat1&); | 177 TCoverageFormat1& operator=(const TCoverageFormat1&); |
178 }; | 178 }; |
179 struct TRangeRecord { | 179 struct TRangeRecord { |
180 TT_uint16_t Start; | 180 TT_uint16_t Start; |
181 TT_uint16_t End; | 181 TT_uint16_t End; |
182 TT_uint16_t StartCoverageIndex; | 182 TT_uint16_t StartCoverageIndex; |
183 TRangeRecord() : Start(0), End(0), StartCoverageIndex(0) {} | 183 TRangeRecord() : Start(0), End(0), StartCoverageIndex(0) {} |
184 friend bool operator>(const TRangeRecord& r1, const TRangeRecord& r2) { | 184 friend bool operator>(const TRangeRecord& r1, const TRangeRecord& r2) { |
185 return r1.Start > r2.Start; | 185 return r1.Start > r2.Start; |
186 } | 186 } |
187 | 187 |
188 private: | 188 private: |
189 TRangeRecord(const TRangeRecord&); | 189 TRangeRecord(const TRangeRecord&); |
190 }; | 190 }; |
191 struct TCoverageFormat2 : public TCoverageFormatBase { | 191 struct TCoverageFormat2 : public TCoverageFormatBase { |
192 TT_uint16_t RangeCount; | 192 TT_uint16_t RangeCount; |
193 struct TRangeRecord* RangeRecord; | 193 struct TRangeRecord* RangeRecord; |
194 TCoverageFormat2() : RangeCount(0), RangeRecord(NULL) { | 194 TCoverageFormat2() : RangeCount(0), RangeRecord(NULL) { |
195 CoverageFormat = 2; | 195 CoverageFormat = 2; |
196 } | 196 } |
197 ~TCoverageFormat2() { | 197 ~TCoverageFormat2() override { |
198 if (RangeRecord) { | 198 if (RangeRecord) { |
199 delete[] RangeRecord; | 199 delete[] RangeRecord; |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 private: | 203 private: |
204 TCoverageFormat2(const TCoverageFormat2&); | 204 TCoverageFormat2(const TCoverageFormat2&); |
205 TCoverageFormat2& operator=(const TCoverageFormat2&); | 205 TCoverageFormat2& operator=(const TCoverageFormat2&); |
206 }; | 206 }; |
207 struct TClassDefFormatBase { | 207 struct TClassDefFormatBase { |
208 TT_uint16_t ClassFormat; | 208 TT_uint16_t ClassFormat; |
209 TClassDefFormatBase() : ClassFormat(0) {} | 209 TClassDefFormatBase() : ClassFormat(0) {} |
210 virtual ~TClassDefFormatBase() {} | 210 virtual ~TClassDefFormatBase() {} |
211 | 211 |
212 private: | 212 private: |
213 TClassDefFormatBase(const TClassDefFormatBase&); | 213 TClassDefFormatBase(const TClassDefFormatBase&); |
214 TClassDefFormatBase& operator=(const TClassDefFormatBase&); | 214 TClassDefFormatBase& operator=(const TClassDefFormatBase&); |
215 }; | 215 }; |
216 struct TClassDefFormat1 : public TClassDefFormatBase { | 216 struct TClassDefFormat1 : public TClassDefFormatBase { |
217 TT_uint16_t StartGlyph; | 217 TT_uint16_t StartGlyph; |
218 TT_uint16_t GlyphCount; | 218 TT_uint16_t GlyphCount; |
219 TT_uint16_t* ClassValueArray; | 219 TT_uint16_t* ClassValueArray; |
220 TClassDefFormat1() : StartGlyph(0), GlyphCount(0), ClassValueArray(NULL) { | 220 TClassDefFormat1() : StartGlyph(0), GlyphCount(0), ClassValueArray(NULL) { |
221 ClassFormat = 1; | 221 ClassFormat = 1; |
222 } | 222 } |
223 ~TClassDefFormat1() { | 223 ~TClassDefFormat1() override { |
224 if (ClassValueArray) { | 224 if (ClassValueArray) { |
225 delete[] ClassValueArray; | 225 delete[] ClassValueArray; |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 private: | 229 private: |
230 TClassDefFormat1(const TClassDefFormat1&); | 230 TClassDefFormat1(const TClassDefFormat1&); |
231 TClassDefFormat1& operator=(const TClassDefFormat1&); | 231 TClassDefFormat1& operator=(const TClassDefFormat1&); |
232 }; | 232 }; |
233 struct TClassRangeRecord { | 233 struct TClassRangeRecord { |
234 TT_uint16_t Start; | 234 TT_uint16_t Start; |
235 TT_uint16_t End; | 235 TT_uint16_t End; |
236 TT_uint16_t Class; | 236 TT_uint16_t Class; |
237 TClassRangeRecord() : Start(0), End(0), Class(0) {} | 237 TClassRangeRecord() : Start(0), End(0), Class(0) {} |
238 | 238 |
239 private: | 239 private: |
240 TClassRangeRecord(const TClassRangeRecord&); | 240 TClassRangeRecord(const TClassRangeRecord&); |
241 TClassRangeRecord& operator=(const TClassRangeRecord&); | 241 TClassRangeRecord& operator=(const TClassRangeRecord&); |
242 }; | 242 }; |
243 struct TClassDefFormat2 : public TClassDefFormatBase { | 243 struct TClassDefFormat2 : public TClassDefFormatBase { |
244 TT_uint16_t ClassRangeCount; | 244 TT_uint16_t ClassRangeCount; |
245 struct TClassRangeRecord* ClassRangeRecord; | 245 struct TClassRangeRecord* ClassRangeRecord; |
246 TClassDefFormat2() : ClassRangeCount(0), ClassRangeRecord(NULL) { | 246 TClassDefFormat2() : ClassRangeCount(0), ClassRangeRecord(NULL) { |
247 ClassFormat = 2; | 247 ClassFormat = 2; |
248 } | 248 } |
249 ~TClassDefFormat2() { | 249 ~TClassDefFormat2() override { |
250 if (ClassRangeRecord) { | 250 if (ClassRangeRecord) { |
251 delete[] ClassRangeRecord; | 251 delete[] ClassRangeRecord; |
252 } | 252 } |
253 } | 253 } |
254 | 254 |
255 private: | 255 private: |
256 TClassDefFormat2(const TClassDefFormat2&); | 256 TClassDefFormat2(const TClassDefFormat2&); |
257 TClassDefFormat2& operator=(const TClassDefFormat2&); | 257 TClassDefFormat2& operator=(const TClassDefFormat2&); |
258 }; | 258 }; |
259 struct TDevice { | 259 struct TDevice { |
(...skipping 12 matching lines...) Expand all Loading... |
272 virtual ~TSubTableBase() {} | 272 virtual ~TSubTableBase() {} |
273 | 273 |
274 private: | 274 private: |
275 TSubTableBase(const TSubTableBase&); | 275 TSubTableBase(const TSubTableBase&); |
276 TSubTableBase& operator=(const TSubTableBase&); | 276 TSubTableBase& operator=(const TSubTableBase&); |
277 }; | 277 }; |
278 struct TSingleSubstFormat1 : public TSubTableBase { | 278 struct TSingleSubstFormat1 : public TSubTableBase { |
279 TCoverageFormatBase* Coverage; | 279 TCoverageFormatBase* Coverage; |
280 TT_int16_t DeltaGlyphID; | 280 TT_int16_t DeltaGlyphID; |
281 TSingleSubstFormat1() : Coverage(NULL), DeltaGlyphID(0) { SubstFormat = 1; } | 281 TSingleSubstFormat1() : Coverage(NULL), DeltaGlyphID(0) { SubstFormat = 1; } |
282 ~TSingleSubstFormat1() { delete Coverage; } | 282 ~TSingleSubstFormat1() override { delete Coverage; } |
283 | 283 |
284 private: | 284 private: |
285 TSingleSubstFormat1(const TSingleSubstFormat1&); | 285 TSingleSubstFormat1(const TSingleSubstFormat1&); |
286 TSingleSubstFormat1& operator=(const TSingleSubstFormat1&); | 286 TSingleSubstFormat1& operator=(const TSingleSubstFormat1&); |
287 }; | 287 }; |
288 struct TSingleSubstFormat2 : public TSubTableBase { | 288 struct TSingleSubstFormat2 : public TSubTableBase { |
289 TCoverageFormatBase* Coverage; | 289 TCoverageFormatBase* Coverage; |
290 TT_uint16_t GlyphCount; | 290 TT_uint16_t GlyphCount; |
291 TT_uint16_t* Substitute; | 291 TT_uint16_t* Substitute; |
292 TSingleSubstFormat2() : Coverage(NULL), GlyphCount(0), Substitute(NULL) { | 292 TSingleSubstFormat2() : Coverage(NULL), GlyphCount(0), Substitute(NULL) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 class CFX_GSUBTable final : public IFX_GSUBTable { | 392 class CFX_GSUBTable final : public IFX_GSUBTable { |
393 public: | 393 public: |
394 ~CFX_GSUBTable() override {} | 394 ~CFX_GSUBTable() override {} |
395 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, | 395 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, |
396 FX_DWORD* vglyphnum) override; | 396 FX_DWORD* vglyphnum) override; |
397 | 397 |
398 CFX_CTTGSUBTable m_GsubImp; | 398 CFX_CTTGSUBTable m_GsubImp; |
399 }; | 399 }; |
400 | 400 |
401 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 401 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
OLD | NEW |