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

Side by Side Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.h

Issue 1289703003: FX_CMapDwordToDword considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, remove if(). Created 5 years, 4 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
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_font/ttgsubtable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 TT_int32_t GetInt32(FT_Bytes& p) const { 334 TT_int32_t GetInt32(FT_Bytes& p) const {
335 TT_uint32_t ret = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; 335 TT_uint32_t ret = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
336 p += 4; 336 p += 4;
337 return *(TT_int32_t*)&ret; 337 return *(TT_int32_t*)&ret;
338 } 338 }
339 TT_uint32_t GetUInt32(FT_Bytes& p) const { 339 TT_uint32_t GetUInt32(FT_Bytes& p) const {
340 TT_uint32_t ret = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; 340 TT_uint32_t ret = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
341 p += 4; 341 p += 4;
342 return ret; 342 return ret;
343 } 343 }
344 CFX_CMapDWordToDWord m_featureMap; 344 std::map<FX_DWORD, FX_DWORD> m_featureMap;
345 FX_BOOL m_bFeautureMapLoad; 345 FX_BOOL m_bFeautureMapLoad;
346 bool loaded; 346 bool loaded;
347 struct tt_gsub_header header; 347 struct tt_gsub_header header;
348 struct TScriptList ScriptList; 348 struct TScriptList ScriptList;
349 struct TFeatureList FeatureList; 349 struct TFeatureList FeatureList;
350 struct TLookupList LookupList; 350 struct TLookupList LookupList;
351 }; 351 };
352 class CFX_GSUBTable final : public IFX_GSUBTable { 352 class CFX_GSUBTable final : public IFX_GSUBTable {
353 public: 353 public:
354 ~CFX_GSUBTable() override {} 354 ~CFX_GSUBTable() override {}
355 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, 355 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum,
356 FX_DWORD* vglyphnum) override; 356 FX_DWORD* vglyphnum) override;
357 357
358 CFX_CTTGSUBTable m_GsubImp; 358 CFX_CTTGSUBTable m_GsubImp;
359 }; 359 };
360 360
361 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ 361 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_font/ttgsubtable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698