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

Side by Side Diff: core/src/fxge/ge/text_int.h

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: sigh 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
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_FXGE_GE_TEXT_INT_H_ 7 #ifndef CORE_SRC_FXGE_GE_TEXT_INT_H_
8 #define CORE_SRC_FXGE_GE_TEXT_INT_H_ 8 #define CORE_SRC_FXGE_GE_TEXT_INT_H_
9 9
10 struct _CFX_UniqueKeyGen { 10 struct _CFX_UniqueKeyGen {
11 void» » Generate(int count, ...); 11 void Generate(int count, ...);
12 FX_CHAR» » m_Key[128]; 12 FX_CHAR m_Key[128];
13 int»» » m_KeyLen; 13 int m_KeyLen;
14 }; 14 };
15 class CFX_SizeGlyphCache 15 class CFX_SizeGlyphCache {
16 { 16 public:
17 public: 17 CFX_SizeGlyphCache() { m_GlyphMap.InitHashTable(253); }
18 CFX_SizeGlyphCache() 18 ~CFX_SizeGlyphCache();
19 { 19 CFX_MapPtrToPtr m_GlyphMap;
20 m_GlyphMap.InitHashTable(253);
21 }
22 ~CFX_SizeGlyphCache();
23 CFX_MapPtrToPtr» » » m_GlyphMap;
24 }; 20 };
25 class CTTFontDesc 21 class CTTFontDesc {
26 { 22 public:
27 public: 23 CTTFontDesc() {
28 CTTFontDesc() 24 m_Type = 0;
29 { 25 m_pFontData = NULL;
30 m_Type = 0; 26 m_RefCount = 0;
31 m_pFontData = NULL; 27 }
32 m_RefCount = 0; 28 ~CTTFontDesc();
33 } 29 FX_BOOL ReleaseFace(FXFT_Face face);
34 ~CTTFontDesc(); 30 int m_Type;
35 FX_BOOL» » » ReleaseFace(FXFT_Face face); 31 union {
36 int»» » » m_Type; 32 struct {
37 union { 33 FX_BOOL m_bItalic;
38 struct { 34 FX_BOOL m_bBold;
39 FX_BOOL» » m_bItalic; 35 FXFT_Face m_pFace;
40 FX_BOOL» » m_bBold; 36 } m_SingleFace;
41 FXFT_Face» m_pFace; 37 struct {
42 } m_SingleFace; 38 FXFT_Face m_pFaces[16];
43 struct { 39 } m_TTCFace;
44 FXFT_Face» m_pFaces[16]; 40 };
45 } m_TTCFace; 41 uint8_t* m_pFontData;
46 }; 42 int m_RefCount;
47 uint8_t*» » m_pFontData;
48 int»» » » m_RefCount;
49 }; 43 };
50 class CFX_UnicodeEncoding : public IFX_FontEncoding 44 class CFX_UnicodeEncoding : public IFX_FontEncoding {
51 { 45 public:
52 public: 46 CFX_UnicodeEncoding(CFX_Font* pFont);
53 CFX_UnicodeEncoding(CFX_Font* pFont); 47 virtual FX_DWORD GlyphFromCharCodeEx(FX_DWORD charcode,
54 virtual FX_DWORD» » GlyphFromCharCodeEx(FX_DWORD charcode, int encod ing = ENCODING_UNICODE); 48 int encoding = ENCODING_UNICODE);
55 private: 49
56 CFX_Font*» » » m_pFont; 50 private:
57 virtual FX_DWORD» » GlyphFromCharCode(FX_DWORD charcode); 51 CFX_Font* m_pFont;
58 virtual CFX_WideString» UnicodeFromCharCode(FX_DWORD charcode) const 52 virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode);
59 { 53 virtual CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const {
60 return CFX_WideString((FX_WCHAR)charcode); 54 return CFX_WideString((FX_WCHAR)charcode);
61 } 55 }
62 virtual FX_DWORD» » CharCodeFromUnicode(FX_WCHAR Unicode) const 56 virtual FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const {
63 { 57 return Unicode;
64 return Unicode; 58 }
65 } 59 virtual FX_BOOL IsUnicodeCompatible() const { return TRUE; }
66 virtual FX_BOOL» » » IsUnicodeCompatible() const
67 {
68 return TRUE;
69 }
70 }; 60 };
71 #define CHARSET_FLAG_ANSI» » 1 61 #define CHARSET_FLAG_ANSI 1
72 #define CHARSET_FLAG_SYMBOL» » 2 62 #define CHARSET_FLAG_SYMBOL 2
73 #define CHARSET_FLAG_SHIFTJIS» 4 63 #define CHARSET_FLAG_SHIFTJIS 4
74 #define CHARSET_FLAG_BIG5» » 8 64 #define CHARSET_FLAG_BIG5 8
75 #define CHARSET_FLAG_GB»» » 16 65 #define CHARSET_FLAG_GB 16
76 #define CHARSET_FLAG_KOREAN» » 32 66 #define CHARSET_FLAG_KOREAN 32
77 class CFontFaceInfo 67 class CFontFaceInfo {
78 { 68 public:
79 public: 69 CFX_ByteString m_FilePath;
80 CFX_ByteString» » m_FilePath; 70 CFX_ByteString m_FaceName;
81 CFX_ByteString» » m_FaceName; 71 FX_DWORD m_Styles;
82 FX_DWORD» » » m_Styles; 72 FX_DWORD m_Charsets;
83 FX_DWORD» » » m_Charsets; 73 FX_DWORD m_FontOffset;
84 FX_DWORD» » » m_FontOffset; 74 FX_DWORD m_FileSize;
85 FX_DWORD» » » m_FileSize; 75 CFX_ByteString m_FontTables;
86 CFX_ByteString» » m_FontTables;
87 }; 76 };
88 class CFontFileFaceInfo 77 class CFontFileFaceInfo {
89 { 78 public:
90 public: 79 CFontFileFaceInfo();
91 CFontFileFaceInfo(); 80 ~CFontFileFaceInfo();
92 ~CFontFileFaceInfo(); 81 IFX_FileStream* m_pFile;
93 IFX_FileStream*» » m_pFile; 82 FXFT_Face m_Face;
94 FXFT_Face» » » m_Face; 83 CFX_ByteString m_FaceName;
95 CFX_ByteString» » m_FaceName; 84 FX_DWORD m_Charsets;
96 FX_DWORD» » » m_Charsets; 85 FX_DWORD m_FileSize;
97 FX_DWORD» » » m_FileSize; 86 FX_DWORD m_FontOffset;
98 FX_DWORD» » » m_FontOffset; 87 int m_Weight;
99 int»» » » » m_Weight; 88 FX_BOOL m_bItalic;
100 FX_BOOL» » » » m_bItalic; 89 int m_PitchFamily;
101 int»» » » » m_PitchFamily; 90 CFX_ByteString m_FontTables;
102 CFX_ByteString» » m_FontTables;
103 }; 91 };
104 92
105 #endif // CORE_SRC_FXGE_GE_TEXT_INT_H_ 93 #endif // CORE_SRC_FXGE_GE_TEXT_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698