1 /***************************************************************************/
2 /*                                                                         */
3 /*  afranges.c                                                             */
4 /*                                                                         */
5 /*    Auto-fitter Unicode script ranges (body).                            */
6 /*                                                                         */
7 /*  Copyright 2013-2015 by                                                 */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17 
18 
19 #include "afranges.h"
20 
21 
22   const AF_Script_UniRangeRec  af_arab_uniranges[] =
23   {
24     AF_UNIRANGE_REC(  0x0600UL,  0x06FFUL ),  /* Arabic                                 */
25     AF_UNIRANGE_REC(  0x0750UL,  0x07FFUL ),  /* Arabic Supplement                      */
26     AF_UNIRANGE_REC(  0x08A0UL,  0x08FFUL ),  /* Arabic Extended-A                      */
27     AF_UNIRANGE_REC(  0xFB50UL,  0xFDFFUL ),  /* Arabic Presentation Forms-A            */
28     AF_UNIRANGE_REC(  0xFE70UL,  0xFEFFUL ),  /* Arabic Presentation Forms-B            */
29     AF_UNIRANGE_REC( 0x1EE00UL, 0x1EEFFUL ),  /* Arabic Mathematical Alphabetic Symbols */
30     AF_UNIRANGE_REC(       0UL,       0UL )
31   };
32 
33   const AF_Script_UniRangeRec  af_cyrl_uniranges[] =
34   {
35     AF_UNIRANGE_REC(  0x0400UL,  0x04FFUL ),  /* Cyrillic            */
36     AF_UNIRANGE_REC(  0x0500UL,  0x052FUL ),  /* Cyrillic Supplement */
37     AF_UNIRANGE_REC(  0x2DE0UL,  0x2DFFUL ),  /* Cyrillic Extended-A */
38     AF_UNIRANGE_REC(  0xA640UL,  0xA69FUL ),  /* Cyrillic Extended-B */
39     AF_UNIRANGE_REC(       0UL,       0UL )
40   };
41 
42   /* there are some characters in the Devanagari Unicode block that are    */
43   /* generic to Indic scripts; we omit them so that their presence doesn't */
44   /* trigger Devanagari                                                    */
45 
46   const AF_Script_UniRangeRec  af_deva_uniranges[] =
47   {
48     AF_UNIRANGE_REC(  0x0900UL,  0x093BUL ),  /* Devanagari       */
49     /* omitting U+093C nukta */
50     AF_UNIRANGE_REC(  0x093DUL,  0x0950UL ),
51     /* omitting U+0951 udatta, U+0952 anudatta */
52     AF_UNIRANGE_REC(  0x0953UL,  0x0963UL ),
53     /* omitting U+0964 danda, U+0965 double danda */
54     AF_UNIRANGE_REC(  0x0966UL,  0x097FUL ),
55     AF_UNIRANGE_REC(  0x20B9UL,  0x20B9UL ),  /* (new) Rupee sign */
56     AF_UNIRANGE_REC(       0UL,       0UL )
57   };
58 
59   const AF_Script_UniRangeRec  af_grek_uniranges[] =
60   {
61     AF_UNIRANGE_REC(  0x0370UL,  0x03FFUL ),  /* Greek and Coptic */
62     AF_UNIRANGE_REC(  0x1F00UL,  0x1FFFUL ),  /* Greek Extended   */
63     AF_UNIRANGE_REC(       0UL,       0UL )
64   };
65 
66   const AF_Script_UniRangeRec  af_hebr_uniranges[] =
67   {
68     AF_UNIRANGE_REC(  0x0590UL,  0x05FFUL ),  /* Hebrew                          */
69     AF_UNIRANGE_REC(  0xFB1DUL,  0xFB4FUL ),  /* Alphab. Present. Forms (Hebrew) */
70     AF_UNIRANGE_REC(       0UL,       0UL )
71   };
72 
73   const AF_Script_UniRangeRec  af_latn_uniranges[] =
74   {
75     AF_UNIRANGE_REC(  0x0020UL,  0x007FUL ),  /* Basic Latin (no control chars)         */
76     AF_UNIRANGE_REC(  0x00A0UL,  0x00FFUL ),  /* Latin-1 Supplement (no control chars)  */
77     AF_UNIRANGE_REC(  0x0100UL,  0x017FUL ),  /* Latin Extended-A                       */
78     AF_UNIRANGE_REC(  0x0180UL,  0x024FUL ),  /* Latin Extended-B                       */
79     AF_UNIRANGE_REC(  0x0250UL,  0x02AFUL ),  /* IPA Extensions                         */
80     AF_UNIRANGE_REC(  0x02B0UL,  0x02FFUL ),  /* Spacing Modifier Letters               */
81     AF_UNIRANGE_REC(  0x0300UL,  0x036FUL ),  /* Combining Diacritical Marks            */
82     AF_UNIRANGE_REC(  0x1D00UL,  0x1D7FUL ),  /* Phonetic Extensions                    */
83     AF_UNIRANGE_REC(  0x1D80UL,  0x1DBFUL ),  /* Phonetic Extensions Supplement         */
84     AF_UNIRANGE_REC(  0x1DC0UL,  0x1DFFUL ),  /* Combining Diacritical Marks Supplement */
85     AF_UNIRANGE_REC(  0x1E00UL,  0x1EFFUL ),  /* Latin Extended Additional              */
86     AF_UNIRANGE_REC(  0x2000UL,  0x206FUL ),  /* General Punctuation                    */
87     AF_UNIRANGE_REC(  0x2070UL,  0x209FUL ),  /* Superscripts and Subscripts            */
88     AF_UNIRANGE_REC(  0x20A0UL,  0x20B8UL ),  /* Currency Symbols ...                   */
89     AF_UNIRANGE_REC(  0x20BAUL,  0x20CFUL ),  /* ... except new Rupee sign              */
90     AF_UNIRANGE_REC(  0x2150UL,  0x218FUL ),  /* Number Forms                           */
91     AF_UNIRANGE_REC(  0x2460UL,  0x24FFUL ),  /* Enclosed Alphanumerics                 */
92     AF_UNIRANGE_REC(  0x2C60UL,  0x2C7FUL ),  /* Latin Extended-C                       */
93     AF_UNIRANGE_REC(  0x2E00UL,  0x2E7FUL ),  /* Supplemental Punctuation               */
94     AF_UNIRANGE_REC(  0xA720UL,  0xA7FFUL ),  /* Latin Extended-D                       */
95     AF_UNIRANGE_REC(  0xFB00UL,  0xFB06UL ),  /* Alphab. Present. Forms (Latin Ligs)    */
96     AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ),  /* Mathematical Alphanumeric Symbols      */
97     AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ),  /* Enclosed Alphanumeric Supplement       */
98     AF_UNIRANGE_REC(       0UL,       0UL )
99   };
100 
101   const AF_Script_UniRangeRec  af_none_uniranges[] =
102   {
103     AF_UNIRANGE_REC( 0UL, 0UL )
104   };
105 
106   const AF_Script_UniRangeRec  af_telu_uniranges[] =
107   {
108     AF_UNIRANGE_REC(  0x0C00UL,  0x0C7FUL ),  /* Telugu */
109     AF_UNIRANGE_REC(       0UL,       0UL )
110   };
111 
112   const AF_Script_UniRangeRec  af_thai_uniranges[] =
113   {
114     AF_UNIRANGE_REC(  0x0E00UL,  0x0E7FUL ),  /* Thai */
115     AF_UNIRANGE_REC(       0UL,       0UL )
116   };
117 
118 #ifdef AF_CONFIG_OPTION_INDIC
119 
120   const AF_Script_UniRangeRec  af_beng_uniranges[] =
121   {
122     AF_UNIRANGE_REC(  0x0980UL,  0x09FFUL ),  /* Bengali */
123     AF_UNIRANGE_REC(       0UL,       0UL )
124   };
125 
126   const AF_Script_UniRangeRec  af_gujr_uniranges[] =
127   {
128     AF_UNIRANGE_REC(  0x0A80UL,  0x0AFFUL ),  /* Gujarati */
129     AF_UNIRANGE_REC(       0UL,       0UL )
130   };
131 
132   const AF_Script_UniRangeRec  af_guru_uniranges[] =
133   {
134     AF_UNIRANGE_REC(  0x0A00UL,  0x0A7FUL ),  /* Gurmukhi */
135     AF_UNIRANGE_REC(       0UL,       0UL )
136   };
137 
138   const AF_Script_UniRangeRec  af_knda_uniranges[] =
139   {
140     AF_UNIRANGE_REC(  0x0C80UL,  0x0CFFUL ),  /* Kannada */
141     AF_UNIRANGE_REC(       0UL,       0UL )
142   };
143 
144   const AF_Script_UniRangeRec  af_limb_uniranges[] =
145   {
146     AF_UNIRANGE_REC(  0x1900UL,  0x194FUL ),  /* Limbu */
147     AF_UNIRANGE_REC(       0UL,       0UL )
148   };
149 
150   const AF_Script_UniRangeRec  af_mlym_uniranges[] =
151   {
152     AF_UNIRANGE_REC(  0x0D00UL,  0x0D7FUL ),  /* Malayalam */
153     AF_UNIRANGE_REC(       0UL,       0UL )
154   };
155 
156   const AF_Script_UniRangeRec  af_orya_uniranges[] =
157   {
158     AF_UNIRANGE_REC(  0x0B00UL,  0x0B7FUL ),  /* Oriya */
159     AF_UNIRANGE_REC(       0UL,       0UL )
160   };
161 
162   const AF_Script_UniRangeRec  af_sinh_uniranges[] =
163   {
164     AF_UNIRANGE_REC(  0x0D80UL,  0x0DFFUL ),  /* Sinhala */
165     AF_UNIRANGE_REC(       0UL,       0UL )
166   };
167 
168   const AF_Script_UniRangeRec  af_sund_uniranges[] =
169   {
170     AF_UNIRANGE_REC(  0x1B80UL,  0x1BBFUL ),  /* Sundanese */
171     AF_UNIRANGE_REC(       0UL,       0UL )
172   };
173 
174   const AF_Script_UniRangeRec  af_sylo_uniranges[] =
175   {
176     AF_UNIRANGE_REC(  0xA800UL,  0xA82FUL ),  /* Syloti Nagri */
177     AF_UNIRANGE_REC(       0UL,       0UL )
178   };
179 
180   const AF_Script_UniRangeRec  af_taml_uniranges[] =
181   {
182     AF_UNIRANGE_REC(  0x0B80UL,  0x0BFFUL ),  /* Tamil */
183     AF_UNIRANGE_REC(       0UL,       0UL )
184   };
185 
186   const AF_Script_UniRangeRec  af_tibt_uniranges[] =
187   {
188     AF_UNIRANGE_REC(  0x0F00UL,  0x0FFFUL ),  /* Tibetan */
189     AF_UNIRANGE_REC(       0UL,       0UL )
190   };
191 
192 #endif /* !AF_CONFIG_OPTION_INDIC */
193 
194 #ifdef AF_CONFIG_OPTION_CJK
195 
196   /* this corresponds to Unicode 6.0 */
197 
198   const AF_Script_UniRangeRec  af_hani_uniranges[] =
199   {
200     AF_UNIRANGE_REC(  0x1100UL,  0x11FFUL ),  /* Hangul Jamo                             */
201     AF_UNIRANGE_REC(  0x2E80UL,  0x2EFFUL ),  /* CJK Radicals Supplement                 */
202     AF_UNIRANGE_REC(  0x2F00UL,  0x2FDFUL ),  /* Kangxi Radicals                         */
203     AF_UNIRANGE_REC(  0x2FF0UL,  0x2FFFUL ),  /* Ideographic Description Characters      */
204     AF_UNIRANGE_REC(  0x3000UL,  0x303FUL ),  /* CJK Symbols and Punctuation             */
205     AF_UNIRANGE_REC(  0x3040UL,  0x309FUL ),  /* Hiragana                                */
206     AF_UNIRANGE_REC(  0x30A0UL,  0x30FFUL ),  /* Katakana                                */
207     AF_UNIRANGE_REC(  0x3100UL,  0x312FUL ),  /* Bopomofo                                */
208     AF_UNIRANGE_REC(  0x3130UL,  0x318FUL ),  /* Hangul Compatibility Jamo               */
209     AF_UNIRANGE_REC(  0x3190UL,  0x319FUL ),  /* Kanbun                                  */
210     AF_UNIRANGE_REC(  0x31A0UL,  0x31BFUL ),  /* Bopomofo Extended                       */
211     AF_UNIRANGE_REC(  0x31C0UL,  0x31EFUL ),  /* CJK Strokes                             */
212     AF_UNIRANGE_REC(  0x31F0UL,  0x31FFUL ),  /* Katakana Phonetic Extensions            */
213     AF_UNIRANGE_REC(  0x3200UL,  0x32FFUL ),  /* Enclosed CJK Letters and Months         */
214     AF_UNIRANGE_REC(  0x3300UL,  0x33FFUL ),  /* CJK Compatibility                       */
215     AF_UNIRANGE_REC(  0x3400UL,  0x4DBFUL ),  /* CJK Unified Ideographs Extension A      */
216     AF_UNIRANGE_REC(  0x4DC0UL,  0x4DFFUL ),  /* Yijing Hexagram Symbols                 */
217     AF_UNIRANGE_REC(  0x4E00UL,  0x9FFFUL ),  /* CJK Unified Ideographs                  */
218     AF_UNIRANGE_REC(  0xA960UL,  0xA97FUL ),  /* Hangul Jamo Extended-A                  */
219     AF_UNIRANGE_REC(  0xAC00UL,  0xD7AFUL ),  /* Hangul Syllables                        */
220     AF_UNIRANGE_REC(  0xD7B0UL,  0xD7FFUL ),  /* Hangul Jamo Extended-B                  */
221     AF_UNIRANGE_REC(  0xF900UL,  0xFAFFUL ),  /* CJK Compatibility Ideographs            */
222     AF_UNIRANGE_REC(  0xFE10UL,  0xFE1FUL ),  /* Vertical forms                          */
223     AF_UNIRANGE_REC(  0xFE30UL,  0xFE4FUL ),  /* CJK Compatibility Forms                 */
224     AF_UNIRANGE_REC(  0xFF00UL,  0xFFEFUL ),  /* Halfwidth and Fullwidth Forms           */
225     AF_UNIRANGE_REC( 0x1B000UL, 0x1B0FFUL ),  /* Kana Supplement                         */
226     AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ),  /* Tai Xuan Hing Symbols                   */
227     AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ),  /* Enclosed Ideographic Supplement         */
228     AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ),  /* CJK Unified Ideographs Extension B      */
229     AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ),  /* CJK Unified Ideographs Extension C      */
230     AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ),  /* CJK Unified Ideographs Extension D      */
231     AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ),  /* CJK Compatibility Ideographs Supplement */
232     AF_UNIRANGE_REC(       0UL,       0UL )
233   };
234 
235 #endif /* !AF_CONFIG_OPTION_CJK */
236 
237 /* END */
238