diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-10-28 23:03:33 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-03 11:10:11 -0800 |
commit | fdc00a7042d912aafaabddae4d9c84199921ef23 (patch) | |
tree | 32ab8ac91cc68d2cd15b9168782a71b3f3f5e7b9 /core/include/fxcrt/fx_ucd.h | |
parent | e9b38fa38de2c95d8260be31c57d9272c4d127ed (diff) | |
download | pdfium-fdc00a7042d912aafaabddae4d9c84199921ef23.tar.xz |
Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
Diffstat (limited to 'core/include/fxcrt/fx_ucd.h')
-rw-r--r-- | core/include/fxcrt/fx_ucd.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h index 9e1862aa80..c87e459aa5 100644 --- a/core/include/fxcrt/fx_ucd.h +++ b/core/include/fxcrt/fx_ucd.h @@ -88,6 +88,20 @@ enum FX_CHARTYPE { FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS), FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS), }; +typedef struct _FX_CHARPROPERTIES {
+ union FX_CHARPROPERTIES_UNION{
+ struct FX_CHARPROPERTIES_BIT{
+ FX_DWORD dwBreakType : 6;
+ FX_DWORD dwBidiClass : 5;
+ FX_DWORD dwCharType : 4;
+ FX_DWORD dwRotation : 1;
+ FX_DWORD dwCJKSpecial : 1;
+ FX_DWORD dwVertIndex : 6;
+ FX_DWORD dwBidiIndex : 9;
+ };
+ FX_DWORD dwCharProps;
+ };
+} FX_CHARPROPERTIES;
FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch); FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); FX_BOOL FX_IsRotationCode(FX_WCHAR ch); @@ -95,4 +109,89 @@ FX_BOOL FX_IsCombinationChar(FX_WCHAR wch); FX_BOOL FX_IsBidiChar(FX_WCHAR wch); FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical); FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_DWORD dwProps, FX_BOOL bRTL, FX_BOOL bVertical); +class CFX_Char : public CFX_Object
+{
+public:
+ CFX_Char() : m_wCharCode(0)
+ , m_nBreakType(0)
+ , m_nRotation(0)
+ , m_dwCharProps(0)
+ , m_dwCharStyles(0)
+ , m_iCharWidth(0)
+ , m_iHorizontalScale(100)
+ , m_iVertialScale(100)
+ {
+ }
+ CFX_Char(FX_WORD wCharCode, FX_DWORD dwCharProps)
+ : m_wCharCode(wCharCode)
+ , m_nBreakType(0)
+ , m_nRotation(0)
+ , m_dwCharProps(dwCharProps)
+ , m_dwCharStyles(0)
+ , m_iCharWidth(0)
+ , m_iHorizontalScale(100)
+ , m_iVertialScale(100)
+ {
+ }
+ FX_DWORD GetCharType() const
+ {
+ return m_dwCharProps & FX_CHARTYPEBITSMASK;
+ }
+ FX_WORD m_wCharCode;
+ FX_BYTE m_nBreakType;
+ FX_INT8 m_nRotation;
+ FX_DWORD m_dwCharProps;
+ FX_DWORD m_dwCharStyles;
+ FX_INT32 m_iCharWidth;
+ FX_INT32 m_iHorizontalScale;
+ FX_INT32 m_iVertialScale;
+};
+typedef CFX_ArrayTemplate<CFX_Char> CFX_CharArray;
+class CFX_TxtChar : public CFX_Char
+{
+public:
+ CFX_TxtChar() : CFX_Char()
+ , m_dwStatus(0)
+ , m_iBidiClass(0)
+ , m_iBidiLevel(0)
+ , m_iBidiPos(0)
+ , m_iBidiOrder(0)
+ , m_pUserData(NULL)
+ {
+ }
+ FX_DWORD m_dwStatus;
+ FX_INT16 m_iBidiClass;
+ FX_INT16 m_iBidiLevel;
+ FX_INT16 m_iBidiPos;
+ FX_INT16 m_iBidiOrder;
+ FX_LPVOID m_pUserData;
+};
+typedef CFX_ArrayTemplate<CFX_TxtChar> CFX_TxtCharArray;
+class CFX_RTFChar : public CFX_Char
+{
+public:
+ CFX_RTFChar() : CFX_Char()
+ , m_dwStatus(0)
+ , m_iFontSize(0)
+ , m_iFontHeight(0)
+ , m_iBidiClass(0)
+ , m_iBidiLevel(0)
+ , m_iBidiPos(0)
+ , m_dwLayoutStyles(0)
+ , m_dwIdentity(0)
+ , m_pUserData(NULL)
+ {
+ }
+ FX_DWORD m_dwStatus;
+ FX_INT32 m_iFontSize;
+ FX_INT32 m_iFontHeight;
+ FX_INT16 m_iBidiClass;
+ FX_INT16 m_iBidiLevel;
+ FX_INT16 m_iBidiPos;
+ FX_INT16 m_iBidiOrder;
+ FX_DWORD m_dwLayoutStyles;
+ FX_DWORD m_dwIdentity;
+ IFX_Unknown *m_pUserData;
+};
+typedef CFX_ArrayTemplate<CFX_RTFChar> CFX_RTFCharArray;
#endif |