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

Side by Side Diff: core/include/fxcrt/fx_ucd.h

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 2015-11-24 version Created 5 years 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/include/fxcrt/fx_stream.h ('k') | core/include/fxge/fx_font.h » ('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_INCLUDE_FXCRT_FX_UCD_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_UCD_H_
8 #define CORE_INCLUDE_FXCRT_FX_UCD_H_ 8 #define CORE_INCLUDE_FXCRT_FX_UCD_H_
9 9
10 #ifndef PDF_ENABLE_XFA
10 #include "fx_system.h" 11 #include "fx_system.h"
12 #else
13 #include "fx_basic.h"
14 #endif
11 15
16 #ifdef PDF_ENABLE_XFA
17 enum FX_CHARBREAKPROP {
18 FX_CBP_OP = 0,
19 FX_CBP_CL = 1,
20 FX_CBP_QU = 2,
21 FX_CBP_GL = 3,
22 FX_CBP_NS = 4,
23 FX_CBP_EX = 5,
24 FX_CBP_SY = 6,
25 FX_CBP_IS = 7,
26 FX_CBP_PR = 8,
27 FX_CBP_PO = 9,
28 FX_CBP_NU = 10,
29 FX_CBP_AL = 11,
30 FX_CBP_ID = 12,
31 FX_CBP_IN = 13,
32 FX_CBP_HY = 14,
33 FX_CBP_BA = 15,
34 FX_CBP_BB = 16,
35 FX_CBP_B2 = 17,
36 FX_CBP_ZW = 18,
37 FX_CBP_CM = 19,
38 FX_CBP_WJ = 20,
39 FX_CBP_H2 = 21,
40 FX_CBP_H3 = 22,
41 FX_CBP_JL = 23,
42 FX_CBP_JV = 24,
43 FX_CBP_JT = 25,
44
45 FX_CBP_BK = 26,
46 FX_CBP_CR = 27,
47 FX_CBP_LF = 28,
48 FX_CBP_NL = 29,
49 FX_CBP_SA = 30,
50 FX_CBP_SG = 31,
51 FX_CBP_CB = 32,
52 FX_CBP_XX = 33,
53 FX_CBP_AI = 34,
54 FX_CBP_SP = 35,
55 FX_CBP_TB = 37,
56 FX_CBP_NONE = 36,
57 };
58 #endif
12 #define FX_BIDICLASSBITS 6 59 #define FX_BIDICLASSBITS 6
13 #define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS) 60 #define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS)
14 enum FX_BIDICLASS { 61 enum FX_BIDICLASS {
15 FX_BIDICLASS_ON = 0, // Other Neutral 62 FX_BIDICLASS_ON = 0, // Other Neutral
16 FX_BIDICLASS_L = 1, // Left Letter 63 FX_BIDICLASS_L = 1, // Left Letter
17 FX_BIDICLASS_R = 2, // Right Letter 64 FX_BIDICLASS_R = 2, // Right Letter
18 FX_BIDICLASS_AN = 3, // Arabic Number 65 FX_BIDICLASS_AN = 3, // Arabic Number
19 FX_BIDICLASS_EN = 4, // European Number 66 FX_BIDICLASS_EN = 4, // European Number
20 FX_BIDICLASS_AL = 5, // Arabic Letter 67 FX_BIDICLASS_AL = 5, // Arabic Letter
21 FX_BIDICLASS_NSM = 6, // Non-spacing Mark 68 FX_BIDICLASS_NSM = 6, // Non-spacing Mark
(...skipping 14 matching lines...) Expand all
36 83
37 extern const FX_DWORD kTextLayoutCodeProperties[]; 84 extern const FX_DWORD kTextLayoutCodeProperties[];
38 extern const size_t kTextLayoutCodePropertiesSize; 85 extern const size_t kTextLayoutCodePropertiesSize;
39 86
40 extern const FX_WCHAR kFXTextLayoutVerticalMirror[]; 87 extern const FX_WCHAR kFXTextLayoutVerticalMirror[];
41 extern const size_t kFXTextLayoutVerticalMirrorSize; 88 extern const size_t kFXTextLayoutVerticalMirrorSize;
42 89
43 extern const FX_WCHAR kFXTextLayoutBidiMirror[]; 90 extern const FX_WCHAR kFXTextLayoutBidiMirror[];
44 extern const size_t kFXTextLayoutBidiMirrorSize; 91 extern const size_t kFXTextLayoutBidiMirrorSize;
45 92
93 #ifdef PDF_ENABLE_XFA
94 #define FX_CHARTYPEBITS 11
95 #define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS)
96 enum FX_CHARTYPE {
97 FX_CHARTYPE_Unknown = 0,
98 FX_CHARTYPE_Tab = (1 << FX_CHARTYPEBITS),
99 FX_CHARTYPE_Space = (2 << FX_CHARTYPEBITS),
100 FX_CHARTYPE_Control = (3 << FX_CHARTYPEBITS),
101 FX_CHARTYPE_Combination = (4 << FX_CHARTYPEBITS),
102 FX_CHARTYPE_Numeric = (5 << FX_CHARTYPEBITS),
103 FX_CHARTYPE_Normal = (6 << FX_CHARTYPEBITS),
104 FX_CHARTYPE_ArabicAlef = (7 << FX_CHARTYPEBITS),
105 FX_CHARTYPE_ArabicSpecial = (8 << FX_CHARTYPEBITS),
106 FX_CHARTYPE_ArabicDistortion = (9 << FX_CHARTYPEBITS),
107 FX_CHARTYPE_ArabicNormal = (10 << FX_CHARTYPEBITS),
108 FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS),
109 FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS),
110 };
111
112 #endif
46 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch); 113 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
114 #ifdef PDF_ENABLE_XFA
115 FX_BOOL FX_IsCtrlCode(FX_WCHAR ch);
116 #endif
47 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical); 117 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
118 #ifdef PDF_ENABLE_XFA
119 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch,
120 FX_DWORD dwProps,
121 FX_BOOL bRTL,
122 FX_BOOL bVertical);
123 class CFX_Char {
124 public:
125 CFX_Char()
126 : m_wCharCode(0),
127 m_nBreakType(0),
128 m_nRotation(0),
129 m_dwCharProps(0),
130 m_dwCharStyles(0),
131 m_iCharWidth(0),
132 m_iHorizontalScale(100),
133 m_iVertialScale(100) {}
134 CFX_Char(FX_WORD wCharCode, FX_DWORD dwCharProps)
135 : m_wCharCode(wCharCode),
136 m_nBreakType(0),
137 m_nRotation(0),
138 m_dwCharProps(dwCharProps),
139 m_dwCharStyles(0),
140 m_iCharWidth(0),
141 m_iHorizontalScale(100),
142 m_iVertialScale(100) {}
143 FX_DWORD GetCharType() const { return m_dwCharProps & FX_CHARTYPEBITSMASK; }
144 FX_WORD m_wCharCode;
145 uint8_t m_nBreakType;
146 int8_t m_nRotation;
147 FX_DWORD m_dwCharProps;
148 FX_DWORD m_dwCharStyles;
149 int32_t m_iCharWidth;
150 int32_t m_iHorizontalScale;
151 int32_t m_iVertialScale;
152 };
153 typedef CFX_ArrayTemplate<CFX_Char> CFX_CharArray;
154 class CFX_TxtChar : public CFX_Char {
155 public:
156 CFX_TxtChar()
157 : CFX_Char(),
158 m_dwStatus(0),
159 m_iBidiClass(0),
160 m_iBidiLevel(0),
161 m_iBidiPos(0),
162 m_iBidiOrder(0),
163 m_pUserData(NULL) {}
164 FX_DWORD m_dwStatus;
165 int16_t m_iBidiClass;
166 int16_t m_iBidiLevel;
167 int16_t m_iBidiPos;
168 int16_t m_iBidiOrder;
169 void* m_pUserData;
170 };
171 typedef CFX_ArrayTemplate<CFX_TxtChar> CFX_TxtCharArray;
172 class CFX_RTFChar : public CFX_Char {
173 public:
174 CFX_RTFChar()
175 : CFX_Char(),
176 m_dwStatus(0),
177 m_iFontSize(0),
178 m_iFontHeight(0),
179 m_iBidiClass(0),
180 m_iBidiLevel(0),
181 m_iBidiPos(0),
182 m_dwLayoutStyles(0),
183 m_dwIdentity(0),
184 m_pUserData(NULL) {}
185 FX_DWORD m_dwStatus;
186 int32_t m_iFontSize;
187 int32_t m_iFontHeight;
188 int16_t m_iBidiClass;
189 int16_t m_iBidiLevel;
190 int16_t m_iBidiPos;
191 int16_t m_iBidiOrder;
192 FX_DWORD m_dwLayoutStyles;
193 FX_DWORD m_dwIdentity;
194 IFX_Unknown* m_pUserData;
195 };
196 typedef CFX_ArrayTemplate<CFX_RTFChar> CFX_RTFCharArray;
197 #endif
48 198
49 #endif // CORE_INCLUDE_FXCRT_FX_UCD_H_ 199 #endif // CORE_INCLUDE_FXCRT_FX_UCD_H_
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_stream.h ('k') | core/include/fxge/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698