Debian Codegraph @

inc/utype.h

raw symbols SCIP
1 /* This is a GENERATED file - from makeutype.py with Unicode 17.0.0 */
2
3 /* Copyright (C) 2000-2012 by George Williams */
4 /*
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10
11 * Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14
15 * The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 #ifndef FONTFORGE_UNICODE_UTYPE2_H
31 #define FONTFORGE_UNICODE_UTYPE2_H
32
33 #include <ctype.h> /* Include here so we can control it. If a system header includes it later bad things happen */
34 #include "basics.h" /* Include here so we can use pre-defined int types to correctly size constant data arrays. */
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* Unicode basics */
41 #define UNICODE_VERSION "17.0.0"
42 #define UNICODE_MAX 0x110000
43
44 /* Pose flags */
45 #define FF_UNICODE_NOPOSDATAGIVEN -1
46 #define FF_UNICODE_ABOVE 0x100
47 #define FF_UNICODE_BELOW 0x200
48 #define FF_UNICODE_OVERSTRIKE 0x400
49 #define FF_UNICODE_LEFT 0x800
50 #define FF_UNICODE_RIGHT 0x1000
51 #define FF_UNICODE_JOINS2 0x2000
52 #define FF_UNICODE_CENTERLEFT 0x4000
53 #define FF_UNICODE_CENTERRIGHT 0x8000
54 #define FF_UNICODE_CENTEREDOUTSIDE 0x10000
55 #define FF_UNICODE_OUTSIDE 0x20000
56 #define FF_UNICODE_RIGHTEDGE 0x40000
57 #define FF_UNICODE_LEFTEDGE 0x80000
58 #define FF_UNICODE_TOUCHING 0x100000
59
60 extern int ff_unicode_isunicodepointassigned(unichar_t ch);
61 extern int ff_unicode_isalpha(unichar_t ch);
62 extern int ff_unicode_isideographic(unichar_t ch);
63 extern int ff_unicode_islefttoright(unichar_t ch);
64 extern int ff_unicode_isrighttoleft(unichar_t ch);
65 extern int ff_unicode_islower(unichar_t ch);
66 extern int ff_unicode_isupper(unichar_t ch);
67 extern int ff_unicode_isdigit(unichar_t ch);
68 extern int ff_unicode_isligvulgfrac(unichar_t ch);
69 extern int ff_unicode_iscombining(unichar_t ch);
70 extern int ff_unicode_iszerowidth(unichar_t ch);
71 extern int ff_unicode_iseuronumeric(unichar_t ch);
72 extern int ff_unicode_iseuronumterm(unichar_t ch);
73 extern int ff_unicode_isarabnumeric(unichar_t ch);
74 extern int ff_unicode_isdecompositionnormative(unichar_t ch);
75 extern int ff_unicode_isdecompcircle(unichar_t ch);
76 extern int ff_unicode_isarabinitial(unichar_t ch);
77 extern int ff_unicode_isarabmedial(unichar_t ch);
78 extern int ff_unicode_isarabfinal(unichar_t ch);
79 extern int ff_unicode_isarabisolated(unichar_t ch);
80 extern int ff_unicode_isideoalpha(unichar_t ch);
81 extern int ff_unicode_isalnum(unichar_t ch);
82 extern int ff_unicode_isspace(unichar_t ch);
83 extern int ff_unicode_iseuronumsep(unichar_t ch);
84 extern int ff_unicode_iscommonsep(unichar_t ch);
85 extern int ff_unicode_ishexdigit(unichar_t ch);
86 extern int ff_unicode_istitle(unichar_t ch);
87 extern int ff_unicode_pose(unichar_t ch);
88 extern int ff_unicode_combiningclass(unichar_t ch);
89 extern unichar_t ff_unicode_tolower(unichar_t ch);
90 extern unichar_t ff_unicode_toupper(unichar_t ch);
91 extern unichar_t ff_unicode_totitle(unichar_t ch);
92 extern unichar_t ff_unicode_tomirror(unichar_t ch);
93 extern int ff_unicode_hasunialt(unichar_t ch);
94 extern const unichar_t* ff_unicode_unialt(unichar_t ch);
95
96 #undef isunicodepointassigned
97 #undef isalpha
98 #undef isideographic
99 #undef islefttoright
100 #undef isrighttoleft
101 #undef islower
102 #undef isupper
103 #undef isdigit
104 #undef isligvulgfrac
105 #undef iscombining
106 #undef iszerowidth
107 #undef iseuronumeric
108 #undef iseuronumterm
109 #undef isarabnumeric
110 #undef isdecompositionnormative
111 #undef isdecompcircle
112 #undef isarabinitial
113 #undef isarabmedial
114 #undef isarabfinal
115 #undef isarabisolated
116 #undef isideoalpha
117 #undef isalnum
118 #undef isspace
119 #undef iseuronumsep
120 #undef iscommonsep
121 #undef ishexdigit
122 #undef istitle
123 #undef pose
124 #undef combiningclass
125 #undef tolower
126 #undef toupper
127 #undef totitle
128 #undef tomirror
129 #undef hasunialt
130 #undef unialt
131
132 #define isunicodepointassigned(ch) ff_unicode_isunicodepointassigned((ch))
133 #define isalpha(ch) ff_unicode_isalpha((ch))
134 #define isideographic(ch) ff_unicode_isideographic((ch))
135 #define islefttoright(ch) ff_unicode_islefttoright((ch))
136 #define isrighttoleft(ch) ff_unicode_isrighttoleft((ch))
137 #define islower(ch) ff_unicode_islower((ch))
138 #define isupper(ch) ff_unicode_isupper((ch))
139 #define isdigit(ch) ff_unicode_isdigit((ch))
140 #define isligvulgfrac(ch) ff_unicode_isligvulgfrac((ch))
141 #define iscombining(ch) ff_unicode_iscombining((ch))
142 #define iszerowidth(ch) ff_unicode_iszerowidth((ch))
143 #define iseuronumeric(ch) ff_unicode_iseuronumeric((ch))
144 #define iseuronumterm(ch) ff_unicode_iseuronumterm((ch))
145 #define isarabnumeric(ch) ff_unicode_isarabnumeric((ch))
146 #define isdecompositionnormative(ch) ff_unicode_isdecompositionnormative((ch))
147 #define isdecompcircle(ch) ff_unicode_isdecompcircle((ch))
148 #define isarabinitial(ch) ff_unicode_isarabinitial((ch))
149 #define isarabmedial(ch) ff_unicode_isarabmedial((ch))
150 #define isarabfinal(ch) ff_unicode_isarabfinal((ch))
151 #define isarabisolated(ch) ff_unicode_isarabisolated((ch))
152 #define isideoalpha(ch) ff_unicode_isideoalpha((ch))
153 #define isalnum(ch) ff_unicode_isalnum((ch))
154 #define isspace(ch) ff_unicode_isspace((ch))
155 #define iseuronumsep(ch) ff_unicode_iseuronumsep((ch))
156 #define iscommonsep(ch) ff_unicode_iscommonsep((ch))
157 #define ishexdigit(ch) ff_unicode_ishexdigit((ch))
158 #define istitle(ch) ff_unicode_istitle((ch))
159 #define pose(ch) ff_unicode_pose((ch))
160 #define combiningclass(ch) ff_unicode_combiningclass((ch))
161 #define tolower(ch) ff_unicode_tolower((ch))
162 #define toupper(ch) ff_unicode_toupper((ch))
163 #define totitle(ch) ff_unicode_totitle((ch))
164 #define tomirror(ch) ff_unicode_tomirror((ch))
165 #define hasunialt(ch) ff_unicode_hasunialt((ch))
166 #define unialt(ch) ff_unicode_unialt((ch))
167
168 struct arabicforms {
169 unsigned short initial, medial, final, isolated;
170 unsigned int isletter: 1;
171 unsigned int joindual: 1;
172 unsigned int required_lig_with_alef: 1;
173 };
174
175 extern const struct arabicforms* arabicform(unichar_t ch);
176
177 struct unicode_range {
178 unichar_t start;
179 unichar_t end;
180 unichar_t first_char;
181 int num_assigned;
182 const char *name;
183 };
184
185 extern char* uniname_name(unichar_t ch);
186 extern char* uniname_annotation(unichar_t ch, int prettify);
187 extern char* uniname_formal_alias(unichar_t ch);
188 extern const struct unicode_range* uniname_block(unichar_t ch);
189 extern const struct unicode_range* uniname_plane(unichar_t ch);
190 extern const struct unicode_range* uniname_blocks(int *sz);
191 extern const struct unicode_range* uniname_planes(int *sz);
192
193 #ifdef __cplusplus
194 }
195 #endif
196
197 #endif /* FONTFORGE_UNICODE_UTYPE2_H */