• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_INCLUDE_FXCRT_FX_UCD_H_
8 #define CORE_INCLUDE_FXCRT_FX_UCD_H_
9 
10 #include "fx_system.h"
11 
12 enum FX_CHARBREAKPROP {
13     FX_CBP_OP = 0,
14     FX_CBP_CL = 1,
15     FX_CBP_QU = 2,
16     FX_CBP_GL = 3,
17     FX_CBP_NS = 4,
18     FX_CBP_EX = 5,
19     FX_CBP_SY = 6,
20     FX_CBP_IS = 7,
21     FX_CBP_PR = 8,
22     FX_CBP_PO = 9,
23     FX_CBP_NU = 10,
24     FX_CBP_AL = 11,
25     FX_CBP_ID = 12,
26     FX_CBP_IN = 13,
27     FX_CBP_HY = 14,
28     FX_CBP_BA = 15,
29     FX_CBP_BB = 16,
30     FX_CBP_B2 = 17,
31     FX_CBP_ZW = 18,
32     FX_CBP_CM = 19,
33     FX_CBP_WJ = 20,
34     FX_CBP_H2 = 21,
35     FX_CBP_H3 = 22,
36     FX_CBP_JL = 23,
37     FX_CBP_JV = 24,
38     FX_CBP_JT = 25,
39 
40     FX_CBP_BK = 26,
41     FX_CBP_CR = 27,
42     FX_CBP_LF = 28,
43     FX_CBP_NL = 29,
44     FX_CBP_SA = 30,
45     FX_CBP_SG = 31,
46     FX_CBP_CB = 32,
47     FX_CBP_XX = 33,
48     FX_CBP_AI = 34,
49     FX_CBP_SP = 35,
50     FX_CBP_TB = 37,
51     FX_CBP_NONE = 36,
52 };
53 #define FX_BIDICLASSBITS		6
54 #define FX_BIDICLASSBITSMASK	(31 << FX_BIDICLASSBITS)
55 enum FX_BIDICLASS {
56     FX_BIDICLASS_ON		= 0,
57     FX_BIDICLASS_L		= 1,
58     FX_BIDICLASS_R		= 2,
59     FX_BIDICLASS_AN		= 3,
60     FX_BIDICLASS_EN		= 4,
61     FX_BIDICLASS_AL		= 5,
62     FX_BIDICLASS_NSM	= 6,
63     FX_BIDICLASS_CS		= 7,
64     FX_BIDICLASS_ES		= 8,
65     FX_BIDICLASS_ET		= 9,
66     FX_BIDICLASS_BN		= 10,
67     FX_BIDICLASS_S		= 11,
68     FX_BIDICLASS_WS		= 12,
69     FX_BIDICLASS_B		= 13,
70     FX_BIDICLASS_RLO	= 14,
71     FX_BIDICLASS_RLE	= 15,
72     FX_BIDICLASS_LRO	= 16,
73     FX_BIDICLASS_LRE	= 17,
74     FX_BIDICLASS_PDF	= 18,
75     FX_BIDICLASS_N		= FX_BIDICLASS_ON,
76 };
77 #define FX_CHARTYPEBITS		11
78 #define FX_CHARTYPEBITSMASK	(15 << FX_CHARTYPEBITS)
79 enum FX_CHARTYPE {
80     FX_CHARTYPE_Unknown				= 0,
81     FX_CHARTYPE_Tab					= (1 << FX_CHARTYPEBITS),
82     FX_CHARTYPE_Space				= (2 << FX_CHARTYPEBITS),
83     FX_CHARTYPE_Control				= (3 << FX_CHARTYPEBITS),
84     FX_CHARTYPE_Combination			= (4 << FX_CHARTYPEBITS),
85     FX_CHARTYPE_Numeric				= (5 << FX_CHARTYPEBITS),
86     FX_CHARTYPE_Normal				= (6 << FX_CHARTYPEBITS),
87     FX_CHARTYPE_ArabicAlef			= (7 << FX_CHARTYPEBITS),
88     FX_CHARTYPE_ArabicSpecial		= (8 << FX_CHARTYPEBITS),
89     FX_CHARTYPE_ArabicDistortion	= (9 << FX_CHARTYPEBITS),
90     FX_CHARTYPE_ArabicNormal		= (10 << FX_CHARTYPEBITS),
91     FX_CHARTYPE_ArabicForm			= (11 << FX_CHARTYPEBITS),
92     FX_CHARTYPE_Arabic				= (12 << FX_CHARTYPEBITS),
93 };
94 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
95 FX_BOOL	FX_IsCtrlCode(FX_WCHAR ch);
96 FX_BOOL	FX_IsRotationCode(FX_WCHAR ch);
97 FX_BOOL FX_IsCombinationChar(FX_WCHAR wch);
98 FX_BOOL	FX_IsBidiChar(FX_WCHAR wch);
99 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
100 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_DWORD dwProps, FX_BOOL bRTL, FX_BOOL bVertical);
101 
102 #endif  // CORE_INCLUDE_FXCRT_FX_UCD_H_
103