mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6621 lines
207 KiB

  1. diff -dur xc/extras/fontconfig/configure xc-p/extras/fontconfig/configure
  2. --- xc/extras/fontconfig/configure 2003-09-25 13:01:14.000000000 +0200
  3. +++ xc-p/extras/fontconfig/configure 2004-11-11 22:22:24.000000000 +0100
  4. @@ -1248,7 +1248,7 @@
  5. fi
  6. -PACKAGE_VERSION=1.0.1
  7. +PACKAGE_VERSION=2.2.1
  8. # Set major version
  9. PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'`
  10. diff -dur xc/extras/fontconfig/configure.in xc-p/extras/fontconfig/configure.in
  11. --- xc/extras/fontconfig/configure.in 2003-09-25 13:01:14.000000000 +0200
  12. +++ xc-p/extras/fontconfig/configure.in 2004-11-11 22:22:24.000000000 +0100
  13. @@ -43,7 +43,7 @@
  14. AC_PROG_LN_S
  15. AC_PATH_X
  16. -PACKAGE_VERSION=1.0.1
  17. +PACKAGE_VERSION=2.2.1
  18. # Set major version
  19. PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'`
  20. diff -dur xc/extras/fontconfig/fc-cache/fc-cache.c xc-p/extras/fontconfig/fc-cache/fc-cache.c
  21. --- xc/extras/fontconfig/fc-cache/fc-cache.c 2003-09-25 13:01:15.000000000 +0200
  22. +++ xc-p/extras/fontconfig/fc-cache/fc-cache.c 2004-11-11 22:22:24.000000000 +0100
  23. @@ -1,7 +1,7 @@
  24. /*
  25. - * $XFree86: xc/extras/fontconfig/fc-cache/fc-cache.c,v 1.2 2003/09/13 21:33:00 dawes Exp $
  26. + * $RCSId: xc/lib/fontconfig/fc-cache/fc-cache.c,v 1.8tsi Exp $
  27. *
  28. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  29. + * Copyright � 2002 Keith Packard
  30. *
  31. * Permission to use, copy, modify, distribute, and sell this software and its
  32. * documentation for any purpose is hereby granted without fee, provided that
  33. @@ -36,9 +36,6 @@
  34. #define HAVE_GETOPT_LONG 1
  35. #endif
  36. #define HAVE_GETOPT 1
  37. -#if defined(ISC) || defined(Lynx)
  38. -#define HAVE_OPTARG_IN_UNISTD 0
  39. -#endif
  40. #endif
  41. #ifndef HAVE_GETOPT
  42. @@ -47,9 +44,6 @@
  43. #ifndef HAVE_GETOPT_LONG
  44. #define HAVE_GETOPT_LONG 0
  45. #endif
  46. -#ifndef HAVE_OPTARG_IN_UNISTD
  47. -#define HAVE_OPTARG_IN_UNISTD HAVE_GETOPT
  48. -#endif
  49. #if HAVE_GETOPT_LONG
  50. #undef _GNU_SOURCE
  51. @@ -57,13 +51,14 @@
  52. #include <getopt.h>
  53. const struct option longopts[] = {
  54. {"force", 0, 0, 'f'},
  55. + {"system-only", 0, 0, 's'},
  56. {"version", 0, 0, 'V'},
  57. {"verbose", 0, 0, 'v'},
  58. {"help", 0, 0, '?'},
  59. {NULL,0,0,0},
  60. };
  61. #else
  62. -#if HAVE_GETOPT && !HAVE_OPTARG_IN_UNISTD
  63. +#if HAVE_GETOPT
  64. extern char *optarg;
  65. extern int optind, opterr, optopt;
  66. #endif
  67. @@ -78,6 +73,7 @@
  68. "(all directories in font configuration by default).\n");
  69. fprintf (stderr, "\n");
  70. fprintf (stderr, " -f, --force scan directories with apparently valid caches\n");
  71. + fprintf (stderr, " -s, --system-only scan system-wide directories only\n");
  72. fprintf (stderr, " -v, --verbose display status information while busy\n");
  73. fprintf (stderr, " -V, --version display font config version and exit\n");
  74. fprintf (stderr, " -?, --help display this help and exit\n");
  75. @@ -135,21 +131,33 @@
  76. continue;
  77. }
  78. - if (stat ((char *) dir, &statb) == -1)
  79. + if (access ((char *) dir, W_OK) < 0)
  80. {
  81. - if (errno == ENOENT || errno == ENOTDIR)
  82. - {
  83. + switch (errno) {
  84. + case ENOENT:
  85. + case ENOTDIR:
  86. if (verbose)
  87. - printf ("no such directory, skipping\n");
  88. - }
  89. - else
  90. - {
  91. + printf ("skipping, no such directory\n");
  92. + break;
  93. + case EACCES:
  94. + case EROFS:
  95. + if (verbose)
  96. + printf ("skipping, no write access\n");
  97. + break;
  98. + default:
  99. fprintf (stderr, "\"%s\": ", dir);
  100. perror ("");
  101. ret++;
  102. }
  103. continue;
  104. }
  105. + if (stat ((char *) dir, &statb) == -1)
  106. + {
  107. + fprintf (stderr, "\"%s\": ", dir);
  108. + perror ("");
  109. + ret++;
  110. + continue;
  111. + }
  112. if (!S_ISDIR (statb.st_mode))
  113. {
  114. fprintf (stderr, "\"%s\": not a directory, skipping\n", dir);
  115. @@ -200,6 +208,7 @@
  116. FcStrList *list;
  117. FcBool verbose = FcFalse;
  118. FcBool force = FcFalse;
  119. + FcBool systemOnly = FcFalse;
  120. FcConfig *config;
  121. int i;
  122. int ret;
  123. @@ -216,6 +225,9 @@
  124. case 'f':
  125. force = FcTrue;
  126. break;
  127. + case 's':
  128. + systemOnly = FcTrue;
  129. + break;
  130. case 'V':
  131. fprintf (stderr, "fontconfig version %d.%d.%d\n",
  132. FC_MAJOR, FC_MINOR, FC_REVISION);
  133. @@ -232,6 +244,8 @@
  134. i = 1;
  135. #endif
  136. + if (systemOnly)
  137. + FcConfigEnableHome (FcFalse);
  138. config = FcInitLoadConfig ();
  139. if (!config)
  140. {
  141. diff -dur xc/extras/fontconfig/fc-lang/fc-lang.c xc-p/extras/fontconfig/fc-lang/fc-lang.c
  142. --- xc/extras/fontconfig/fc-lang/fc-lang.c 2003-06-04 18:29:38.000000000 +0200
  143. +++ xc-p/extras/fontconfig/fc-lang/fc-lang.c 2004-11-11 22:22:24.000000000 +0100
  144. @@ -1,5 +1,7 @@
  145. /*
  146. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  147. + * $RCSId: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.3 2002/08/22 07:36:43 keithp Exp $
  148. + *
  149. + * Copyright � 2002 Keith Packard
  150. *
  151. * Permission to use, copy, modify, distribute, and sell this software and its
  152. * documentation for any purpose is hereby granted without fee, provided that
  153. @@ -19,22 +21,38 @@
  154. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  155. * PERFORMANCE OF THIS SOFTWARE.
  156. */
  157. -/* $XFree86: xc/extras/fontconfig/fc-lang/fc-lang.c,v 1.2 2003/06/04 16:29:38 dawes Exp $ */
  158. #include "fcint.h"
  159. +#include "fccharset.c"
  160. +#include "fcstr.c"
  161. /*
  162. * fc-lang
  163. *
  164. * Read a set of language orthographies and build C declarations for
  165. * charsets which can then be used to identify which languages are
  166. - * supported by a given font. Note that it would be nice if
  167. - * this could be done while compiling the library, but this
  168. - * code uses a number of routines from the library. It's
  169. - * expediant to just ship the pre-built version along with the
  170. - * source orthographies.
  171. + * supported by a given font. Note that this uses some utilities
  172. + * from the fontconfig library, so the necessary file is simply
  173. + * included in this compilation. A couple of extra utility
  174. + * functions are also needed in slightly modified form
  175. */
  176. +void
  177. +FcMemAlloc (int kind, int size)
  178. +{
  179. +}
  180. +
  181. +void
  182. +FcMemFree (int kind, int size)
  183. +{
  184. +}
  185. +
  186. +FcChar8 *
  187. +FcConfigHome (void)
  188. +{
  189. + return getenv ("HOME");
  190. +}
  191. +
  192. static void
  193. fatal (char *file, int lineno, char *msg)
  194. {
  195. @@ -146,8 +164,8 @@
  196. while ((c = *name++))
  197. {
  198. - if (isupper (c))
  199. - c = tolower (c);
  200. + if (isupper ((int) (unsigned char) c))
  201. + c = tolower ((int) (unsigned char) c);
  202. if (c == '_')
  203. c = '-';
  204. if (c == ' ')
  205. @@ -189,6 +207,9 @@
  206. char line[1024];
  207. FcChar32 map[MAX_LANG_SET_MAP];
  208. int num_lang_set_map;
  209. + int setRangeStart[26];
  210. + int setRangeEnd[26];
  211. + FcChar8 setRangeChar;
  212. while (*++argv)
  213. {
  214. @@ -282,6 +303,21 @@
  215. }
  216. /*
  217. + * Find ranges for each letter for faster searching
  218. + */
  219. + setRangeChar = 'a';
  220. + for (i = 0; sets[i]; i++)
  221. + {
  222. + char c = names[i][0];
  223. +
  224. + while (setRangeChar <= c && c <= 'z')
  225. + setRangeStart[setRangeChar++ - 'a'] = i;
  226. + }
  227. + for (setRangeChar = 'a'; setRangeChar < 'z'; setRangeChar++)
  228. + setRangeEnd[setRangeChar - 'a'] = setRangeStart[setRangeChar+1-'a'] - 1;
  229. + setRangeEnd[setRangeChar - 'a'] = i - 1;
  230. +
  231. + /*
  232. * Dump arrays
  233. */
  234. for (i = 0; sets[i]; i++)
  235. @@ -325,13 +361,16 @@
  236. printf ("};\n\n");
  237. }
  238. printf ("#undef L\n\n");
  239. +
  240. /*
  241. * Dump sets
  242. */
  243. +
  244. printf ("static const FcLangCharSet fcLangCharSets[] = {\n");
  245. for (i = 0; sets[i]; i++)
  246. {
  247. int j = duplicate[i];
  248. +
  249. if (j < 0)
  250. j = i;
  251. printf (" { (FcChar8 *) \"%s\",\n"
  252. @@ -386,6 +425,19 @@
  253. printf ("#define NUM_COUNTRY_SET %d\n", ncountry_ent);
  254. }
  255. +
  256. + /*
  257. + * Dump sets start/finish for the fastpath
  258. + */
  259. + printf ("static const FcLangCharSetRange fcLangCharSetRanges[] = {\n");
  260. + for (setRangeChar = 'a'; setRangeChar <= 'z' ; setRangeChar++)
  261. + {
  262. + printf (" { %d, %d }, /* %c */\n",
  263. + setRangeStart[setRangeChar - 'a'],
  264. + setRangeEnd[setRangeChar - 'a'], setRangeChar);
  265. + }
  266. + printf ("};\n\n");
  267. +
  268. while (fgets (line, sizeof (line), stdin))
  269. fputs (line, stdout);
  270. diff -dur xc/extras/fontconfig/fc-lang/fclang.h xc-p/extras/fontconfig/fc-lang/fclang.h
  271. --- xc/extras/fontconfig/fc-lang/fclang.h 2003-06-04 18:29:38.000000000 +0200
  272. +++ xc-p/extras/fontconfig/fc-lang/fclang.h 2004-11-11 22:22:24.000000000 +0100
  273. @@ -1,5 +1,7 @@
  274. /*
  275. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  276. + * $RCSId: xc/lib/fontconfig/fc-lang/fclang.tmpl.h,v 1.1 2002/07/06 23:21:36 keithp Exp $
  277. + *
  278. + * Copyright � 2002 Keith Packard
  279. *
  280. * Permission to use, copy, modify, distribute, and sell this software and its
  281. * documentation for any purpose is hereby granted without fee, provided that
  282. @@ -19,11 +21,10 @@
  283. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  284. * PERFORMANCE OF THIS SOFTWARE.
  285. */
  286. -/* $XFree86: xc/extras/fontconfig/fc-lang/fclang.h,v 1.2 2003/06/04 16:29:38 dawes Exp $ */
  287. -/* total size: 877 unique leaves: 599 */
  288. +/* total size: 881 unique leaves: 602 */
  289. -static const FcCharLeaf leaves[599] = {
  290. +static const FcCharLeaf leaves[602] = {
  291. { { /* 0 */
  292. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  293. 0x00000000, 0x00000000, 0x08104404, 0x08104404,
  294. @@ -41,11 +42,11 @@
  295. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  296. } },
  297. { { /* 4 */
  298. - 0xffffff7f, 0xffffffff, 0x3d7f3d7f, 0xffffffff,
  299. - 0xffff3d7f, 0x7f3d7fff, 0xff7f7f3d, 0xffff7fff,
  300. + 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0x00ff00ff,
  301. + 0x00ff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7f00,
  302. } },
  303. { { /* 5 */
  304. - 0x7f3d7fff, 0xffffffff, 0x07ffff7f, 0x00000000,
  305. + 0x003d7f00, 0xffff01ff, 0x007fff7f, 0x00000000,
  306. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  307. } },
  308. { { /* 6 */
  309. @@ -213,8 +214,8 @@
  310. 0x00000000, 0x00000000, 0x90400010, 0x10400010,
  311. } },
  312. { { /* 47 */
  313. - 0x00000000, 0x00000000, 0x00000000, 0x44300000,
  314. - 0xffffd7f0, 0xfffffffb, 0x00007fff, 0x00000000,
  315. + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  316. + 0xffffd740, 0xfffffffb, 0x00007fff, 0x00000000,
  317. } },
  318. { { /* 48 */
  319. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  320. @@ -1313,1110 +1314,1122 @@
  321. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  322. } },
  323. { { /* 322 */
  324. + 0xff7fff7f, 0xff01ff00, 0x3dff3d7f, 0xffff7fff,
  325. + 0xffff0000, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff,
  326. + } },
  327. + { { /* 323 */
  328. + 0x003d7fff, 0xffffffff, 0x007fff00, 0x00000000,
  329. + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  330. + } },
  331. + { { /* 324 */
  332. + 0xff7fff7f, 0xff01ff00, 0x00003d7f, 0xffff7fff,
  333. + 0x00ff0000, 0x003d7f7f, 0xff7f7f00, 0x00ff7f00,
  334. + } },
  335. + { { /* 325 */
  336. 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
  337. 0x00c00000, 0x0000c00c, 0x03000000, 0x00000000,
  338. } },
  339. - { { /* 323 */
  340. + { { /* 326 */
  341. 0x000fdfff, 0x00000000, 0x00000000, 0x00000000,
  342. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  343. } },
  344. - { { /* 324 */
  345. + { { /* 327 */
  346. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  347. 0x00000000, 0x00000000, 0x00100400, 0x00100400,
  348. } },
  349. - { { /* 325 */
  350. + { { /* 328 */
  351. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  352. 0x00000000, 0x00000000, 0x18404084, 0x18404084,
  353. } },
  354. - { { /* 326 */
  355. + { { /* 329 */
  356. 0xc0000000, 0x00030000, 0xc0000000, 0x00000000,
  357. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  358. } },
  359. - { { /* 327 */
  360. + { { /* 330 */
  361. 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
  362. 0x00c00000, 0x0c00c00c, 0x03000000, 0x00000000,
  363. } },
  364. - { { /* 328 */
  365. + { { /* 331 */
  366. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  367. 0x00000000, 0x00000000, 0x00220008, 0x00220008,
  368. } },
  369. - { { /* 329 */
  370. + { { /* 332 */
  371. 0x00000000, 0x00000300, 0x00000000, 0x00000300,
  372. 0x00010040, 0x00000000, 0x00000000, 0x00000000,
  373. } },
  374. - { { /* 330 */
  375. + { { /* 333 */
  376. 0x00000000, 0x00000000, 0x08100000, 0x00000000,
  377. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  378. } },
  379. - { { /* 331 */
  380. + { { /* 334 */
  381. 0x00000048, 0x00000200, 0x00000000, 0x00000000,
  382. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  383. } },
  384. - { { /* 332 */
  385. + { { /* 335 */
  386. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  387. 0x00000000, 0x30000000, 0x00000000, 0x03000000,
  388. } },
  389. - { { /* 333 */
  390. + { { /* 336 */
  391. 0xffff00d0, 0xffffffff, 0x00d0ffff, 0x00000000,
  392. 0x00030000, 0x00000000, 0x00000000, 0x00000000,
  393. } },
  394. - { { /* 334 */
  395. + { { /* 337 */
  396. 0xffff0002, 0xffffe5ff, 0x0002e5ff, 0x00000000,
  397. 0x0c0c0000, 0x000c0000, 0x00000000, 0x00030000,
  398. } },
  399. - { { /* 335 */
  400. + { { /* 338 */
  401. 0x000c0000, 0x30000000, 0x00000c30, 0x00030000,
  402. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  403. } },
  404. - { { /* 336 */
  405. + { { /* 339 */
  406. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  407. 0x00000000, 0x00000000, 0x263c370f, 0x263c370f,
  408. } },
  409. - { { /* 337 */
  410. + { { /* 340 */
  411. 0x0003000c, 0x00000300, 0x00000000, 0x00000300,
  412. 0x00000000, 0x00018003, 0x00000000, 0x00000000,
  413. } },
  414. - { { /* 338 */
  415. + { { /* 341 */
  416. 0x0800024f, 0x00000008, 0x00000000, 0x00000000,
  417. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  418. } },
  419. - { { /* 339 */
  420. + { { /* 342 */
  421. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  422. 0x00000000, 0xffffffff, 0xffffffff, 0x03ffffff,
  423. } },
  424. - { { /* 340 */
  425. + { { /* 343 */
  426. 0x00000000, 0x00000000, 0x077dfffe, 0x077dfffe,
  427. 0x00000000, 0x00000000, 0x10400010, 0x10400010,
  428. } },
  429. - { { /* 341 */
  430. + { { /* 344 */
  431. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  432. 0x00000000, 0x00000000, 0x10400010, 0x10400010,
  433. } },
  434. - { { /* 342 */
  435. + { { /* 345 */
  436. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  437. 0x00000000, 0x00000000, 0x081047a4, 0x081047a4,
  438. } },
  439. - { { /* 343 */
  440. + { { /* 346 */
  441. 0x0c0030c0, 0x00000000, 0x0f30001e, 0x66000003,
  442. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  443. } },
  444. - { { /* 344 */
  445. + { { /* 347 */
  446. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  447. 0x00000000, 0x00000000, 0x000a0a09, 0x000a0a09,
  448. } },
  449. - { { /* 345 */
  450. + { { /* 348 */
  451. 0x00000000, 0x00000000, 0x00000c00, 0x00000000,
  452. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  453. } },
  454. - { { /* 346 */
  455. + { { /* 349 */
  456. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  457. 0x00000000, 0x00000000, 0x00400810, 0x00400810,
  458. } },
  459. - { { /* 347 */
  460. + { { /* 350 */
  461. 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
  462. 0x00000000, 0x00000000, 0x0e3c770f, 0x0e3c770f,
  463. } },
  464. - { { /* 348 */
  465. + { { /* 351 */
  466. 0x0c000000, 0x00000300, 0x00000018, 0x00000300,
  467. 0x00000000, 0x00000000, 0x001fe000, 0x03000000,
  468. } },
  469. - { { /* 349 */
  470. + { { /* 352 */
  471. 0x0000100f, 0x00000000, 0x00000000, 0x00000000,
  472. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  473. } },
  474. - { { /* 350 */
  475. + { { /* 353 */
  476. 0x00000000, 0xc0000000, 0x00000000, 0x0000000c,
  477. 0x00000000, 0x33000000, 0x00003000, 0x00000000,
  478. } },
  479. - { { /* 351 */
  480. + { { /* 354 */
  481. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  482. 0x00000000, 0x00000000, 0x00000280, 0x00000000,
  483. } },
  484. - { { /* 352 */
  485. + { { /* 355 */
  486. 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243,
  487. 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a,
  488. } },
  489. - { { /* 353 */
  490. + { { /* 356 */
  491. 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9,
  492. 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a,
  493. } },
  494. - { { /* 354 */
  495. + { { /* 357 */
  496. 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020,
  497. 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0,
  498. } },
  499. - { { /* 355 */
  500. + { { /* 358 */
  501. 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924,
  502. 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813,
  503. } },
  504. - { { /* 356 */
  505. + { { /* 359 */
  506. 0x2fc665cf, 0xafc96b11, 0x5053340f, 0xa00486a2,
  507. 0xe8090106, 0xc00e3f0f, 0x81450a88, 0xc6010010,
  508. } },
  509. - { { /* 357 */
  510. + { { /* 360 */
  511. 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf,
  512. 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79,
  513. } },
  514. - { { /* 358 */
  515. + { { /* 361 */
  516. 0xe8eff75a, 0x5b36fbcb, 0x1bfd0d49, 0x39ee0154,
  517. 0x2e75d855, 0xa91abfd8, 0xf6bff3d7, 0xb40c67e0,
  518. } },
  519. - { { /* 359 */
  520. + { { /* 362 */
  521. 0x081382c2, 0xd08bd49d, 0x1061065a, 0x59e074f2,
  522. 0xb3128f9f, 0x6aaa0080, 0xb05e3230, 0x60ac9d7a,
  523. } },
  524. - { { /* 360 */
  525. + { { /* 363 */
  526. 0xc900d303, 0x8a563098, 0x13907000, 0x18421f14,
  527. 0x0008c060, 0x10808008, 0xec900400, 0xe6332817,
  528. } },
  529. - { { /* 361 */
  530. + { { /* 364 */
  531. 0x90000758, 0x4e09f708, 0xfc83f485, 0x18c8af53,
  532. 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011,
  533. } },
  534. - { { /* 362 */
  535. + { { /* 365 */
  536. 0x422228c5, 0x00210413, 0x41123010, 0x40001820,
  537. 0xc60c022b, 0x10000300, 0x00220022, 0x02495810,
  538. } },
  539. - { { /* 363 */
  540. + { { /* 366 */
  541. 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025,
  542. 0x42cc25de, 0x4a04cf38, 0x359f0c40, 0x8a001128,
  543. } },
  544. - { { /* 364 */
  545. + { { /* 367 */
  546. 0x910a13fa, 0x10560229, 0x04200641, 0x84f00484,
  547. 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b,
  548. } },
  549. - { { /* 365 */
  550. + { { /* 368 */
  551. 0x00c00200, 0x00940000, 0xbfbb0001, 0x242b167c,
  552. 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132,
  553. } },
  554. - { { /* 366 */
  555. + { { /* 369 */
  556. 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c06b,
  557. 0x1fd33106, 0xa1aa3a0c, 0x02040812, 0x08012572,
  558. } },
  559. - { { /* 367 */
  560. + { { /* 370 */
  561. 0x485040cc, 0x601062d0, 0x29001c80, 0x00109a00,
  562. 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6,
  563. } },
  564. - { { /* 368 */
  565. + { { /* 371 */
  566. 0x3f73916e, 0x398260c0, 0x48301034, 0xbd5c0006,
  567. 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500,
  568. } },
  569. - { { /* 369 */
  570. + { { /* 372 */
  571. 0x89aa8d1f, 0x1602a6e1, 0x21ed0001, 0x1a8b3656,
  572. 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93,
  573. } },
  574. - { { /* 370 */
  575. + { { /* 373 */
  576. 0x3a74e47f, 0x98208fe3, 0x2625280e, 0xbf49bf9c,
  577. 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1,
  578. } },
  579. - { { /* 371 */
  580. + { { /* 374 */
  581. 0x8420e343, 0x800008d9, 0x20225500, 0x00a10184,
  582. 0x20104800, 0x40801380, 0x00160d04, 0x80200040,
  583. } },
  584. - { { /* 372 */
  585. + { { /* 375 */
  586. 0x8de7fd40, 0xe0985436, 0x091e7b8b, 0xd249fec8,
  587. 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec,
  588. } },
  589. - { { /* 373 */
  590. + { { /* 376 */
  591. 0xec424386, 0x26048d3f, 0xc021fa6c, 0x0cc2628e,
  592. 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b,
  593. } },
  594. - { { /* 374 */
  595. + { { /* 377 */
  596. 0x58199827, 0xa4103443, 0x411405f2, 0x07002280,
  597. 0x426600b4, 0x15a17210, 0x41856025, 0x00000054,
  598. } },
  599. - { { /* 375 */
  600. + { { /* 378 */
  601. 0x01040201, 0xcb70c820, 0x6a629320, 0x0095184c,
  602. 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c3f3e5,
  603. } },
  604. - { { /* 376 */
  605. + { { /* 379 */
  606. 0xa238d44d, 0x5072a1a1, 0x84fc980a, 0x44d1c152,
  607. 0x20c21094, 0x42104180, 0x3a000000, 0xd29d0240,
  608. } },
  609. - { { /* 377 */
  610. + { { /* 380 */
  611. 0xa8b12f01, 0x2432bd40, 0xd04bd34d, 0xd0ada723,
  612. 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225,
  613. } },
  614. - { { /* 378 */
  615. + { { /* 381 */
  616. 0x20cadfa1, 0x738c0602, 0x003b577f, 0x00d00bff,
  617. 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009,
  618. } },
  619. - { { /* 379 */
  620. + { { /* 382 */
  621. 0x80056822, 0xa2112011, 0x64900004, 0x13824849,
  622. 0x193023d5, 0x08922980, 0x88115402, 0xa0042001,
  623. } },
  624. - { { /* 380 */
  625. + { { /* 383 */
  626. 0x81800400, 0x60228502, 0x0b010090, 0x12020022,
  627. 0x00834011, 0x00001a01, 0x00000000, 0x00000000,
  628. } },
  629. - { { /* 381 */
  630. + { { /* 384 */
  631. 0x00000000, 0x4684009f, 0x020012c8, 0x1a0004fc,
  632. 0x0c4c2ede, 0x80b80402, 0x0afca826, 0x22288c02,
  633. } },
  634. - { { /* 382 */
  635. + { { /* 385 */
  636. 0x8f7ba0e0, 0x2135c7d6, 0xf8b106c7, 0x62550713,
  637. 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7debcd2f,
  638. } },
  639. - { { /* 383 */
  640. + { { /* 386 */
  641. 0x4e845892, 0x7a2e4ca0, 0x561eedea, 0x1190c649,
  642. 0xe83a5324, 0x8124cfdb, 0x634218f1, 0x1a8a5853,
  643. } },
  644. - { { /* 384 */
  645. + { { /* 387 */
  646. 0x24d37420, 0x0514aa3b, 0x89586018, 0xc0004800,
  647. 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377,
  648. } },
  649. - { { /* 385 */
  650. + { { /* 388 */
  651. 0x00388244, 0x404aae11, 0x510028c0, 0x15146044,
  652. 0x10007310, 0x02480082, 0x40060205, 0x0000c003,
  653. } },
  654. - { { /* 386 */
  655. + { { /* 389 */
  656. 0x0c020000, 0x02200008, 0x40009000, 0xd161b800,
  657. 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0,
  658. } },
  659. - { { /* 387 */
  660. + { { /* 390 */
  661. 0x07690600, 0x00438040, 0x50005420, 0x250c41d0,
  662. 0x83108410, 0x02281101, 0x00304008, 0x020040a1,
  663. } },
  664. - { { /* 388 */
  665. + { { /* 391 */
  666. 0x20000040, 0xabe31500, 0xaa443180, 0xc624c2c6,
  667. 0x8004ac13, 0x03d1b000, 0x4285611e, 0x1d9ff303,
  668. } },
  669. - { { /* 389 */
  670. + { { /* 392 */
  671. 0x78e8440a, 0xc3925e26, 0x00852000, 0x4000b001,
  672. 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1,
  673. } },
  674. - { { /* 390 */
  675. + { { /* 393 */
  676. 0x0c018668, 0x10795564, 0xdea00002, 0x40c12000,
  677. 0x5001488b, 0x04000380, 0x50040000, 0x80d0c05d,
  678. } },
  679. - { { /* 391 */
  680. + { { /* 394 */
  681. 0x970aa010, 0x4dafbb20, 0x1e10d921, 0x83140460,
  682. 0xa6d68848, 0x733fd83b, 0x497427bc, 0x92130ddc,
  683. } },
  684. - { { /* 392 */
  685. + { { /* 395 */
  686. 0x8ba1142b, 0xd1392e75, 0x50503009, 0x69008808,
  687. 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020,
  688. } },
  689. - { { /* 393 */
  690. + { { /* 396 */
  691. 0x86002b92, 0x15e0a345, 0x0c03008b, 0xe200196e,
  692. 0x80067031, 0xa82916a5, 0x18802000, 0xe1487aac,
  693. } },
  694. - { { /* 394 */
  695. + { { /* 397 */
  696. 0xb5d63207, 0x5f9132e8, 0x20e550a1, 0x10807c00,
  697. 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100,
  698. } },
  699. - { { /* 395 */
  700. + { { /* 398 */
  701. 0x40080022, 0x5c100010, 0xfcc80343, 0x0580a1a5,
  702. 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8,
  703. } },
  704. - { { /* 396 */
  705. + { { /* 399 */
  706. 0x4490684d, 0xba880009, 0x00820040, 0x87d10000,
  707. 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069,
  708. } },
  709. - { { /* 397 */
  710. + { { /* 400 */
  711. 0x4a328d58, 0x550a5d71, 0x2d579aa0, 0x4aa64005,
  712. 0x30b12021, 0x01123fc6, 0x260a10c2, 0x50824462,
  713. } },
  714. - { { /* 398 */
  715. + { { /* 401 */
  716. 0x80409880, 0x810004c0, 0x00002003, 0x38180000,
  717. 0xf1a60200, 0x720e4434, 0x92e035a2, 0x09008101,
  718. } },
  719. - { { /* 399 */
  720. + { { /* 402 */
  721. 0x00000400, 0x00008885, 0x00000000, 0x00804000,
  722. 0x00000000, 0x00004040, 0x00000000, 0x00000000,
  723. } },
  724. - { { /* 400 */
  725. + { { /* 403 */
  726. 0x00000000, 0x08000000, 0x00000082, 0x00000000,
  727. 0x88000004, 0xe7efbfff, 0xffbfffff, 0xfdffefef,
  728. } },
  729. - { { /* 401 */
  730. + { { /* 404 */
  731. 0xbffefbff, 0x057fffff, 0x85b30034, 0x42164706,
  732. 0xe4105402, 0xb3058092, 0x81305422, 0x180b4263,
  733. } },
  734. - { { /* 402 */
  735. + { { /* 405 */
  736. 0x13f5387b, 0xa9ea07e5, 0x05143c4c, 0x80020600,
  737. 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fbfb2,
  738. } },
  739. - { { /* 403 */
  740. + { { /* 406 */
  741. 0x455fe644, 0x41469000, 0x063b1d40, 0xfe1362a1,
  742. 0x39028505, 0x0c080548, 0x0000144f, 0x58183488,
  743. } },
  744. - { { /* 404 */
  745. + { { /* 407 */
  746. 0xd8153077, 0x4bfbbd0e, 0x85008a90, 0xe61dc100,
  747. 0xb386ed14, 0x639bff72, 0xd9befd92, 0x0a92887b,
  748. } },
  749. - { { /* 405 */
  750. + { { /* 408 */
  751. 0x1cb2d3fe, 0x177ab980, 0xdc1782c9, 0x3980fffb,
  752. 0x590c4260, 0x37df0f01, 0xb15094a3, 0x23070623,
  753. } },
  754. - { { /* 406 */
  755. + { { /* 409 */
  756. 0x3102f85a, 0x310201f0, 0x1e820040, 0x056a3a0a,
  757. 0x12805b84, 0xa7148002, 0xa04b2612, 0x90011069,
  758. } },
  759. - { { /* 407 */
  760. + { { /* 410 */
  761. 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110,
  762. 0x180080b0, 0x0281c510, 0x10298202, 0x88000210,
  763. } },
  764. - { { /* 408 */
  765. + { { /* 411 */
  766. 0x00420020, 0x11000280, 0x4413e000, 0xfe025804,
  767. 0x30283c07, 0x04739798, 0xcb13ced1, 0x431f6210,
  768. } },
  769. - { { /* 409 */
  770. + { { /* 412 */
  771. 0x55ac278d, 0xc892422e, 0x02885380, 0x78514039,
  772. 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421,
  773. } },
  774. - { { /* 410 */
  775. + { { /* 413 */
  776. 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e,
  777. 0x10442936, 0x10822814, 0x83344266, 0x531b013c,
  778. } },
  779. - { { /* 411 */
  780. + { { /* 414 */
  781. 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040,
  782. 0x0000004a, 0x00000000, 0x5447dff6, 0x00088868,
  783. } },
  784. - { { /* 412 */
  785. + { { /* 415 */
  786. 0x00000081, 0x40000000, 0x00000100, 0x02000000,
  787. 0x00080600, 0x00000000, 0x00000000, 0x00000000,
  788. } },
  789. - { { /* 413 */
  790. + { { /* 416 */
  791. 0x00000080, 0x00000040, 0x00000000, 0x00001040,
  792. 0x00000000, 0xf7fdefff, 0xfffeff7f, 0xfffffbff,
  793. } },
  794. - { { /* 414 */
  795. + { { /* 417 */
  796. 0xbffffdff, 0x00ffffff, 0x042012c2, 0x07080c06,
  797. 0x01101624, 0x00000000, 0x00000000, 0x00000000,
  798. } },
  799. - { { /* 415 */
  800. + { { /* 418 */
  801. 0xe0000000, 0xfffffffe, 0x7f79ffff, 0x00f928df,
  802. 0x80120c32, 0xd53a0008, 0xecc2d858, 0x2fa89d18,
  803. } },
  804. - { { /* 416 */
  805. + { { /* 419 */
  806. 0xe0109620, 0x2622d60c, 0x02060f97, 0x9055b240,
  807. 0x501180a2, 0x04049800, 0x00004000, 0x00000000,
  808. } },
  809. - { { /* 417 */
  810. + { { /* 420 */
  811. 0x00000000, 0x00000000, 0x00000000, 0xfffffbc0,
  812. 0xdffbeffe, 0x62430b08, 0xfb3b41b6, 0x23896f74,
  813. } },
  814. - { { /* 418 */
  815. + { { /* 421 */
  816. 0xecd7ae7f, 0x5960e047, 0x098fa096, 0xa030612c,
  817. 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6,
  818. } },
  819. - { { /* 419 */
  820. + { { /* 422 */
  821. 0x42000014, 0x0202800c, 0x6485fe48, 0xe3f7d63e,
  822. 0x0c073aa0, 0x0430e40c, 0x1002f680, 0x00000000,
  823. } },
  824. - { { /* 420 */
  825. + { { /* 423 */
  826. 0x00000000, 0x00000000, 0x00000000, 0x00100000,
  827. 0x00004000, 0x00004000, 0x00000100, 0x00000000,
  828. } },
  829. - { { /* 421 */
  830. + { { /* 424 */
  831. 0x00000000, 0x40000000, 0x00000000, 0x00000400,
  832. 0x00008000, 0x00000000, 0x00400400, 0x00000000,
  833. } },
  834. - { { /* 422 */
  835. + { { /* 425 */
  836. 0x00000000, 0x40000000, 0x00000000, 0x00000800,
  837. 0xfebdffe0, 0xffffffff, 0xfbe77f7f, 0xf7ffffbf,
  838. } },
  839. - { { /* 423 */
  840. + { { /* 426 */
  841. 0xefffffff, 0xdff7ff7e, 0xfbdff6f7, 0x804fbffe,
  842. 0x00000000, 0x00000000, 0x00000000, 0x7fffef00,
  843. } },
  844. - { { /* 424 */
  845. + { { /* 427 */
  846. 0xb6f7ff7f, 0xb87e4406, 0x88313bf5, 0x00f41796,
  847. 0x1391a960, 0x72490080, 0x0024f2f3, 0x42c88701,
  848. } },
  849. - { { /* 425 */
  850. + { { /* 428 */
  851. 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227,
  852. 0x01162820, 0x0014a809, 0x00000000, 0x00683ec0,
  853. } },
  854. - { { /* 426 */
  855. + { { /* 429 */
  856. 0x00000000, 0x00000000, 0x00000000, 0xffe00000,
  857. 0xfddbb7ff, 0x000000f7, 0xc72e4000, 0x00000180,
  858. } },
  859. - { { /* 427 */
  860. + { { /* 430 */
  861. 0x00012000, 0x00004000, 0x00300000, 0xb4f7ffa8,
  862. 0x03ffadf3, 0x00000120, 0x00000000, 0x00000000,
  863. } },
  864. - { { /* 428 */
  865. + { { /* 431 */
  866. 0x00000000, 0x00000000, 0x00000000, 0xfffbf000,
  867. 0xfdcf9df7, 0x15c301bf, 0x810a1827, 0x0a00a842,
  868. } },
  869. - { { /* 429 */
  870. + { { /* 432 */
  871. 0x80088108, 0x18048008, 0x0012a3be, 0x00000000,
  872. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  873. } },
  874. - { { /* 430 */
  875. + { { /* 433 */
  876. 0x00000000, 0x00000000, 0x00000000, 0x90000000,
  877. 0xdc3769e6, 0x3dff6bff, 0xf3f9fcf8, 0x00000004,
  878. } },
  879. - { { /* 431 */
  880. + { { /* 434 */
  881. 0x80000000, 0xe7eebf6f, 0x5da2dffe, 0xc00b3fd8,
  882. 0xa00c0984, 0x69100040, 0xb912e210, 0x5a0086a5,
  883. } },
  884. - { { /* 432 */
  885. + { { /* 435 */
  886. 0x02896800, 0x6a809005, 0x00030010, 0x80000000,
  887. 0x8e001ff9, 0x00000001, 0x00000000, 0x00000000,
  888. } },
  889. - { { /* 433 */
  890. + { { /* 436 */
  891. 0x14000010, 0xa0c09512, 0x0c000200, 0x01000400,
  892. 0x050002a3, 0x98800009, 0x00004000, 0x01004c00,
  893. } },
  894. - { { /* 434 */
  895. + { { /* 437 */
  896. 0x04800008, 0x02840300, 0x00000824, 0x00040000,
  897. 0x00000400, 0x20010904, 0x00001100, 0x22050030,
  898. } },
  899. - { { /* 435 */
  900. + { { /* 438 */
  901. 0x00000108, 0x08104000, 0x01400000, 0x00001040,
  902. 0x00010102, 0x10000040, 0x82012000, 0x10100002,
  903. } },
  904. - { { /* 436 */
  905. + { { /* 439 */
  906. 0x00006002, 0x00000800, 0x00400000, 0x02100401,
  907. 0x14400144, 0x013c4980, 0x880e8288, 0x50102014,
  908. } },
  909. - { { /* 437 */
  910. + { { /* 440 */
  911. 0x80000824, 0x101000c1, 0x02800000, 0x02080101,
  912. 0x04118000, 0x02200112, 0x00031020, 0x02000003,
  913. } },
  914. - { { /* 438 */
  915. + { { /* 441 */
  916. 0x00000002, 0x090c1090, 0xa0004004, 0x60102290,
  917. 0x00080000, 0x00414f45, 0x07071026, 0x40c00001,
  918. } },
  919. - { { /* 439 */
  920. + { { /* 442 */
  921. 0x04580000, 0x0014800a, 0x00002800, 0x00002600,
  922. 0x50988020, 0x02140018, 0x04013800, 0x00008008,
  923. } },
  924. - { { /* 440 */
  925. + { { /* 443 */
  926. 0x41082004, 0x80000928, 0x20080280, 0x020e0a00,
  927. 0x00010040, 0x16110200, 0x41800002, 0x08231400,
  928. } },
  929. - { { /* 441 */
  930. + { { /* 444 */
  931. 0x40020020, 0x0080202f, 0x2015a008, 0x1c000002,
  932. 0xc0040e00, 0x82028012, 0x00400000, 0x2002a004,
  933. } },
  934. - { { /* 442 */
  935. + { { /* 445 */
  936. 0x20200001, 0xa0040000, 0x8890004c, 0xc4000080,
  937. 0x10012500, 0x48100482, 0x60800110, 0x40008040,
  938. } },
  939. - { { /* 443 */
  940. + { { /* 446 */
  941. 0x00040008, 0x04000044, 0x90000091, 0x000c1200,
  942. 0x06040000, 0x08610480, 0x10010800, 0x080d0001,
  943. } },
  944. - { { /* 444 */
  945. + { { /* 447 */
  946. 0x800204b4, 0x00140000, 0x00000000, 0x00200020,
  947. 0x84100200, 0x01811000, 0x02000210, 0x03018800,
  948. } },
  949. - { { /* 445 */
  950. + { { /* 448 */
  951. 0x04042804, 0x20001c92, 0x02100020, 0x4202490a,
  952. 0x02420146, 0x00000803, 0x0008c008, 0x44050010,
  953. } },
  954. - { { /* 446 */
  955. + { { /* 449 */
  956. 0x80222000, 0x00000800, 0x00008452, 0x10502140,
  957. 0xe0410005, 0x00000400, 0x00a00008, 0x80080000,
  958. } },
  959. - { { /* 447 */
  960. + { { /* 450 */
  961. 0x50180020, 0x00000009, 0x40080600, 0x00000000,
  962. 0x56000020, 0x04000000, 0x00020006, 0x00208220,
  963. } },
  964. - { { /* 448 */
  965. + { { /* 451 */
  966. 0x01210000, 0x40009000, 0x08c00140, 0x08110000,
  967. 0x00004820, 0x02400810, 0x08800002, 0x00200000,
  968. } },
  969. - { { /* 449 */
  970. + { { /* 452 */
  971. 0x00040a00, 0x00004000, 0x40000104, 0x84000000,
  972. 0x02040048, 0x20000000, 0x00012000, 0x1b100000,
  973. } },
  974. - { { /* 450 */
  975. + { { /* 453 */
  976. 0x00007000, 0x04000020, 0x10032000, 0x0804000a,
  977. 0x00000008, 0x04020090, 0x88000014, 0x00000000,
  978. } },
  979. - { { /* 451 */
  980. + { { /* 454 */
  981. 0x00000000, 0x08020008, 0x00040400, 0x40a00000,
  982. 0x40000000, 0x00080090, 0x40800000, 0x20000388,
  983. } },
  984. - { { /* 452 */
  985. + { { /* 455 */
  986. 0x02001080, 0x20010004, 0x12010004, 0x20008011,
  987. 0x13200082, 0x02800000, 0x04098001, 0x00000004,
  988. } },
  989. - { { /* 453 */
  990. + { { /* 456 */
  991. 0x00000000, 0x02801000, 0x00001000, 0x00000100,
  992. 0x20010024, 0x00000050, 0x80200028, 0x00000020,
  993. } },
  994. - { { /* 454 */
  995. + { { /* 457 */
  996. 0x01000000, 0x00a24000, 0x00000000, 0x82001010,
  997. 0x00000800, 0x02000000, 0x40020002, 0x59000044,
  998. } },
  999. - { { /* 455 */
  1000. + { { /* 458 */
  1001. 0x00000080, 0x0d040000, 0x04000000, 0x10020000,
  1002. 0x00022000, 0x00508000, 0x20080001, 0x000004a2,
  1003. } },
  1004. - { { /* 456 */
  1005. + { { /* 459 */
  1006. 0xc0020400, 0x00310000, 0x80002000, 0x00002800,
  1007. 0x00000b60, 0x40200000, 0x00120000, 0x80000009,
  1008. } },
  1009. - { { /* 457 */
  1010. + { { /* 460 */
  1011. 0x41000000, 0x00010008, 0x00880910, 0x20080888,
  1012. 0x04044020, 0x80482010, 0x00006000, 0x00020000,
  1013. } },
  1014. - { { /* 458 */
  1015. + { { /* 461 */
  1016. 0x42405004, 0x00400020, 0x00000010, 0x00000886,
  1017. 0x00008000, 0x80021011, 0x00c00000, 0x42000000,
  1018. } },
  1019. - { { /* 459 */
  1020. + { { /* 462 */
  1021. 0x4801201f, 0x40c00004, 0x20600480, 0x00000020,
  1022. 0x01000110, 0x22400040, 0x00000428, 0x00000000,
  1023. } },
  1024. - { { /* 460 */
  1025. + { { /* 463 */
  1026. 0x0f00020f, 0x40401000, 0x00200048, 0x000c0092,
  1027. 0x81000421, 0x00040004, 0x00620001, 0x06000202,
  1028. } },
  1029. - { { /* 461 */
  1030. + { { /* 464 */
  1031. 0x14001808, 0x00083800, 0x008c1028, 0x04120028,
  1032. 0x22008404, 0x40260880, 0x01100700, 0x00400000,
  1033. } },
  1034. - { { /* 462 */
  1035. + { { /* 465 */
  1036. 0x20000020, 0x00200000, 0x00840000, 0x04108000,
  1037. 0x00000002, 0x00000000, 0x10000002, 0x04000402,
  1038. } },
  1039. - { { /* 463 */
  1040. + { { /* 466 */
  1041. 0x10000000, 0x26a20000, 0x05000200, 0x82204000,
  1042. 0x80000000, 0x00048404, 0x80004800, 0x80000400,
  1043. } },
  1044. - { { /* 464 */
  1045. + { { /* 467 */
  1046. 0x00000064, 0x00000050, 0x18804000, 0x00060000,
  1047. 0x00408002, 0x02020030, 0x00000000, 0x40000000,
  1048. } },
  1049. - { { /* 465 */
  1050. + { { /* 468 */
  1051. 0x01208414, 0x00000600, 0x02018000, 0x10400000,
  1052. 0x04000840, 0x09200000, 0x2e000000, 0x04000304,
  1053. } },
  1054. - { { /* 466 */
  1055. + { { /* 469 */
  1056. 0x00c01810, 0x20100010, 0x10400010, 0x02100000,
  1057. 0xa0000402, 0x48200000, 0x06080000, 0x01400000,
  1058. } },
  1059. - { { /* 467 */
  1060. + { { /* 470 */
  1061. 0x40000008, 0x00001000, 0x10112800, 0xc2a09080,
  1062. 0x00008a02, 0x3a0000e9, 0x80611011, 0x40220000,
  1063. } },
  1064. - { { /* 468 */
  1065. + { { /* 471 */
  1066. 0x20000020, 0x48381a00, 0x00028421, 0x54ea0800,
  1067. 0x01425100, 0x0490200c, 0x20020000, 0x00600800,
  1068. } },
  1069. - { { /* 469 */
  1070. + { { /* 472 */
  1071. 0x00e0c201, 0x00004810, 0x10a10001, 0x00000040,
  1072. 0x80108084, 0x00042000, 0x00002000, 0x00000004,
  1073. } },
  1074. - { { /* 470 */
  1075. + { { /* 473 */
  1076. 0x00010014, 0x03005d00, 0x00008102, 0x00120000,
  1077. 0x51009000, 0x04000480, 0x0021c200, 0x0a888056,
  1078. } },
  1079. - { { /* 471 */
  1080. + { { /* 474 */
  1081. 0xd2b60004, 0x13800000, 0x204803a8, 0x04501921,
  1082. 0x0a003004, 0x02100010, 0x00091100, 0x01070080,
  1083. } },
  1084. - { { /* 472 */
  1085. + { { /* 475 */
  1086. 0x42004020, 0x08300000, 0x002a2444, 0x04046081,
  1087. 0x40046008, 0x00120000, 0x10000108, 0x00000000,
  1088. } },
  1089. - { { /* 473 */
  1090. + { { /* 476 */
  1091. 0x00000084, 0x08001000, 0x0012e001, 0x045880c0,
  1092. 0x00010000, 0x00800022, 0x02401000, 0x00000000,
  1093. } },
  1094. - { { /* 474 */
  1095. + { { /* 477 */
  1096. 0x4000d000, 0x00000850, 0x01000009, 0x0d840000,
  1097. 0x01080000, 0x42008000, 0x20000828, 0x40100040,
  1098. } },
  1099. - { { /* 475 */
  1100. + { { /* 478 */
  1101. 0x51000100, 0x32000000, 0x001a0894, 0x04000040,
  1102. 0x00002102, 0x03428000, 0x018c0080, 0x00234010,
  1103. } },
  1104. - { { /* 476 */
  1105. + { { /* 479 */
  1106. 0x00000040, 0x185c4000, 0x03000000, 0x40020004,
  1107. 0xa20200c9, 0x00000220, 0x00101050, 0x00120004,
  1108. } },
  1109. - { { /* 477 */
  1110. + { { /* 480 */
  1111. 0x00000040, 0x44002400, 0x00000228, 0x20000020,
  1112. 0x000a0008, 0x18010000, 0x3c08830c, 0x40000684,
  1113. } },
  1114. - { { /* 478 */
  1115. + { { /* 481 */
  1116. 0x80101800, 0x02000280, 0x0020000c, 0x08009004,
  1117. 0x00040000, 0x0004000c, 0x00018000, 0x14001000,
  1118. } },
  1119. - { { /* 479 */
  1120. + { { /* 482 */
  1121. 0x08240000, 0x00200000, 0x20420014, 0x58112000,
  1122. 0x10004048, 0x010050c0, 0x0408228c, 0x12282040,
  1123. } },
  1124. - { { /* 480 */
  1125. + { { /* 483 */
  1126. 0x00000000, 0x00000020, 0x24002000, 0x00000000,
  1127. 0x00800a00, 0x00080910, 0x1019a000, 0x60200030,
  1128. } },
  1129. - { { /* 481 */
  1130. + { { /* 484 */
  1131. 0x00000080, 0x00000080, 0x08000000, 0x800050a0,
  1132. 0x80044000, 0x04001010, 0x80008080, 0x00000000,
  1133. } },
  1134. - { { /* 482 */
  1135. + { { /* 485 */
  1136. 0x00000040, 0x00800000, 0x000c4283, 0x01020000,
  1137. 0x00888000, 0x00104008, 0x20000000, 0x04000080,
  1138. } },
  1139. - { { /* 483 */
  1140. + { { /* 486 */
  1141. 0x20000104, 0x1802c021, 0x08100000, 0x0000004e,
  1142. 0x80000001, 0x30c00080, 0x00000040, 0x00401200,
  1143. } },
  1144. - { { /* 484 */
  1145. + { { /* 487 */
  1146. 0x04945288, 0x00940400, 0x06400104, 0x10002000,
  1147. 0x00080010, 0x00400420, 0x00000102, 0x00408010,
  1148. } },
  1149. - { { /* 485 */
  1150. + { { /* 488 */
  1151. 0x05000000, 0x40002240, 0x00100000, 0x0e400024,
  1152. 0x00000080, 0x80000440, 0x01018410, 0xb1804004,
  1153. } },
  1154. - { { /* 486 */
  1155. + { { /* 489 */
  1156. 0x25000800, 0x20000000, 0x00800000, 0x0000804c,
  1157. 0x10020020, 0x42001000, 0x00082000, 0x00002000,
  1158. } },
  1159. - { { /* 487 */
  1160. + { { /* 490 */
  1161. 0x11500020, 0x40004053, 0x11280500, 0x80060014,
  1162. 0x004c0101, 0x60002008, 0x44000000, 0x01000036,
  1163. } },
  1164. - { { /* 488 */
  1165. + { { /* 491 */
  1166. 0x00010028, 0x01180000, 0x84041804, 0x00098000,
  1167. 0x00800000, 0x00000000, 0x00400002, 0x10004001,
  1168. } },
  1169. - { { /* 489 */
  1170. + { { /* 492 */
  1171. 0x0051a004, 0x00008100, 0x00000024, 0x40041000,
  1172. 0x00040000, 0x00042001, 0x00000000, 0x00008000,
  1173. } },
  1174. - { { /* 490 */
  1175. + { { /* 493 */
  1176. 0x00000000, 0x00000000, 0x00000000, 0x20030000,
  1177. 0x00001840, 0x00020220, 0x04404002, 0x00204000,
  1178. } },
  1179. - { { /* 491 */
  1180. + { { /* 494 */
  1181. 0x01008010, 0x00002080, 0x40008064, 0x00004031,
  1182. 0x10018090, 0x80304001, 0x000080a0, 0x80200040,
  1183. } },
  1184. - { { /* 492 */
  1185. + { { /* 495 */
  1186. 0x00000001, 0x00000010, 0x00102088, 0x00800020,
  1187. 0x00120681, 0x100002a0, 0x00000042, 0x00000080,
  1188. } },
  1189. - { { /* 493 */
  1190. + { { /* 496 */
  1191. 0x10000000, 0x21000a00, 0x00000200, 0x40000080,
  1192. 0x10110000, 0x00108200, 0x04000000, 0x00000400,
  1193. } },
  1194. - { { /* 494 */
  1195. + { { /* 497 */
  1196. 0x80001000, 0x80002000, 0x40003008, 0x00000204,
  1197. 0x0801000a, 0x40000001, 0x00000000, 0x00000004,
  1198. } },
  1199. - { { /* 495 */
  1200. + { { /* 498 */
  1201. 0x00000000, 0x00000000, 0x00020000, 0x00000000,
  1202. 0x88000000, 0x00002000, 0x08502000, 0x00840a00,
  1203. } },
  1204. - { { /* 496 */
  1205. + { { /* 499 */
  1206. 0x31061808, 0x00000000, 0x00000000, 0x04000000,
  1207. 0x00000004, 0x00000240, 0x00100009, 0x00000000,
  1208. } },
  1209. - { { /* 497 */
  1210. + { { /* 500 */
  1211. 0x00004002, 0x04002500, 0x00008040, 0x40a20100,
  1212. 0x00000001, 0x12412080, 0x04004008, 0x00042014,
  1213. } },
  1214. - { { /* 498 */
  1215. + { { /* 501 */
  1216. 0x02000000, 0x00012000, 0x10000402, 0x000040c0,
  1217. 0x00080000, 0x5fe800a1, 0x04019402, 0x02000000,
  1218. } },
  1219. - { { /* 499 */
  1220. + { { /* 502 */
  1221. 0x00040100, 0x00880000, 0x00401000, 0x00001012,
  1222. 0x00000000, 0x08004100, 0x00000010, 0x00000000,
  1223. } },
  1224. - { { /* 500 */
  1225. + { { /* 503 */
  1226. 0x00000000, 0x00000000, 0x52020000, 0x10410080,
  1227. 0x00005000, 0x08400200, 0x80400010, 0x44400020,
  1228. } },
  1229. - { { /* 501 */
  1230. + { { /* 504 */
  1231. 0x00084100, 0x10200d02, 0xa1200012, 0x00804804,
  1232. 0x00008212, 0xc6024000, 0x08100000, 0x205c1828,
  1233. } },
  1234. - { { /* 502 */
  1235. + { { /* 505 */
  1236. 0x00000088, 0x00031000, 0x8000013f, 0x21184b44,
  1237. 0x100100f2, 0xa9002001, 0x08080840, 0x001b0001,
  1238. } },
  1239. - { { /* 503 */
  1240. + { { /* 506 */
  1241. 0x28800112, 0x400020f0, 0x0910200c, 0x0a0010a0,
  1242. 0x80000020, 0x00000004, 0x1000000a, 0x00400000,
  1243. } },
  1244. - { { /* 504 */
  1245. + { { /* 507 */
  1246. 0x00000000, 0x00002000, 0x00000080, 0x81000000,
  1247. 0x02c00020, 0x000004c5, 0x00000000, 0x00100100,
  1248. } },
  1249. - { { /* 505 */
  1250. + { { /* 508 */
  1251. 0x20000000, 0x01080000, 0x00400022, 0x08000200,
  1252. 0x00408002, 0x20400028, 0x00000000, 0x00100000,
  1253. } },
  1254. - { { /* 506 */
  1255. + { { /* 509 */
  1256. 0x08000008, 0x00420002, 0xa0a20003, 0x00022000,
  1257. 0x88000280, 0x65160000, 0x00040105, 0x00244041,
  1258. } },
  1259. - { { /* 507 */
  1260. + { { /* 510 */
  1261. 0x80300000, 0x00184008, 0x00000880, 0x00201140,
  1262. 0x00000000, 0x02900000, 0x50004588, 0x00221043,
  1263. } },
  1264. - { { /* 508 */
  1265. + { { /* 511 */
  1266. 0x12004000, 0x0b800000, 0x20002405, 0x0000000c,
  1267. 0x08000000, 0x11000410, 0x04000030, 0x00200043,
  1268. } },
  1269. - { { /* 509 */
  1270. + { { /* 512 */
  1271. 0x80011000, 0x18008042, 0x11000000, 0x00001008,
  1272. 0x00008000, 0x24440000, 0x00800000, 0x80100005,
  1273. } },
  1274. - { { /* 510 */
  1275. + { { /* 513 */
  1276. 0x00108204, 0x02102400, 0x00010001, 0x80000200,
  1277. 0xa080e80a, 0x00010000, 0x20008000, 0x80122200,
  1278. } },
  1279. - { { /* 511 */
  1280. + { { /* 514 */
  1281. 0x88211404, 0x04208041, 0x20088020, 0x18040000,
  1282. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  1283. } },
  1284. - { { /* 512 */
  1285. + { { /* 515 */
  1286. 0x00401004, 0x02100002, 0x40014210, 0x50006000,
  1287. 0x00080008, 0x20000820, 0x00100211, 0x10000000,
  1288. } },
  1289. - { { /* 513 */
  1290. + { { /* 516 */
  1291. 0x91005400, 0x00000000, 0x00000000, 0x08000000,
  1292. 0x41610032, 0xa0029d44, 0x000000d2, 0x41020004,
  1293. } },
  1294. - { { /* 514 */
  1295. + { { /* 517 */
  1296. 0x00800104, 0x020000c0, 0x04090030, 0x80000204,
  1297. 0x82004000, 0x00000020, 0x00000000, 0x00000000,
  1298. } },
  1299. - { { /* 515 */
  1300. + { { /* 518 */
  1301. 0x00000080, 0x00000000, 0x00000000, 0x00000000,
  1302. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  1303. } },
  1304. - { { /* 516 */
  1305. + { { /* 519 */
  1306. 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200,
  1307. 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a,
  1308. } },
  1309. - { { /* 517 */
  1310. + { { /* 520 */
  1311. 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f,
  1312. 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003,
  1313. } },
  1314. - { { /* 518 */
  1315. + { { /* 521 */
  1316. 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f,
  1317. 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9,
  1318. } },
  1319. - { { /* 519 */
  1320. + { { /* 522 */
  1321. 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae,
  1322. 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003,
  1323. } },
  1324. - { { /* 520 */
  1325. + { { /* 523 */
  1326. 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06,
  1327. 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c,
  1328. } },
  1329. - { { /* 521 */
  1330. + { { /* 524 */
  1331. 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b,
  1332. 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e,
  1333. } },
  1334. - { { /* 522 */
  1335. + { { /* 525 */
  1336. 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff,
  1337. 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7,
  1338. } },
  1339. - { { /* 523 */
  1340. + { { /* 526 */
  1341. 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e,
  1342. 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe,
  1343. } },
  1344. - { { /* 524 */
  1345. + { { /* 527 */
  1346. 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d,
  1347. 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3,
  1348. } },
  1349. - { { /* 525 */
  1350. + { { /* 528 */
  1351. 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56,
  1352. 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf,
  1353. } },
  1354. - { { /* 526 */
  1355. + { { /* 529 */
  1356. 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c,
  1357. 0xf11bcfef, 0xf40adb6b, 0xef7ec3e6, 0xf6109b9c,
  1358. } },
  1359. - { { /* 527 */
  1360. + { { /* 530 */
  1361. 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87,
  1362. 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b,
  1363. } },
  1364. - { { /* 528 */
  1365. + { { /* 531 */
  1366. 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5,
  1367. 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xabf87f6f,
  1368. } },
  1369. - { { /* 529 */
  1370. + { { /* 532 */
  1371. 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c,
  1372. 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff,
  1373. } },
  1374. - { { /* 530 */
  1375. + { { /* 533 */
  1376. 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd,
  1377. 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500,
  1378. } },
  1379. - { { /* 531 */
  1380. + { { /* 534 */
  1381. 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac,
  1382. 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7,
  1383. } },
  1384. - { { /* 532 */
  1385. + { { /* 535 */
  1386. 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf,
  1387. 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef,
  1388. } },
  1389. - { { /* 533 */
  1390. + { { /* 536 */
  1391. 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4,
  1392. 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b,
  1393. } },
  1394. - { { /* 534 */
  1395. + { { /* 537 */
  1396. 0x7efffe01, 0x02bcfff7, 0xef3932ff, 0x8005fffc,
  1397. 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057,
  1398. } },
  1399. - { { /* 535 */
  1400. + { { /* 538 */
  1401. 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee,
  1402. 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9,
  1403. } },
  1404. - { { /* 536 */
  1405. + { { /* 539 */
  1406. 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f,
  1407. 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800,
  1408. } },
  1409. - { { /* 537 */
  1410. + { { /* 540 */
  1411. 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0,
  1412. 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb,
  1413. } },
  1414. - { { /* 538 */
  1415. + { { /* 541 */
  1416. 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3,
  1417. 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d,
  1418. } },
  1419. - { { /* 539 */
  1420. + { { /* 542 */
  1421. 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc,
  1422. 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366,
  1423. } },
  1424. - { { /* 540 */
  1425. + { { /* 543 */
  1426. 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576,
  1427. 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59,
  1428. } },
  1429. - { { /* 541 */
  1430. + { { /* 544 */
  1431. 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401,
  1432. 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc,
  1433. } },
  1434. - { { /* 542 */
  1435. + { { /* 545 */
  1436. 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800,
  1437. 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb,
  1438. } },
  1439. - { { /* 543 */
  1440. + { { /* 546 */
  1441. 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d,
  1442. 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4,
  1443. } },
  1444. - { { /* 544 */
  1445. + { { /* 547 */
  1446. 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7,
  1447. 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3,
  1448. } },
  1449. - { { /* 545 */
  1450. + { { /* 548 */
  1451. 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff,
  1452. 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd,
  1453. } },
  1454. - { { /* 546 */
  1455. + { { /* 549 */
  1456. 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3,
  1457. 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf,
  1458. } },
  1459. - { { /* 547 */
  1460. + { { /* 550 */
  1461. 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff,
  1462. 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f,
  1463. } },
  1464. - { { /* 548 */
  1465. + { { /* 551 */
  1466. 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff,
  1467. 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800,
  1468. } },
  1469. - { { /* 549 */
  1470. + { { /* 552 */
  1471. 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf,
  1472. 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf,
  1473. } },
  1474. - { { /* 550 */
  1475. + { { /* 553 */
  1476. 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f,
  1477. 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017,
  1478. } },
  1479. - { { /* 551 */
  1480. + { { /* 554 */
  1481. 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff,
  1482. 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7,
  1483. } },
  1484. - { { /* 552 */
  1485. + { { /* 555 */
  1486. 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f,
  1487. 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b,
  1488. } },
  1489. - { { /* 553 */
  1490. + { { /* 556 */
  1491. 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7,
  1492. 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9,
  1493. } },
  1494. - { { /* 554 */
  1495. + { { /* 557 */
  1496. 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c,
  1497. 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f,
  1498. } },
  1499. - { { /* 555 */
  1500. + { { /* 558 */
  1501. 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c,
  1502. 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df,
  1503. } },
  1504. - { { /* 556 */
  1505. + { { /* 559 */
  1506. 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637,
  1507. 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa,
  1508. } },
  1509. - { { /* 557 */
  1510. + { { /* 560 */
  1511. 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef,
  1512. 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad,
  1513. } },
  1514. - { { /* 558 */
  1515. + { { /* 561 */
  1516. 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35,
  1517. 0xc7fad2f9, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af,
  1518. } },
  1519. - { { /* 559 */
  1520. + { { /* 562 */
  1521. 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb,
  1522. 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9,
  1523. } },
  1524. - { { /* 560 */
  1525. + { { /* 563 */
  1526. 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87,
  1527. 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879,
  1528. } },
  1529. - { { /* 561 */
  1530. + { { /* 564 */
  1531. 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb,
  1532. 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff,
  1533. } },
  1534. - { { /* 562 */
  1535. + { { /* 565 */
  1536. 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9,
  1537. 0xc1f63733, 0xfe3e812e, 0xf2f75d20, 0x69d7d585,
  1538. } },
  1539. - { { /* 563 */
  1540. + { { /* 566 */
  1541. 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce,
  1542. 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb,
  1543. } },
  1544. - { { /* 564 */
  1545. + { { /* 567 */
  1546. 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f,
  1547. 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000,
  1548. } },
  1549. - { { /* 565 */
  1550. + { { /* 568 */
  1551. 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb,
  1552. 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f,
  1553. } },
  1554. - { { /* 566 */
  1555. + { { /* 569 */
  1556. 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090,
  1557. 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b,
  1558. } },
  1559. - { { /* 567 */
  1560. + { { /* 570 */
  1561. 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7,
  1562. 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef,
  1563. } },
  1564. - { { /* 568 */
  1565. + { { /* 571 */
  1566. 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a,
  1567. 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb,
  1568. } },
  1569. - { { /* 569 */
  1570. + { { /* 572 */
  1571. 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000,
  1572. 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf,
  1573. } },
  1574. - { { /* 570 */
  1575. + { { /* 573 */
  1576. 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb,
  1577. 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80,
  1578. } },
  1579. - { { /* 571 */
  1580. + { { /* 574 */
  1581. 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff,
  1582. 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e,
  1583. } },
  1584. - { { /* 572 */
  1585. + { { /* 575 */
  1586. 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe,
  1587. 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c,
  1588. } },
  1589. - { { /* 573 */
  1590. + { { /* 576 */
  1591. 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff,
  1592. 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff,
  1593. } },
  1594. - { { /* 574 */
  1595. + { { /* 577 */
  1596. 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e,
  1597. 0xcfee7b0f, 0x77c61d96, 0xfff57e07, 0x7fdfd982,
  1598. } },
  1599. - { { /* 575 */
  1600. + { { /* 578 */
  1601. 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f,
  1602. 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f,
  1603. } },
  1604. - { { /* 576 */
  1605. + { { /* 579 */
  1606. 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f,
  1607. 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7,
  1608. } },
  1609. - { { /* 577 */
  1610. + { { /* 580 */
  1611. 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9,
  1612. 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000,
  1613. } },
  1614. - { { /* 578 */
  1615. + { { /* 581 */
  1616. 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76,
  1617. 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff,
  1618. } },
  1619. - { { /* 579 */
  1620. + { { /* 582 */
  1621. 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0,
  1622. 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf,
  1623. } },
  1624. - { { /* 580 */
  1625. + { { /* 583 */
  1626. 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff,
  1627. 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3,
  1628. } },
  1629. - { { /* 581 */
  1630. + { { /* 584 */
  1631. 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f,
  1632. 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f,
  1633. } },
  1634. - { { /* 582 */
  1635. + { { /* 585 */
  1636. 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d,
  1637. 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f,
  1638. } },
  1639. - { { /* 583 */
  1640. + { { /* 586 */
  1641. 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f,
  1642. 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc,
  1643. } },
  1644. - { { /* 584 */
  1645. + { { /* 587 */
  1646. 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb,
  1647. 0x3ffa7ded, 0x18fc1fff, 0xe3afffff, 0xdf83c7d3,
  1648. } },
  1649. - { { /* 585 */
  1650. + { { /* 588 */
  1651. 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb,
  1652. 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de,
  1653. } },
  1654. - { { /* 586 */
  1655. + { { /* 589 */
  1656. 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d,
  1657. 0x0000000f, 0x00000000, 0x00000000, 0x00000000,
  1658. } },
  1659. - { { /* 587 */
  1660. + { { /* 590 */
  1661. 0x00000000, 0x00000000, 0x00000000, 0x3c800000,
  1662. 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f,
  1663. } },
  1664. - { { /* 588 */
  1665. + { { /* 591 */
  1666. 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e,
  1667. 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e,
  1668. } },
  1669. - { { /* 589 */
  1670. + { { /* 592 */
  1671. 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747,
  1672. 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a,
  1673. } },
  1674. - { { /* 590 */
  1675. + { { /* 593 */
  1676. 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd,
  1677. 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac,
  1678. } },
  1679. - { { /* 591 */
  1680. + { { /* 594 */
  1681. 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002,
  1682. 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc,
  1683. } },
  1684. - { { /* 592 */
  1685. + { { /* 595 */
  1686. 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5,
  1687. 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca,
  1688. } },
  1689. - { { /* 593 */
  1690. + { { /* 596 */
  1691. 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3,
  1692. 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7,
  1693. } },
  1694. - { { /* 594 */
  1695. + { { /* 597 */
  1696. 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd,
  1697. 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0,
  1698. } },
  1699. - { { /* 595 */
  1700. + { { /* 598 */
  1701. 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83,
  1702. 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e,
  1703. } },
  1704. - { { /* 596 */
  1705. + { { /* 599 */
  1706. 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000,
  1707. 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1,
  1708. } },
  1709. - { { /* 597 */
  1710. + { { /* 600 */
  1711. 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb,
  1712. 0x11372000, 0x00000015, 0x00000000, 0x00000000,
  1713. } },
  1714. - { { /* 598 */
  1715. + { { /* 601 */
  1716. 0x00003000, 0x00000000, 0x00000000, 0x00000000,
  1717. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  1718. } },
  1719. @@ -3420,8 +3433,24 @@
  1720. 0x000e,
  1721. };
  1722. +static const FcCharLeaf *leaves_ti_er[2] = {
  1723. + L(322), L(323),
  1724. +};
  1725. +
  1726. +static const FcChar16 numbers_ti_er[2] = {
  1727. + 0x0012, 0x0013,
  1728. +};
  1729. +
  1730. +static const FcCharLeaf *leaves_tig[2] = {
  1731. + L(324), L(323),
  1732. +};
  1733. +
  1734. +static const FcChar16 numbers_tig[2] = {
  1735. + 0x0012, 0x0013,
  1736. +};
  1737. +
  1738. static const FcCharLeaf *leaves_tk[1] = {
  1739. - L(322),
  1740. + L(325),
  1741. };
  1742. static const FcChar16 numbers_tk[1] = {
  1743. @@ -3429,7 +3458,7 @@
  1744. };
  1745. static const FcCharLeaf *leaves_tl[1] = {
  1746. - L(323),
  1747. + L(326),
  1748. };
  1749. static const FcChar16 numbers_tl[1] = {
  1750. @@ -3437,7 +3466,7 @@
  1751. };
  1752. static const FcCharLeaf *leaves_tn[1] = {
  1753. - L(324),
  1754. + L(327),
  1755. };
  1756. static const FcChar16 numbers_tn[1] = {
  1757. @@ -3445,7 +3474,7 @@
  1758. };
  1759. static const FcCharLeaf *leaves_tr[2] = {
  1760. - L(325), L(326),
  1761. + L(328), L(329),
  1762. };
  1763. static const FcChar16 numbers_tr[2] = {
  1764. @@ -3453,7 +3482,7 @@
  1765. };
  1766. static const FcCharLeaf *leaves_tt[1] = {
  1767. - L(327),
  1768. + L(330),
  1769. };
  1770. static const FcChar16 numbers_tt[1] = {
  1771. @@ -3461,7 +3490,7 @@
  1772. };
  1773. static const FcCharLeaf *leaves_tw[5] = {
  1774. - L(328), L(329), L(330), L(331), L(332),
  1775. + L(331), L(332), L(333), L(334), L(335),
  1776. };
  1777. static const FcChar16 numbers_tw[5] = {
  1778. @@ -3469,7 +3498,7 @@
  1779. };
  1780. static const FcCharLeaf *leaves_uk[1] = {
  1781. - L(333),
  1782. + L(336),
  1783. };
  1784. static const FcChar16 numbers_uk[1] = {
  1785. @@ -3477,7 +3506,7 @@
  1786. };
  1787. static const FcCharLeaf *leaves_uz[1] = {
  1788. - L(334),
  1789. + L(337),
  1790. };
  1791. static const FcChar16 numbers_uz[1] = {
  1792. @@ -3485,7 +3514,7 @@
  1793. };
  1794. static const FcCharLeaf *leaves_ven[2] = {
  1795. - L( 15), L(335),
  1796. + L( 15), L(338),
  1797. };
  1798. static const FcChar16 numbers_ven[2] = {
  1799. @@ -3493,7 +3522,7 @@
  1800. };
  1801. static const FcCharLeaf *leaves_vi[4] = {
  1802. - L(336), L(337), L(338), L(339),
  1803. + L(339), L(340), L(341), L(342),
  1804. };
  1805. static const FcChar16 numbers_vi[4] = {
  1806. @@ -3501,7 +3530,7 @@
  1807. };
  1808. static const FcCharLeaf *leaves_vo[1] = {
  1809. - L(340),
  1810. + L(343),
  1811. };
  1812. static const FcChar16 numbers_vo[1] = {
  1813. @@ -3509,7 +3538,7 @@
  1814. };
  1815. static const FcCharLeaf *leaves_vot[2] = {
  1816. - L(341), L( 52),
  1817. + L(344), L( 52),
  1818. };
  1819. static const FcChar16 numbers_vot[2] = {
  1820. @@ -3517,7 +3546,7 @@
  1821. };
  1822. static const FcCharLeaf *leaves_wa[1] = {
  1823. - L(342),
  1824. + L(345),
  1825. };
  1826. static const FcChar16 numbers_wa[1] = {
  1827. @@ -3525,7 +3554,7 @@
  1828. };
  1829. static const FcCharLeaf *leaves_wen[2] = {
  1830. - L(294), L(343),
  1831. + L(294), L(346),
  1832. };
  1833. static const FcChar16 numbers_wen[2] = {
  1834. @@ -3533,7 +3562,7 @@
  1835. };
  1836. static const FcCharLeaf *leaves_wo[2] = {
  1837. - L(344), L(345),
  1838. + L(347), L(348),
  1839. };
  1840. static const FcChar16 numbers_wo[2] = {
  1841. @@ -3541,7 +3570,7 @@
  1842. };
  1843. static const FcCharLeaf *leaves_yap[1] = {
  1844. - L(346),
  1845. + L(349),
  1846. };
  1847. static const FcChar16 numbers_yap[1] = {
  1848. @@ -3549,7 +3578,7 @@
  1849. };
  1850. static const FcCharLeaf *leaves_yo[4] = {
  1851. - L(347), L(348), L(349), L(350),
  1852. + L(350), L(351), L(352), L(353),
  1853. };
  1854. static const FcChar16 numbers_yo[4] = {
  1855. @@ -3557,17 +3586,17 @@
  1856. };
  1857. static const FcCharLeaf *leaves_zh_cn[82] = {
  1858. - L(351), L(352), L(353), L(354), L(355), L(356), L(357), L(358),
  1859. - L(359), L(360), L(361), L(362), L(363), L(364), L(365), L(366),
  1860. - L(367), L(368), L(369), L(370), L(371), L(372), L(373), L(374),
  1861. - L(375), L(376), L(377), L(378), L(379), L(380), L(381), L(382),
  1862. - L(383), L(384), L(385), L(386), L(387), L(388), L(389), L(390),
  1863. - L(391), L(392), L(393), L(394), L(395), L(396), L(397), L(398),
  1864. - L(399), L(400), L(401), L(402), L(403), L(404), L(405), L(406),
  1865. - L(407), L(408), L(409), L(410), L(411), L(412), L(413), L(414),
  1866. - L(415), L(416), L(417), L(418), L(419), L(420), L(421), L(422),
  1867. - L(423), L(424), L(425), L(426), L(427), L(428), L(429), L(430),
  1868. - L(431), L(432),
  1869. + L(354), L(355), L(356), L(357), L(358), L(359), L(360), L(361),
  1870. + L(362), L(363), L(364), L(365), L(366), L(367), L(368), L(369),
  1871. + L(370), L(371), L(372), L(373), L(374), L(375), L(376), L(377),
  1872. + L(378), L(379), L(380), L(381), L(382), L(383), L(384), L(385),
  1873. + L(386), L(387), L(388), L(389), L(390), L(391), L(392), L(393),
  1874. + L(394), L(395), L(396), L(397), L(398), L(399), L(400), L(401),
  1875. + L(402), L(403), L(404), L(405), L(406), L(407), L(408), L(409),
  1876. + L(410), L(411), L(412), L(413), L(414), L(415), L(416), L(417),
  1877. + L(418), L(419), L(420), L(421), L(422), L(423), L(424), L(425),
  1878. + L(426), L(427), L(428), L(429), L(430), L(431), L(432), L(433),
  1879. + L(434), L(435),
  1880. };
  1881. static const FcChar16 numbers_zh_cn[82] = {
  1882. @@ -3585,17 +3614,17 @@
  1883. };
  1884. static const FcCharLeaf *leaves_zh_hk[83] = {
  1885. - L(433), L(434), L(435), L(436), L(437), L(438), L(439), L(440),
  1886. - L(441), L(442), L(443), L(444), L(445), L(446), L(447), L(448),
  1887. - L(449), L(450), L(451), L(452), L(453), L(454), L(455), L(456),
  1888. - L(457), L(458), L(459), L(460), L(461), L(462), L(463), L(464),
  1889. - L(465), L(466), L(467), L(468), L(469), L(470), L(471), L(472),
  1890. - L(473), L(474), L(475), L(476), L(477), L(478), L(479), L(480),
  1891. - L(481), L(482), L(483), L(484), L(485), L(486), L(487), L(488),
  1892. - L(489), L(490), L(491), L(492), L(493), L(494), L(495), L(496),
  1893. - L(497), L(498), L(499), L(500), L(501), L(502), L(503), L(504),
  1894. - L(505), L(506), L(507), L(508), L(509), L(510), L(511), L(512),
  1895. - L(513), L(514), L(515),
  1896. + L(436), L(437), L(438), L(439), L(440), L(441), L(442), L(443),
  1897. + L(444), L(445), L(446), L(447), L(448), L(449), L(450), L(451),
  1898. + L(452), L(453), L(454), L(455), L(456), L(457), L(458), L(459),
  1899. + L(460), L(461), L(462), L(463), L(464), L(465), L(466), L(467),
  1900. + L(468), L(469), L(470), L(471), L(472), L(473), L(474), L(475),
  1901. + L(476), L(477), L(478), L(479), L(480), L(481), L(482), L(483),
  1902. + L(484), L(485), L(486), L(487), L(488), L(489), L(490), L(491),
  1903. + L(492), L(493), L(494), L(495), L(496), L(497), L(498), L(499),
  1904. + L(500), L(501), L(502), L(503), L(504), L(505), L(506), L(507),
  1905. + L(508), L(509), L(510), L(511), L(512), L(513), L(514), L(515),
  1906. + L(516), L(517), L(518),
  1907. };
  1908. static const FcChar16 numbers_zh_hk[83] = {
  1909. @@ -3613,17 +3642,17 @@
  1910. };
  1911. static const FcCharLeaf *leaves_zh_mo[83] = {
  1912. - L(516), L(517), L(518), L(519), L(520), L(521), L(522), L(523),
  1913. - L(524), L(525), L(526), L(527), L(528), L(529), L(530), L(531),
  1914. - L(532), L(533), L(534), L(535), L(536), L(537), L(538), L(539),
  1915. - L(540), L(541), L(542), L(543), L(544), L(545), L(546), L(547),
  1916. - L(548), L(549), L(550), L(551), L(552), L(553), L(554), L(555),
  1917. - L(556), L(557), L(558), L(559), L(560), L(561), L(562), L(563),
  1918. - L(564), L(565), L(566), L(567), L(568), L(569), L(570), L(571),
  1919. - L(572), L(573), L(574), L(575), L(576), L(577), L(578), L(579),
  1920. - L(580), L(581), L(582), L(583), L(584), L(585), L(586), L(587),
  1921. - L(588), L(589), L(590), L(591), L(592), L(593), L(594), L(595),
  1922. - L(596), L(597), L(598),
  1923. + L(519), L(520), L(521), L(522), L(523), L(524), L(525), L(526),
  1924. + L(527), L(528), L(529), L(530), L(531), L(532), L(533), L(534),
  1925. + L(535), L(536), L(537), L(538), L(539), L(540), L(541), L(542),
  1926. + L(543), L(544), L(545), L(546), L(547), L(548), L(549), L(550),
  1927. + L(551), L(552), L(553), L(554), L(555), L(556), L(557), L(558),
  1928. + L(559), L(560), L(561), L(562), L(563), L(564), L(565), L(566),
  1929. + L(567), L(568), L(569), L(570), L(571), L(572), L(573), L(574),
  1930. + L(575), L(576), L(577), L(578), L(579), L(580), L(581), L(582),
  1931. + L(583), L(584), L(585), L(586), L(587), L(588), L(589), L(590),
  1932. + L(591), L(592), L(593), L(594), L(595), L(596), L(597), L(598),
  1933. + L(599), L(600), L(601),
  1934. };
  1935. static const FcChar16 numbers_zh_mo[83] = {
  1936. @@ -3931,8 +3960,12 @@
  1937. { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tg, (FcChar16 *) numbers_tg } },
  1938. { (FcChar8 *) "th",
  1939. { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_th, (FcChar16 *) numbers_th } },
  1940. - { (FcChar8 *) "ti",
  1941. - { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } },
  1942. + { (FcChar8 *) "ti-er",
  1943. + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ti_er, (FcChar16 *) numbers_ti_er } },
  1944. + { (FcChar8 *) "ti-et",
  1945. + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ti_er, (FcChar16 *) numbers_ti_er } },
  1946. + { (FcChar8 *) "tig",
  1947. + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_tig, (FcChar16 *) numbers_tig } },
  1948. { (FcChar8 *) "tk",
  1949. { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tk, (FcChar16 *) numbers_tk } },
  1950. { (FcChar8 *) "tl",
  1951. @@ -3995,11 +4028,41 @@
  1952. { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
  1953. };
  1954. -#define NUM_LANG_CHAR_SET 175
  1955. +#define NUM_LANG_CHAR_SET 177
  1956. #define NUM_LANG_SET_MAP 6
  1957. static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = {
  1958. - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00003e00, }, /* zh */
  1959. + { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00030000, 0x00000000, }, /* ti */
  1960. + { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000f800, }, /* zh */
  1961. +};
  1962. +
  1963. +#define NUM_COUNTRY_SET 2
  1964. +static const FcLangCharSetRange fcLangCharSetRanges[] = {
  1965. + { 0, 8 }, /* a */
  1966. + { 9, 21 }, /* b */
  1967. + { 22, 31 }, /* c */
  1968. + { 32, 34 }, /* d */
  1969. + { 35, 40 }, /* e */
  1970. + { 41, 48 }, /* f */
  1971. + { 49, 55 }, /* g */
  1972. + { 56, 63 }, /* h */
  1973. + { 64, 72 }, /* i */
  1974. + { 73, 73 }, /* j */
  1975. + { 74, 88 }, /* k */
  1976. + { 89, 94 }, /* l */
  1977. + { 95, 104 }, /* m */
  1978. + { 105, 110 }, /* n */
  1979. + { 111, 114 }, /* o */
  1980. + { 115, 116 }, /* p */
  1981. + { 117, 116 }, /* q */
  1982. + { 117, 119 }, /* r */
  1983. + { 120, 139 }, /* s */
  1984. + { 140, 155 }, /* t */
  1985. + { 156, 159 }, /* u */
  1986. + { 160, 163 }, /* v */
  1987. + { 164, 166 }, /* w */
  1988. + { 167, 167 }, /* x */
  1989. + { 168, 170 }, /* y */
  1990. + { 171, 176 }, /* z */
  1991. };
  1992. -#define NUM_COUNTRY_SET 1
  1993. diff -dur xc/extras/fontconfig/fc-lang/fclang.tmpl.h xc-p/extras/fontconfig/fc-lang/fclang.tmpl.h
  1994. --- xc/extras/fontconfig/fc-lang/fclang.tmpl.h 2003-09-25 13:01:18.000000000 +0200
  1995. +++ xc-p/extras/fontconfig/fc-lang/fclang.tmpl.h 2004-11-11 22:22:24.000000000 +0100
  1996. @@ -1,7 +1,7 @@
  1997. /*
  1998. - * $XFree86: xc/extras/fontconfig/fc-lang/fclang.tmpl.h,v 1.1.1.1 2003/06/04 02:56:47 dawes Exp $
  1999. + * $RCSId: xc/lib/fontconfig/fc-lang/fclang.tmpl.h,v 1.1 2002/07/06 23:21:36 keithp Exp $
  2000. *
  2001. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  2002. + * Copyright � 2002 Keith Packard
  2003. *
  2004. * Permission to use, copy, modify, distribute, and sell this software and its
  2005. * documentation for any purpose is hereby granted without fee, provided that
  2006. diff -dur xc/extras/fontconfig/fc-list/fc-list.c xc-p/extras/fontconfig/fc-list/fc-list.c
  2007. --- xc/extras/fontconfig/fc-list/fc-list.c 2003-09-25 13:01:21.000000000 +0200
  2008. +++ xc-p/extras/fontconfig/fc-list/fc-list.c 2004-11-11 22:22:24.000000000 +0100
  2009. @@ -1,5 +1,7 @@
  2010. /*
  2011. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  2012. + * $RCSId: xc/lib/fontconfig/fc-list/fc-list.c,v 1.5 2002/06/30 23:45:40 keithp Exp $
  2013. + *
  2014. + * Copyright � 2002 Keith Packard
  2015. *
  2016. * Permission to use, copy, modify, distribute, and sell this software and its
  2017. * documentation for any purpose is hereby granted without fee, provided that
  2018. @@ -19,7 +21,6 @@
  2019. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2020. * PERFORMANCE OF THIS SOFTWARE.
  2021. */
  2022. -/* $XFree86: xc/extras/fontconfig/fc-list/fc-list.c,v 1.3 2003/09/13 21:33:00 dawes Exp $ */
  2023. #include <fontconfig/fontconfig.h>
  2024. #include <stdio.h>
  2025. @@ -32,9 +33,6 @@
  2026. #define HAVE_GETOPT_LONG 1
  2027. #endif
  2028. #define HAVE_GETOPT 1
  2029. -#if defined(ISC) || defined(Lynx)
  2030. -#define HAVE_OPTARG_IN_UNISTD 0
  2031. -#endif
  2032. #endif
  2033. #ifndef HAVE_GETOPT
  2034. @@ -43,9 +41,6 @@
  2035. #ifndef HAVE_GETOPT_LONG
  2036. #define HAVE_GETOPT_LONG 0
  2037. #endif
  2038. -#ifndef HAVE_OPTARG_IN_UNISTD
  2039. -#define HAVE_OPTARG_IN_UNISTD HAVE_GETOPT
  2040. -#endif
  2041. #if HAVE_GETOPT_LONG
  2042. #undef _GNU_SOURCE
  2043. @@ -58,7 +53,7 @@
  2044. {NULL,0,0,0},
  2045. };
  2046. #else
  2047. -#if HAVE_GETOPT && !HAVE_OPTARG_IN_UNISTD
  2048. +#if HAVE_GETOPT
  2049. extern char *optarg;
  2050. extern int optind, opterr, optopt;
  2051. #endif
  2052. @@ -66,25 +61,20 @@
  2053. static void usage (char *program)
  2054. {
  2055. -#if HAVE_GETOPT_LONG || HAVE_GETOPT
  2056. - fprintf (stderr,
  2057. - "usage: %s [-V?] [--version] [--help] [pattern] {element ...} \n",
  2058. + fprintf (stderr, "usage: %s [-vV?] [--verbose] [--version] [--help] [pattern] {element ...} \n",
  2059. program);
  2060. fprintf (stderr, "List fonts matching [pattern]\n");
  2061. fprintf (stderr, "\n");
  2062. - fprintf (stderr,
  2063. - " -V, --version display font config version and exit\n");
  2064. + fprintf (stderr, " -v, --verbose display status information while busy\n");
  2065. + fprintf (stderr, " -V, --version display font config version and exit\n");
  2066. fprintf (stderr, " -?, --help display this help and exit\n");
  2067. -#else
  2068. - fprintf (stderr, "usage: %s [pattern] {element ...} \n", program);
  2069. - fprintf (stderr, "List fonts matching [pattern]\n");
  2070. -#endif
  2071. exit (1);
  2072. }
  2073. int
  2074. main (int argc, char **argv)
  2075. {
  2076. + int verbose = 0;
  2077. int i;
  2078. FcObjectSet *os = 0;
  2079. FcFontSet *fs;
  2080. @@ -104,7 +94,7 @@
  2081. FC_MAJOR, FC_MINOR, FC_REVISION);
  2082. exit (0);
  2083. case 'v':
  2084. - /* Ignore */
  2085. + verbose = 1;
  2086. break;
  2087. default:
  2088. usage (argv[0]);
  2089. diff -dur xc/extras/fontconfig/fontconfig/fcfreetype.h xc-p/extras/fontconfig/fontconfig/fcfreetype.h
  2090. --- xc/extras/fontconfig/fontconfig/fcfreetype.h 2003-11-21 06:56:14.000000000 +0100
  2091. +++ xc-p/extras/fontconfig/fontconfig/fcfreetype.h 2004-11-11 22:22:24.000000000 +0100
  2092. @@ -31,6 +31,9 @@
  2093. FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
  2094. FcCharSet *
  2095. +FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing);
  2096. +
  2097. +FcCharSet *
  2098. FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks);
  2099. FcResult
  2100. diff -dur xc/extras/fontconfig/fontconfig/fcprivate.h xc-p/extras/fontconfig/fontconfig/fcprivate.h
  2101. --- xc/extras/fontconfig/fontconfig/fcprivate.h 2003-06-04 18:29:39.000000000 +0200
  2102. +++ xc-p/extras/fontconfig/fontconfig/fcprivate.h 2004-11-11 22:22:24.000000000 +0100
  2103. @@ -1,5 +1,7 @@
  2104. /*
  2105. - * Copyright � 2001 Keith Packard, member of The XFree86 Project, Inc.
  2106. + * $RCSId: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.5 2002/08/19 19:32:04 keithp Exp $
  2107. + *
  2108. + * Copyright � 2001 Keith Packard
  2109. *
  2110. * Permission to use, copy, modify, distribute, and sell this software and its
  2111. * documentation for any purpose is hereby granted without fee, provided that
  2112. @@ -19,7 +21,6 @@
  2113. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2114. * PERFORMANCE OF THIS SOFTWARE.
  2115. */
  2116. -/* $XFree86: xc/extras/fontconfig/fontconfig/fcprivate.h,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  2117. #ifndef _FCPRIVATE_H_
  2118. #define _FCPRIVATE_H_
  2119. diff -dur xc/extras/fontconfig/fontconfig/fontconfig.h xc-p/extras/fontconfig/fontconfig/fontconfig.h
  2120. --- xc/extras/fontconfig/fontconfig/fontconfig.h 2003-09-25 13:01:21.000000000 +0200
  2121. +++ xc-p/extras/fontconfig/fontconfig/fontconfig.h 2004-11-11 22:22:24.000000000 +0100
  2122. @@ -1,7 +1,7 @@
  2123. /*
  2124. - * $XFree86: xc/extras/fontconfig/fontconfig/fontconfig.h,v 1.1.1.1 2003/06/04 02:57:42 dawes Exp $
  2125. + * $RCSId: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.30 2002/09/26 00:17:27 keithp Exp $
  2126. *
  2127. - * Copyright � 2001 Keith Packard, member of The XFree86 Project, Inc.
  2128. + * Copyright � 2001 Keith Packard
  2129. *
  2130. * Permission to use, copy, modify, distribute, and sell this software and its
  2131. * documentation for any purpose is hereby granted without fee, provided that
  2132. @@ -33,11 +33,14 @@
  2133. typedef int FcBool;
  2134. /*
  2135. - * Current Fontconfig version number
  2136. + * Current Fontconfig version number. This same number
  2137. + * must appear in the fontconfig configure.in file. Yes,
  2138. + * it'a a pain to synchronize version numbers like this.
  2139. */
  2140. -#define FC_MAJOR 1
  2141. -#define FC_MINOR 0
  2142. -#define FC_REVISION 2
  2143. +
  2144. +#define FC_MAJOR 2
  2145. +#define FC_MINOR 2
  2146. +#define FC_REVISION 1
  2147. #define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
  2148. @@ -70,6 +73,7 @@
  2149. #define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */
  2150. #define FC_AUTOHINT "autohint" /* Bool (false) */
  2151. #define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */
  2152. +#define FC_WIDTH "width" /* Int */
  2153. #define FC_FILE "file" /* String */
  2154. #define FC_INDEX "index" /* Int */
  2155. #define FC_FT_FACE "ftface" /* FT_Face */
  2156. @@ -93,19 +97,38 @@
  2157. #define FC_CHAR_HEIGHT "charheight"/* Int */
  2158. #define FC_MATRIX "matrix" /* FcMatrix */
  2159. -#define FC_WEIGHT_LIGHT 0
  2160. -#define FC_WEIGHT_MEDIUM 100
  2161. -#define FC_WEIGHT_DEMIBOLD 180
  2162. -#define FC_WEIGHT_BOLD 200
  2163. -#define FC_WEIGHT_BLACK 210
  2164. +#define FC_WEIGHT_THIN 0
  2165. +#define FC_WEIGHT_EXTRALIGHT 40
  2166. +#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT
  2167. +#define FC_WEIGHT_LIGHT 50
  2168. +#define FC_WEIGHT_REGULAR 80
  2169. +#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR
  2170. +#define FC_WEIGHT_MEDIUM 100
  2171. +#define FC_WEIGHT_DEMIBOLD 180
  2172. +#define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD
  2173. +#define FC_WEIGHT_BOLD 200
  2174. +#define FC_WEIGHT_EXTRABOLD 205
  2175. +#define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD
  2176. +#define FC_WEIGHT_BLACK 210
  2177. +#define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK
  2178. -#define FC_SLANT_ROMAN 0
  2179. -#define FC_SLANT_ITALIC 100
  2180. -#define FC_SLANT_OBLIQUE 110
  2181. +#define FC_SLANT_ROMAN 0
  2182. +#define FC_SLANT_ITALIC 100
  2183. +#define FC_SLANT_OBLIQUE 110
  2184. -#define FC_PROPORTIONAL 0
  2185. -#define FC_MONO 100
  2186. -#define FC_CHARCELL 110
  2187. +#define FC_WIDTH_ULTRACONDENSED 50
  2188. +#define FC_WIDTH_EXTRACONDENSED 63
  2189. +#define FC_WIDTH_CONDENSED 75
  2190. +#define FC_WIDTH_SEMICONDENSED 87
  2191. +#define FC_WIDTH_NORMAL 100
  2192. +#define FC_WIDTH_SEMIEXPANDED 113
  2193. +#define FC_WIDTH_EXPANDED 125
  2194. +#define FC_WIDTH_EXTRAEXPANDED 150
  2195. +#define FC_WIDTH_ULTRAEXPANDED 200
  2196. +
  2197. +#define FC_PROPORTIONAL 0
  2198. +#define FC_MONO 100
  2199. +#define FC_CHARCELL 110
  2200. /* sub-pixel order */
  2201. #define FC_RGBA_UNKNOWN 0
  2202. @@ -242,6 +265,12 @@
  2203. /* fccfg.c */
  2204. FcChar8 *
  2205. +FcConfigHome (void);
  2206. +
  2207. +FcBool
  2208. +FcConfigEnableHome (FcBool enable);
  2209. +
  2210. +FcChar8 *
  2211. FcConfigFilename (const FcChar8 *url);
  2212. FcConfig *
  2213. @@ -451,6 +480,9 @@
  2214. FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb);
  2215. FcBool
  2216. +FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb);
  2217. +
  2218. +FcBool
  2219. FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb);
  2220. FcChar32
  2221. @@ -694,7 +726,9 @@
  2222. FcChar8 *
  2223. FcStrCopyFilename (const FcChar8 *s);
  2224. -#define FcToLower(c) (('A' <= (c) && (c) <= 'Z') ? (c) - 'A' + 'a' : (c))
  2225. +#define FcIsUpper(c) (('A' <= (c) && (c) <= 'Z'))
  2226. +#define FcIsLower(c) (('a' <= (c) && (c) <= 'z'))
  2227. +#define FcToLower(c) (FcIsUpper(c) ? (c) - 'A' + 'a' : (c))
  2228. int
  2229. FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
  2230. diff -dur xc/extras/fontconfig/Imakefile xc-p/extras/fontconfig/Imakefile
  2231. --- xc/extras/fontconfig/Imakefile 2003-09-25 13:01:13.000000000 +0200
  2232. +++ xc-p/extras/fontconfig/Imakefile 2004-11-11 22:22:24.000000000 +0100
  2233. @@ -7,6 +7,9 @@
  2234. SUBDIRS=fontconfig $(LINTSUBDIRS)
  2235. +SOFONTCONFIGREV=2.2
  2236. +#define SoRev SOFONTCONFIGREV
  2237. +
  2238. FONTCONFIG_REVISION=1
  2239. #ifndef FontconfigFontsConfDir
  2240. diff -dur xc/extras/fontconfig/local.def xc-p/extras/fontconfig/local.def
  2241. --- xc/extras/fontconfig/local.def 2003-09-25 13:01:14.000000000 +0200
  2242. +++ xc-p/extras/fontconfig/local.def 2004-11-11 22:22:24.000000000 +0100
  2243. @@ -41,7 +41,7 @@
  2244. #endif
  2245. #if SharedLibFontconfig
  2246. -#define SharedFontconfigRev 1.0
  2247. +#define SharedFontconfigRev 2.2
  2248. SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),SOXLIBREV,SharedFontconfigRev)
  2249. #else
  2250. ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),BuildLibDir)
  2251. diff -dur xc/extras/fontconfig/src/fcatomic.c xc-p/extras/fontconfig/src/fcatomic.c
  2252. --- xc/extras/fontconfig/src/fcatomic.c 2003-09-25 13:01:22.000000000 +0200
  2253. +++ xc-p/extras/fontconfig/src/fcatomic.c 2004-11-11 22:22:24.000000000 +0100
  2254. @@ -1,7 +1,7 @@
  2255. /*
  2256. - * $XFree86: xc/extras/fontconfig/src/fcatomic.c,v 1.1.1.1 2003/06/04 02:57:42 dawes Exp $
  2257. + * $RCSId: xc/lib/fontconfig/src/fcatomic.c,v 1.2 2002/03/04 21:15:28 tsi Exp $
  2258. *
  2259. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  2260. + * Copyright � 2002 Keith Packard
  2261. *
  2262. * Permission to use, copy, modify, distribute, and sell this software and its
  2263. * documentation for any purpose is hereby granted without fee, provided that
  2264. @@ -30,7 +30,7 @@
  2265. * Uses only regular filesystem calls so it should
  2266. * work even in the absense of functioning file locking
  2267. *
  2268. - * Four files:
  2269. + * On Unix, four files are used:
  2270. * file - the data file accessed by other apps.
  2271. * new - a new version of the data file while it's being written
  2272. * lck - the lock file
  2273. @@ -41,6 +41,10 @@
  2274. * Attempt to link it to 'lck'
  2275. * Unlink 'tmp'
  2276. * If the link succeeded, the lock is held
  2277. + *
  2278. + * On Windows, where there are no links, no tmp file is used, and lck
  2279. + * is a directory that's mkdir'ed. If the mkdir succeeds, the lock is
  2280. + * held.
  2281. */
  2282. #include "fcint.h"
  2283. @@ -51,6 +55,10 @@
  2284. #include <stdlib.h>
  2285. #include <time.h>
  2286. +#ifdef _WIN32
  2287. +#define mkdir(path,mode) _mkdir(path)
  2288. +#endif
  2289. +
  2290. #define NEW_NAME ".NEW"
  2291. #define LCK_NAME ".LCK"
  2292. #define TMP_NAME ".TMP-XXXXXX"
  2293. @@ -96,6 +104,7 @@
  2294. int ret;
  2295. struct stat lck_stat;
  2296. +#ifdef HAVE_LINK
  2297. strcpy ((char *) atomic->tmp, (char *) atomic->file);
  2298. strcat ((char *) atomic->tmp, TMP_NAME);
  2299. fd = mkstemp ((char *) atomic->tmp);
  2300. @@ -122,6 +131,9 @@
  2301. }
  2302. ret = link ((char *) atomic->tmp, (char *) atomic->lck);
  2303. (void) unlink ((char *) atomic->tmp);
  2304. +#else
  2305. + ret = mkdir ((char *) atomic->lck, 0600);
  2306. +#endif
  2307. if (ret < 0)
  2308. {
  2309. /*
  2310. @@ -135,8 +147,13 @@
  2311. time_t now = time (0);
  2312. if ((long int) (now - lck_stat.st_mtime) > 10 * 60)
  2313. {
  2314. +#ifdef HAVE_LINK
  2315. if (unlink ((char *) atomic->lck) == 0)
  2316. return FcAtomicLock (atomic);
  2317. +#else
  2318. + if (rmdir ((char *) atomic->lck) == 0)
  2319. + return FcAtomicLock (atomic);
  2320. +#endif
  2321. }
  2322. }
  2323. return FcFalse;
  2324. @@ -174,7 +191,11 @@
  2325. void
  2326. FcAtomicUnlock (FcAtomic *atomic)
  2327. {
  2328. +#ifdef HAVE_LINK
  2329. unlink ((char *) atomic->lck);
  2330. +#else
  2331. + rmdir ((char *) atomic->lck);
  2332. +#endif
  2333. }
  2334. void
  2335. diff -dur xc/extras/fontconfig/src/fcblanks.c xc-p/extras/fontconfig/src/fcblanks.c
  2336. --- xc/extras/fontconfig/src/fcblanks.c 2003-09-25 13:01:22.000000000 +0200
  2337. +++ xc-p/extras/fontconfig/src/fcblanks.c 2004-11-11 22:22:24.000000000 +0100
  2338. @@ -1,7 +1,7 @@
  2339. /*
  2340. - * $XFree86: xc/extras/fontconfig/src/fcblanks.c,v 1.1.1.1 2003/06/04 02:57:42 dawes Exp $
  2341. + * $RCSId:$
  2342. *
  2343. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  2344. + * Copyright � 2002 Keith Packard
  2345. *
  2346. * Permission to use, copy, modify, distribute, and sell this software and its
  2347. * documentation for any purpose is hereby granted without fee, provided that
  2348. diff -dur xc/extras/fontconfig/src/fccache.c xc-p/extras/fontconfig/src/fccache.c
  2349. --- xc/extras/fontconfig/src/fccache.c 2003-12-03 05:57:04.000000000 +0100
  2350. +++ xc-p/extras/fontconfig/src/fccache.c 2004-11-11 22:22:24.000000000 +0100
  2351. @@ -1,5 +1,7 @@
  2352. /*
  2353. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  2354. + * $RCSId: xc/lib/fontconfig/src/fccache.c,v 1.12 2002/08/22 07:36:44 keithp Exp $
  2355. + *
  2356. + * Copyright � 2000 Keith Packard
  2357. *
  2358. * Permission to use, copy, modify, distribute, and sell this software and its
  2359. * documentation for any purpose is hereby granted without fee, provided that
  2360. @@ -187,9 +189,19 @@
  2361. if (dir)
  2362. if (!FcCacheWriteChars (f, dir))
  2363. return FcFalse;
  2364. +#ifdef _WIN32
  2365. + if (dir &&
  2366. + dir[strlen((const char *) dir) - 1] != '/' &&
  2367. + dir[strlen((const char *) dir) - 1] != '\\')
  2368. + {
  2369. + if (!FcCacheWriteChars (f, "\\"))
  2370. + return FcFalse;
  2371. + }
  2372. +#else
  2373. if (dir && dir[strlen((const char *) dir) - 1] != '/')
  2374. if (PUTC ('/', f) == EOF)
  2375. return FcFalse;
  2376. +#endif
  2377. if (!FcCacheWriteChars (f, file))
  2378. return FcFalse;
  2379. if (PUTC ('"', f) == EOF)
  2380. @@ -257,8 +269,13 @@
  2381. return FcFalse;
  2382. }
  2383. strncpy ((char *) path, (const char *) dir, dir_len);
  2384. +#ifdef _WIN32
  2385. + if (dir[dir_len - 1] != '/' && dir[dir_len - 1] != '\\' )
  2386. + path[dir_len++] = '\\';
  2387. +#else
  2388. if (dir[dir_len - 1] != '/')
  2389. path[dir_len++] = '/';
  2390. +#endif
  2391. strcpy ((char *) path + dir_len, (const char *) file);
  2392. if (!FcStrCmp (name, FC_FONT_FILE_DIR))
  2393. {
  2394. @@ -294,28 +311,28 @@
  2395. }
  2396. static unsigned int
  2397. -FcCacheHash (const FcChar8 *string)
  2398. +FcCacheHash (const FcChar8 *string, int len)
  2399. {
  2400. unsigned int h = 0;
  2401. FcChar8 c;
  2402. - while ((c = *string++))
  2403. + while (len-- && (c = *string++))
  2404. h = (h << 1) ^ c;
  2405. - return 0;
  2406. + return h;
  2407. }
  2408. /*
  2409. * Verify the saved timestamp for a file
  2410. */
  2411. FcBool
  2412. -FcGlobalCacheCheckTime (FcGlobalCacheInfo *info)
  2413. +FcGlobalCacheCheckTime (const FcChar8 *file, FcGlobalCacheInfo *info)
  2414. {
  2415. struct stat statb;
  2416. - if (stat ((char *) info->file, &statb) < 0)
  2417. + if (stat ((char *) file, &statb) < 0)
  2418. {
  2419. if (FcDebug () & FC_DBG_CACHE)
  2420. - printf (" file missing\n");
  2421. + printf (" file %s missing\n", file);
  2422. return FcFalse;
  2423. }
  2424. if (statb.st_mtime != info->time)
  2425. @@ -360,7 +377,7 @@
  2426. FcFilePathInfo i;
  2427. FcChar8 *slash;
  2428. - slash = (FcChar8 *) strrchr ((const char *) path, '/');
  2429. + slash = FcStrLastSlash (path);
  2430. if (slash)
  2431. {
  2432. i.dir = path;
  2433. @@ -375,7 +392,7 @@
  2434. i.dir_len = 1;
  2435. i.base = path;
  2436. }
  2437. - i.base_hash = FcCacheHash (i.base);
  2438. + i.base_hash = FcCacheHash (i.base, -1);
  2439. return i;
  2440. }
  2441. @@ -385,7 +402,7 @@
  2442. int len,
  2443. FcBool create_missing)
  2444. {
  2445. - unsigned int hash = FcCacheHash (dir);
  2446. + unsigned int hash = FcCacheHash (dir, len);
  2447. FcGlobalCacheDir *d, **prev;
  2448. for (prev = &cache->ents[hash % FC_GLOBAL_CACHE_DIR_HASH_SIZE];
  2449. @@ -426,13 +443,29 @@
  2450. FcGlobalCacheDirAdd (FcGlobalCache *cache,
  2451. const FcChar8 *dir,
  2452. time_t time,
  2453. - FcBool replace)
  2454. + FcBool replace,
  2455. + FcBool create_missing)
  2456. {
  2457. FcGlobalCacheDir *d;
  2458. FcFilePathInfo i;
  2459. FcGlobalCacheSubdir *subdir;
  2460. FcGlobalCacheDir *parent;
  2461. + i = FcFilePathInfoGet (dir);
  2462. + parent = FcGlobalCacheDirGet (cache, i.dir, i.dir_len, create_missing);
  2463. + /*
  2464. + * Tricky here -- directories containing fonts.cache-1 files
  2465. + * need entries only when the parent doesn't have a cache file.
  2466. + * That is, when the parent already exists in the cache, is
  2467. + * referenced and has a "real" timestamp. The time of 0 is
  2468. + * special and marks directories which got stuck in the
  2469. + * global cache for this very reason. Yes, it could
  2470. + * use a separate boolean field, and probably should.
  2471. + */
  2472. + if (!parent || (!create_missing &&
  2473. + (!parent->info.referenced ||
  2474. + (parent->info.time == 0))))
  2475. + return 0;
  2476. /*
  2477. * Add this directory to the cache
  2478. */
  2479. @@ -440,13 +473,9 @@
  2480. if (!d)
  2481. return 0;
  2482. d->info.time = time;
  2483. - i = FcFilePathInfoGet (dir);
  2484. /*
  2485. * Add this directory to the subdirectory list of the parent
  2486. */
  2487. - parent = FcGlobalCacheDirGet (cache, i.dir, i.dir_len, FcTrue);
  2488. - if (!parent)
  2489. - return 0;
  2490. subdir = malloc (sizeof (FcGlobalCacheSubdir));
  2491. if (!subdir)
  2492. return 0;
  2493. @@ -483,6 +512,30 @@
  2494. free (d);
  2495. }
  2496. +/*
  2497. + * If the parent is in the global cache and referenced, add
  2498. + * an entry for 'dir' to the global cache. This is used
  2499. + * for directories with fonts.cache files
  2500. + */
  2501. +
  2502. +void
  2503. +FcGlobalCacheReferenceSubdir (FcGlobalCache *cache,
  2504. + const FcChar8 *dir)
  2505. +{
  2506. + FcGlobalCacheInfo *info;
  2507. + info = FcGlobalCacheDirAdd (cache, dir, 0, FcFalse, FcFalse);
  2508. + if (info && !info->referenced)
  2509. + {
  2510. + info->referenced = FcTrue;
  2511. + cache->referenced++;
  2512. + }
  2513. +}
  2514. +
  2515. +/*
  2516. + * Check to see if the global cache contains valid data for 'dir'.
  2517. + * If so, scan the global cache for files and directories in 'dir'.
  2518. + * else, return False.
  2519. + */
  2520. FcBool
  2521. FcGlobalCacheScanDir (FcFontSet *set,
  2522. FcStrSet *dirs,
  2523. @@ -496,6 +549,7 @@
  2524. int h;
  2525. int dir_len;
  2526. FcGlobalCacheSubdir *subdir;
  2527. + FcBool any_in_cache = FcFalse;
  2528. if (FcDebug() & FC_DBG_CACHE)
  2529. printf ("FcGlobalCacheScanDir %s\n", dir);
  2530. @@ -507,19 +561,27 @@
  2531. return FcFalse;
  2532. }
  2533. - if (!FcGlobalCacheCheckTime (&d->info))
  2534. + /*
  2535. + * See if the timestamp recorded in the global cache
  2536. + * matches the directory time, if not, return False
  2537. + */
  2538. + if (!FcGlobalCacheCheckTime (d->info.file, &d->info))
  2539. {
  2540. if (FcDebug () & FC_DBG_CACHE)
  2541. printf ("\tdir cache entry time mismatch\n");
  2542. return FcFalse;
  2543. }
  2544. + /*
  2545. + * Add files from 'dir' to the fontset
  2546. + */
  2547. dir_len = strlen ((const char *) dir);
  2548. for (h = 0; h < FC_GLOBAL_CACHE_FILE_HASH_SIZE; h++)
  2549. for (f = d->ents[h]; f; f = f->next)
  2550. {
  2551. if (FcDebug() & FC_DBG_CACHEV)
  2552. printf ("FcGlobalCacheScanDir add file %s\n", f->info.file);
  2553. + any_in_cache = FcTrue;
  2554. if (!FcCacheFontSetAdd (set, dirs, dir, dir_len,
  2555. f->info.file, f->name))
  2556. {
  2557. @@ -528,11 +590,14 @@
  2558. }
  2559. FcGlobalCacheReferenced (cache, &f->info);
  2560. }
  2561. + /*
  2562. + * Add directories in 'dir' to 'dirs'
  2563. + */
  2564. for (subdir = d->subdirs; subdir; subdir = subdir->next)
  2565. {
  2566. - FcFilePathInfo info;
  2567. + FcFilePathInfo info = FcFilePathInfoGet (subdir->ent->info.file);
  2568. - info = FcFilePathInfoGet (subdir->ent->info.file);
  2569. + any_in_cache = FcTrue;
  2570. if (!FcCacheFontSetAdd (set, dirs, dir, dir_len,
  2571. info.base, FC_FONT_FILE_DIR))
  2572. {
  2573. @@ -544,7 +609,15 @@
  2574. FcGlobalCacheReferenced (cache, &d->info);
  2575. - return FcTrue;
  2576. + /*
  2577. + * To recover from a bug in previous versions of fontconfig,
  2578. + * return FcFalse if no entries in the cache were found
  2579. + * for this directory. This will cause any empty directories
  2580. + * to get rescanned every time fontconfig is initialized. This
  2581. + * might get removed at some point when the older cache files are
  2582. + * presumably fixed.
  2583. + */
  2584. + return any_in_cache;
  2585. }
  2586. /*
  2587. @@ -576,7 +649,7 @@
  2588. }
  2589. }
  2590. if (count)
  2591. - *count = max;
  2592. + *count = max + 1;
  2593. return match;
  2594. }
  2595. @@ -713,7 +786,7 @@
  2596. if (FcDebug () & FC_DBG_CACHEV)
  2597. printf ("FcGlobalCacheLoad \"%s\" \"%20.20s\"\n", file, name);
  2598. if (!FcStrCmp (name, FC_FONT_FILE_DIR))
  2599. - info = FcGlobalCacheDirAdd (cache, file, time, FcFalse);
  2600. + info = FcGlobalCacheDirAdd (cache, file, time, FcFalse, FcTrue);
  2601. else
  2602. info = FcGlobalCacheFileAdd (cache, file, id, time, name, FcFalse);
  2603. if (!info)
  2604. @@ -743,14 +816,17 @@
  2605. int id,
  2606. const FcChar8 *name)
  2607. {
  2608. + const FcChar8 *match;
  2609. struct stat statb;
  2610. FcGlobalCacheInfo *info;
  2611. + match = file;
  2612. +
  2613. if (stat ((char *) file, &statb) < 0)
  2614. return FcFalse;
  2615. if (S_ISDIR (statb.st_mode))
  2616. info = FcGlobalCacheDirAdd (cache, file, statb.st_mtime,
  2617. - FcTrue);
  2618. + FcTrue, FcTrue);
  2619. else
  2620. info = FcGlobalCacheFileAdd (cache, file, id, statb.st_mtime,
  2621. name, FcTrue);
  2622. @@ -780,9 +856,11 @@
  2623. if (cache->broken)
  2624. return FcFalse;
  2625. +#if defined (HAVE_GETUID) && defined (HAVE_GETEUID)
  2626. /* Set-UID programs can't safely update the cache */
  2627. if (getuid () != geteuid ())
  2628. return FcFalse;
  2629. +#endif
  2630. atomic = FcAtomicCreate (cache_file);
  2631. if (!atomic)
  2632. @@ -973,7 +1051,7 @@
  2633. {
  2634. const FcChar8 *cache_slash;
  2635. - cache_slash = (const FcChar8 *) strrchr ((const char *) cache, '/');
  2636. + cache_slash = FcStrLastSlash (cache);
  2637. if (cache_slash && !strncmp ((const char *) cache, (const char *) file,
  2638. (cache_slash + 1) - cache))
  2639. return file + ((cache_slash + 1) - cache);
  2640. diff -dur xc/extras/fontconfig/src/fccfg.c xc-p/extras/fontconfig/src/fccfg.c
  2641. --- xc/extras/fontconfig/src/fccfg.c 2003-06-04 18:29:39.000000000 +0200
  2642. +++ xc-p/extras/fontconfig/src/fccfg.c 2004-11-11 22:22:24.000000000 +0100
  2643. @@ -1,5 +1,7 @@
  2644. /*
  2645. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  2646. + * $RCSId: xc/lib/fontconfig/src/fccfg.c,v 1.23 2002/08/31 22:17:32 keithp Exp $
  2647. + *
  2648. + * Copyright � 2000 Keith Packard
  2649. *
  2650. * Permission to use, copy, modify, distribute, and sell this software and its
  2651. * documentation for any purpose is hereby granted without fee, provided that
  2652. @@ -19,10 +21,15 @@
  2653. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2654. * PERFORMANCE OF THIS SOFTWARE.
  2655. */
  2656. -/* $XFree86: xc/extras/fontconfig/src/fccfg.c,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  2657. #include "fcint.h"
  2658. +#if defined (_WIN32) && defined (PIC)
  2659. +#define STRICT
  2660. +#include <windows.h>
  2661. +#undef STRICT
  2662. +#endif
  2663. +
  2664. FcConfig *_fcConfig;
  2665. FcConfig *
  2666. @@ -49,8 +56,9 @@
  2667. goto bail3;
  2668. config->cache = 0;
  2669. - if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE)))
  2670. - goto bail4;
  2671. + if (FcConfigHome())
  2672. + if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE)))
  2673. + goto bail4;
  2674. config->blanks = 0;
  2675. @@ -132,8 +140,10 @@
  2676. while (s)
  2677. {
  2678. n = s->next;
  2679. - FcTestDestroy (s->test);
  2680. - FcEditDestroy (s->edit);
  2681. + if (s->test)
  2682. + FcTestDestroy (s->test);
  2683. + if (s->edit)
  2684. + FcEditDestroy (s->edit);
  2685. s = n;
  2686. }
  2687. }
  2688. @@ -482,11 +492,13 @@
  2689. }
  2690. FcBool
  2691. -FcConfigCompareValue (FcValue m,
  2692. - FcOp op,
  2693. - FcValue v)
  2694. +FcConfigCompareValue (const FcValue m_o,
  2695. + FcOp op,
  2696. + const FcValue v_o)
  2697. {
  2698. - FcBool ret = FcFalse;
  2699. + FcValue m = m_o;
  2700. + FcValue v = v_o;
  2701. + FcBool ret = FcFalse;
  2702. m = FcConfigPromote (m, v);
  2703. v = FcConfigPromote (v, m);
  2704. @@ -586,10 +598,10 @@
  2705. case FcTypeLangSet:
  2706. switch (op) {
  2707. case FcOpContains:
  2708. - ret = FcLangSetCompare (v.u.l, m.u.l) != FcLangDifferentLang;
  2709. + ret = FcLangSetContains (v.u.l, m.u.l);
  2710. break;
  2711. case FcOpNotContains:
  2712. - ret = FcLangSetCompare (v.u.l, m.u.l) == FcLangDifferentLang;
  2713. + ret = FcLangSetContains (v.u.l, m.u.l);
  2714. break;
  2715. case FcOpEqual:
  2716. ret = FcLangSetEqual (v.u.l, m.u.l);
  2717. @@ -636,6 +648,13 @@
  2718. }
  2719. +#define _FcDoubleFloor(d) ((int) (d))
  2720. +#define _FcDoubleCeil(d) ((double) (int) (d) == (d) ? (int) (d) : (int) ((d) + 1))
  2721. +#define FcDoubleFloor(d) ((d) >= 0 ? _FcDoubleFloor(d) : -_FcDoubleCeil(-(d)))
  2722. +#define FcDoubleCeil(d) ((d) >= 0 ? _FcDoubleCeil(d) : -_FcDoubleFloor(-(d)))
  2723. +#define FcDoubleRound(d) FcDoubleFloor ((d) + 0.5)
  2724. +#define FcDoubleTrunc(d) ((d) >= 0 ? _FcDoubleFloor (d) : -_FcDoubleFloor (-(d)))
  2725. +
  2726. static FcValue
  2727. FcConfigEvaluate (FcPattern *p, FcExpr *e)
  2728. {
  2729. @@ -824,6 +843,70 @@
  2730. }
  2731. FcValueDestroy (vl);
  2732. break;
  2733. + case FcOpFloor:
  2734. + vl = FcConfigEvaluate (p, e->u.tree.left);
  2735. + switch (vl.type) {
  2736. + case FcTypeInteger:
  2737. + v = vl;
  2738. + break;
  2739. + case FcTypeDouble:
  2740. + v.type = FcTypeInteger;
  2741. + v.u.i = FcDoubleFloor (vl.u.d);
  2742. + break;
  2743. + default:
  2744. + v.type = FcTypeVoid;
  2745. + break;
  2746. + }
  2747. + FcValueDestroy (vl);
  2748. + break;
  2749. + case FcOpCeil:
  2750. + vl = FcConfigEvaluate (p, e->u.tree.left);
  2751. + switch (vl.type) {
  2752. + case FcTypeInteger:
  2753. + v = vl;
  2754. + break;
  2755. + case FcTypeDouble:
  2756. + v.type = FcTypeInteger;
  2757. + v.u.i = FcDoubleCeil (vl.u.d);
  2758. + break;
  2759. + default:
  2760. + v.type = FcTypeVoid;
  2761. + break;
  2762. + }
  2763. + FcValueDestroy (vl);
  2764. + break;
  2765. + case FcOpRound:
  2766. + vl = FcConfigEvaluate (p, e->u.tree.left);
  2767. + switch (vl.type) {
  2768. + case FcTypeInteger:
  2769. + v = vl;
  2770. + break;
  2771. + case FcTypeDouble:
  2772. + v.type = FcTypeInteger;
  2773. + v.u.i = FcDoubleRound (vl.u.d);
  2774. + break;
  2775. + default:
  2776. + v.type = FcTypeVoid;
  2777. + break;
  2778. + }
  2779. + FcValueDestroy (vl);
  2780. + break;
  2781. + case FcOpTrunc:
  2782. + vl = FcConfigEvaluate (p, e->u.tree.left);
  2783. + switch (vl.type) {
  2784. + case FcTypeInteger:
  2785. + v = vl;
  2786. + break;
  2787. + case FcTypeDouble:
  2788. + v.type = FcTypeInteger;
  2789. + v.u.i = FcDoubleTrunc (vl.u.d);
  2790. + break;
  2791. + default:
  2792. + v.type = FcTypeVoid;
  2793. + break;
  2794. + }
  2795. + FcValueDestroy (vl);
  2796. + break;
  2797. default:
  2798. v.type = FcTypeVoid;
  2799. break;
  2800. @@ -914,8 +997,16 @@
  2801. FcBool append,
  2802. FcValueList *new)
  2803. {
  2804. - FcValueList **prev, *last;
  2805. + FcValueList **prev, *last, *v;
  2806. + FcValueBinding sameBinding;
  2807. + if (position)
  2808. + sameBinding = position->binding;
  2809. + else
  2810. + sameBinding = FcValueBindingWeak;
  2811. + for (v = new; v; v = v->next)
  2812. + if (v->binding == FcValueBindingSame)
  2813. + v->binding = sameBinding;
  2814. if (append)
  2815. {
  2816. if (position)
  2817. @@ -1141,6 +1232,14 @@
  2818. !FcStrCmpIgnoreCase ((FcChar8 *) t->field,
  2819. (FcChar8 *) e->field))
  2820. {
  2821. + /*
  2822. + * KLUDGE - the pattern may have been reallocated or
  2823. + * things may have been inserted or deleted above
  2824. + * this element by other edits. Go back and find
  2825. + * the element again
  2826. + */
  2827. + if (e != s->edit && st[i].elt)
  2828. + st[i].elt = FcPatternFindElt (p, t->field);
  2829. if (!st[i].elt)
  2830. t = 0;
  2831. break;
  2832. @@ -1254,9 +1353,57 @@
  2833. }
  2834. #ifndef FONTCONFIG_PATH
  2835. -#define FONTCONFIG_PATH "/etc/fonts"
  2836. +#define FONTCONFIG_PATH "/etc/fonts"
  2837. #endif
  2838. +#if defined (_WIN32) && defined (PIC)
  2839. +
  2840. +static FcChar8 fontconfig_path[1000] = "";
  2841. +
  2842. +BOOL WINAPI
  2843. +DllMain (HINSTANCE hinstDLL,
  2844. + DWORD fdwReason,
  2845. + LPVOID lpvReserved)
  2846. +{
  2847. + FcChar8 *p;
  2848. +
  2849. + switch (fdwReason) {
  2850. + case DLL_PROCESS_ATTACH:
  2851. + if (!GetModuleFileName ((HMODULE) hinstDLL, fontconfig_path,
  2852. + sizeof (fontconfig_path)))
  2853. + break;
  2854. +
  2855. + /* If the fontconfig DLL is in a "bin" or "lib" subfolder,
  2856. + * assume it's a Unix-style installation tree, and use
  2857. + * "etc/fonts" in there as FONTCONFIG_PATH. Otherwise use the
  2858. + * folder where the DLL is as FONTCONFIG_PATH.
  2859. + */
  2860. + p = strrchr (fontconfig_path, '\\');
  2861. + if (p)
  2862. + {
  2863. + *p = '\0';
  2864. + p = strrchr (fontconfig_path, '\\');
  2865. + if (p && (FcStrCmpIgnoreCase (p + 1, "bin") == 0 ||
  2866. + FcStrCmpIgnoreCase (p + 1, "lib") == 0))
  2867. + *p = '\0';
  2868. + strcat (fontconfig_path, "\\etc\\fonts");
  2869. + }
  2870. + else
  2871. + fontconfig_path[0] = '\0';
  2872. +
  2873. + break;
  2874. + }
  2875. +
  2876. + return TRUE;
  2877. +}
  2878. +
  2879. +#undef FONTCONFIG_PATH
  2880. +#define FONTCONFIG_PATH fontconfig_path
  2881. +
  2882. +#else /* !(_WIN32 && PIC) */
  2883. +
  2884. +#endif /* !(_WIN32 && PIC) */
  2885. +
  2886. #ifndef FONTCONFIG_FILE
  2887. #define FONTCONFIG_FILE "fonts.conf"
  2888. #endif
  2889. @@ -1273,9 +1420,16 @@
  2890. return 0;
  2891. strcpy ((char *) path, (const char *) dir);
  2892. - /* make sure there's a single separating / */
  2893. + /* make sure there's a single separator */
  2894. +#ifdef _WIN32
  2895. + if ((!path[0] || (path[strlen((char *) path)-1] != '/' &&
  2896. + path[strlen((char *) path)-1] != '\\')) &&
  2897. + (file[0] != '/' && file[0] != '\\'))
  2898. + strcat ((char *) path, "\\");
  2899. +#else
  2900. if ((!path[0] || path[strlen((char *) path)-1] != '/') && file[0] != '/')
  2901. strcat ((char *) path, "/");
  2902. +#endif
  2903. strcat ((char *) path, (char *) file);
  2904. FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1);
  2905. @@ -1302,11 +1456,7 @@
  2906. e = env;
  2907. npath++;
  2908. while (*e)
  2909. -#ifndef __UNIXOS2__
  2910. - if (*e++ == ':')
  2911. -#else
  2912. - if (*e++ == ';')
  2913. -#endif
  2914. + if (*e++ == FC_SEARCH_PATH_SEPARATOR)
  2915. npath++;
  2916. }
  2917. path = calloc (npath, sizeof (FcChar8 *));
  2918. @@ -1319,11 +1469,7 @@
  2919. e = env;
  2920. while (*e)
  2921. {
  2922. -#ifndef __UNIXOS2__
  2923. - colon = (FcChar8 *) strchr ((char *) e, ':');
  2924. -#else
  2925. - colon = (FcChar8 *) strchr ((char *) e, ';');
  2926. -#endif
  2927. + colon = (FcChar8 *) strchr ((char *) e, FC_SEARCH_PATH_SEPARATOR);
  2928. if (!colon)
  2929. colon = e + strlen ((char *) e);
  2930. path[i] = malloc (colon - e + 1);
  2931. @@ -1339,11 +1485,7 @@
  2932. }
  2933. }
  2934. -#ifndef __UNIXOS2__
  2935. dir = (FcChar8 *) FONTCONFIG_PATH;
  2936. -#else
  2937. - dir = (FcChar8 *) __XOS2RedirRoot(FONTCONFIG_PATH);
  2938. -#endif
  2939. path[i] = malloc (strlen ((char *) dir) + 1);
  2940. if (!path[i])
  2941. goto bail1;
  2942. @@ -1368,6 +1510,33 @@
  2943. free (path);
  2944. }
  2945. +static FcBool _FcConfigHomeEnabled = FcTrue;
  2946. +
  2947. +FcChar8 *
  2948. +FcConfigHome (void)
  2949. +{
  2950. + if (_FcConfigHomeEnabled)
  2951. + {
  2952. + char *home = getenv ("HOME");
  2953. +
  2954. +#ifdef _WIN32
  2955. + if (home == NULL)
  2956. + home = getenv ("USERPROFILE");
  2957. +#endif
  2958. +
  2959. + return home;
  2960. + }
  2961. + return 0;
  2962. +}
  2963. +
  2964. +FcBool
  2965. +FcConfigEnableHome (FcBool enable)
  2966. +{
  2967. + FcBool prev = _FcConfigHomeEnabled;
  2968. + _FcConfigHomeEnabled = enable;
  2969. + return prev;
  2970. +}
  2971. +
  2972. FcChar8 *
  2973. FcConfigFilename (const FcChar8 *url)
  2974. {
  2975. @@ -1380,14 +1549,26 @@
  2976. url = (FcChar8 *) FONTCONFIG_FILE;
  2977. }
  2978. file = 0;
  2979. +
  2980. +#ifdef _WIN32
  2981. + if (isalpha (*url) &&
  2982. + url[1] == ':' &&
  2983. + (url[2] == '/' || url[2] == '\\'))
  2984. + goto absolute_path;
  2985. +#endif
  2986. +
  2987. switch (*url) {
  2988. case '~':
  2989. - dir = (FcChar8 *) getenv ("HOME");
  2990. + dir = FcConfigHome ();
  2991. if (dir)
  2992. file = FcConfigFileExists (dir, url + 1);
  2993. else
  2994. file = 0;
  2995. break;
  2996. +#ifdef _WIN32
  2997. + case '\\':
  2998. + absolute_path:
  2999. +#endif
  3000. case '/':
  3001. file = FcConfigFileExists (0, url);
  3002. break;
  3003. diff -dur xc/extras/fontconfig/src/fccharset.c xc-p/extras/fontconfig/src/fccharset.c
  3004. --- xc/extras/fontconfig/src/fccharset.c 2003-06-04 18:29:39.000000000 +0200
  3005. +++ xc-p/extras/fontconfig/src/fccharset.c 2004-11-11 22:22:24.000000000 +0100
  3006. @@ -1,5 +1,7 @@
  3007. /*
  3008. - * Copyright � 2001 Keith Packard, member of The XFree86 Project, Inc.
  3009. + * $RCSId: xc/lib/fontconfig/src/fccharset.c,v 1.18 2002/08/22 07:36:44 keithp Exp $
  3010. + *
  3011. + * Copyright � 2001 Keith Packard
  3012. *
  3013. * Permission to use, copy, modify, distribute, and sell this software and its
  3014. * documentation for any purpose is hereby granted without fee, provided that
  3015. @@ -19,7 +21,6 @@
  3016. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  3017. * PERFORMANCE OF THIS SOFTWARE.
  3018. */
  3019. -/* $XFree86: xc/extras/fontconfig/src/fccharset.c,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  3020. #include <stdlib.h>
  3021. #include "fcint.h"
  3022. @@ -171,7 +172,7 @@
  3023. * if desired
  3024. */
  3025. -static FcCharLeaf *
  3026. +FcCharLeaf *
  3027. FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4)
  3028. {
  3029. int pos;
  3030. @@ -636,7 +637,7 @@
  3031. bi++;
  3032. }
  3033. }
  3034. - return FcTrue;
  3035. + return ai >= a->num;
  3036. }
  3037. /*
  3038. @@ -1159,769 +1160,3 @@
  3039. return FcTrue;
  3040. }
  3041. -
  3042. -/*
  3043. - * Figure out whether the available freetype has FT_Get_Next_Char
  3044. - */
  3045. -
  3046. -#if FREETYPE_MAJOR > 2
  3047. -# define HAS_NEXT_CHAR
  3048. -#else
  3049. -# if FREETYPE_MAJOR == 2
  3050. -# if FREETYPE_MINOR > 0
  3051. -# define HAS_NEXT_CHAR
  3052. -# else
  3053. -# if FREETYPE_MINOR == 0
  3054. -# if FREETYPE_PATCH >= 9
  3055. -# define HAS_NEXT_CHAR
  3056. -# endif
  3057. -# endif
  3058. -# endif
  3059. -# endif
  3060. -#endif
  3061. -
  3062. -/*
  3063. - * For our purposes, this approximation is sufficient
  3064. - */
  3065. -#ifndef HAS_NEXT_CHAR
  3066. -#define FT_Get_First_Char(face, gi) ((*(gi) = 1), 1)
  3067. -#define FT_Get_Next_Char(face, ucs4, gi) ((ucs4) >= 0xffffff ? \
  3068. - (*(gi) = 0), 0 : \
  3069. - (*(gi) = 1), (ucs4) + 1)
  3070. -#warning "No FT_Get_Next_Char"
  3071. -#endif
  3072. -
  3073. -typedef struct _FcCharEnt {
  3074. - FcChar16 bmp;
  3075. - unsigned char encode;
  3076. -} FcCharEnt;
  3077. -
  3078. -struct _FcCharMap {
  3079. - const FcCharEnt *ent;
  3080. - int nent;
  3081. -};
  3082. -
  3083. -typedef struct _FcFontDecode {
  3084. - FT_Encoding encoding;
  3085. - const FcCharMap *map;
  3086. - FcChar32 max;
  3087. -} FcFontDecode;
  3088. -
  3089. -static const FcCharEnt AppleRomanEnt[] = {
  3090. - { 0x0020, 0x20 }, /* SPACE */
  3091. - { 0x0021, 0x21 }, /* EXCLAMATION MARK */
  3092. - { 0x0022, 0x22 }, /* QUOTATION MARK */
  3093. - { 0x0023, 0x23 }, /* NUMBER SIGN */
  3094. - { 0x0024, 0x24 }, /* DOLLAR SIGN */
  3095. - { 0x0025, 0x25 }, /* PERCENT SIGN */
  3096. - { 0x0026, 0x26 }, /* AMPERSAND */
  3097. - { 0x0027, 0x27 }, /* APOSTROPHE */
  3098. - { 0x0028, 0x28 }, /* LEFT PARENTHESIS */
  3099. - { 0x0029, 0x29 }, /* RIGHT PARENTHESIS */
  3100. - { 0x002A, 0x2A }, /* ASTERISK */
  3101. - { 0x002B, 0x2B }, /* PLUS SIGN */
  3102. - { 0x002C, 0x2C }, /* COMMA */
  3103. - { 0x002D, 0x2D }, /* HYPHEN-MINUS */
  3104. - { 0x002E, 0x2E }, /* FULL STOP */
  3105. - { 0x002F, 0x2F }, /* SOLIDUS */
  3106. - { 0x0030, 0x30 }, /* DIGIT ZERO */
  3107. - { 0x0031, 0x31 }, /* DIGIT ONE */
  3108. - { 0x0032, 0x32 }, /* DIGIT TWO */
  3109. - { 0x0033, 0x33 }, /* DIGIT THREE */
  3110. - { 0x0034, 0x34 }, /* DIGIT FOUR */
  3111. - { 0x0035, 0x35 }, /* DIGIT FIVE */
  3112. - { 0x0036, 0x36 }, /* DIGIT SIX */
  3113. - { 0x0037, 0x37 }, /* DIGIT SEVEN */
  3114. - { 0x0038, 0x38 }, /* DIGIT EIGHT */
  3115. - { 0x0039, 0x39 }, /* DIGIT NINE */
  3116. - { 0x003A, 0x3A }, /* COLON */
  3117. - { 0x003B, 0x3B }, /* SEMICOLON */
  3118. - { 0x003C, 0x3C }, /* LESS-THAN SIGN */
  3119. - { 0x003D, 0x3D }, /* EQUALS SIGN */
  3120. - { 0x003E, 0x3E }, /* GREATER-THAN SIGN */
  3121. - { 0x003F, 0x3F }, /* QUESTION MARK */
  3122. - { 0x0040, 0x40 }, /* COMMERCIAL AT */
  3123. - { 0x0041, 0x41 }, /* LATIN CAPITAL LETTER A */
  3124. - { 0x0042, 0x42 }, /* LATIN CAPITAL LETTER B */
  3125. - { 0x0043, 0x43 }, /* LATIN CAPITAL LETTER C */
  3126. - { 0x0044, 0x44 }, /* LATIN CAPITAL LETTER D */
  3127. - { 0x0045, 0x45 }, /* LATIN CAPITAL LETTER E */
  3128. - { 0x0046, 0x46 }, /* LATIN CAPITAL LETTER F */
  3129. - { 0x0047, 0x47 }, /* LATIN CAPITAL LETTER G */
  3130. - { 0x0048, 0x48 }, /* LATIN CAPITAL LETTER H */
  3131. - { 0x0049, 0x49 }, /* LATIN CAPITAL LETTER I */
  3132. - { 0x004A, 0x4A }, /* LATIN CAPITAL LETTER J */
  3133. - { 0x004B, 0x4B }, /* LATIN CAPITAL LETTER K */
  3134. - { 0x004C, 0x4C }, /* LATIN CAPITAL LETTER L */
  3135. - { 0x004D, 0x4D }, /* LATIN CAPITAL LETTER M */
  3136. - { 0x004E, 0x4E }, /* LATIN CAPITAL LETTER N */
  3137. - { 0x004F, 0x4F }, /* LATIN CAPITAL LETTER O */
  3138. - { 0x0050, 0x50 }, /* LATIN CAPITAL LETTER P */
  3139. - { 0x0051, 0x51 }, /* LATIN CAPITAL LETTER Q */
  3140. - { 0x0052, 0x52 }, /* LATIN CAPITAL LETTER R */
  3141. - { 0x0053, 0x53 }, /* LATIN CAPITAL LETTER S */
  3142. - { 0x0054, 0x54 }, /* LATIN CAPITAL LETTER T */
  3143. - { 0x0055, 0x55 }, /* LATIN CAPITAL LETTER U */
  3144. - { 0x0056, 0x56 }, /* LATIN CAPITAL LETTER V */
  3145. - { 0x0057, 0x57 }, /* LATIN CAPITAL LETTER W */
  3146. - { 0x0058, 0x58 }, /* LATIN CAPITAL LETTER X */
  3147. - { 0x0059, 0x59 }, /* LATIN CAPITAL LETTER Y */
  3148. - { 0x005A, 0x5A }, /* LATIN CAPITAL LETTER Z */
  3149. - { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET */
  3150. - { 0x005C, 0x5C }, /* REVERSE SOLIDUS */
  3151. - { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET */
  3152. - { 0x005E, 0x5E }, /* CIRCUMFLEX ACCENT */
  3153. - { 0x005F, 0x5F }, /* LOW LINE */
  3154. - { 0x0060, 0x60 }, /* GRAVE ACCENT */
  3155. - { 0x0061, 0x61 }, /* LATIN SMALL LETTER A */
  3156. - { 0x0062, 0x62 }, /* LATIN SMALL LETTER B */
  3157. - { 0x0063, 0x63 }, /* LATIN SMALL LETTER C */
  3158. - { 0x0064, 0x64 }, /* LATIN SMALL LETTER D */
  3159. - { 0x0065, 0x65 }, /* LATIN SMALL LETTER E */
  3160. - { 0x0066, 0x66 }, /* LATIN SMALL LETTER F */
  3161. - { 0x0067, 0x67 }, /* LATIN SMALL LETTER G */
  3162. - { 0x0068, 0x68 }, /* LATIN SMALL LETTER H */
  3163. - { 0x0069, 0x69 }, /* LATIN SMALL LETTER I */
  3164. - { 0x006A, 0x6A }, /* LATIN SMALL LETTER J */
  3165. - { 0x006B, 0x6B }, /* LATIN SMALL LETTER K */
  3166. - { 0x006C, 0x6C }, /* LATIN SMALL LETTER L */
  3167. - { 0x006D, 0x6D }, /* LATIN SMALL LETTER M */
  3168. - { 0x006E, 0x6E }, /* LATIN SMALL LETTER N */
  3169. - { 0x006F, 0x6F }, /* LATIN SMALL LETTER O */
  3170. - { 0x0070, 0x70 }, /* LATIN SMALL LETTER P */
  3171. - { 0x0071, 0x71 }, /* LATIN SMALL LETTER Q */
  3172. - { 0x0072, 0x72 }, /* LATIN SMALL LETTER R */
  3173. - { 0x0073, 0x73 }, /* LATIN SMALL LETTER S */
  3174. - { 0x0074, 0x74 }, /* LATIN SMALL LETTER T */
  3175. - { 0x0075, 0x75 }, /* LATIN SMALL LETTER U */
  3176. - { 0x0076, 0x76 }, /* LATIN SMALL LETTER V */
  3177. - { 0x0077, 0x77 }, /* LATIN SMALL LETTER W */
  3178. - { 0x0078, 0x78 }, /* LATIN SMALL LETTER X */
  3179. - { 0x0079, 0x79 }, /* LATIN SMALL LETTER Y */
  3180. - { 0x007A, 0x7A }, /* LATIN SMALL LETTER Z */
  3181. - { 0x007B, 0x7B }, /* LEFT CURLY BRACKET */
  3182. - { 0x007C, 0x7C }, /* VERTICAL LINE */
  3183. - { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET */
  3184. - { 0x007E, 0x7E }, /* TILDE */
  3185. - { 0x00A0, 0xCA }, /* NO-BREAK SPACE */
  3186. - { 0x00A1, 0xC1 }, /* INVERTED EXCLAMATION MARK */
  3187. - { 0x00A2, 0xA2 }, /* CENT SIGN */
  3188. - { 0x00A3, 0xA3 }, /* POUND SIGN */
  3189. - { 0x00A5, 0xB4 }, /* YEN SIGN */
  3190. - { 0x00A7, 0xA4 }, /* SECTION SIGN */
  3191. - { 0x00A8, 0xAC }, /* DIAERESIS */
  3192. - { 0x00A9, 0xA9 }, /* COPYRIGHT SIGN */
  3193. - { 0x00AA, 0xBB }, /* FEMININE ORDINAL INDICATOR */
  3194. - { 0x00AB, 0xC7 }, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
  3195. - { 0x00AC, 0xC2 }, /* NOT SIGN */
  3196. - { 0x00AE, 0xA8 }, /* REGISTERED SIGN */
  3197. - { 0x00AF, 0xF8 }, /* MACRON */
  3198. - { 0x00B0, 0xA1 }, /* DEGREE SIGN */
  3199. - { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN */
  3200. - { 0x00B4, 0xAB }, /* ACUTE ACCENT */
  3201. - { 0x00B5, 0xB5 }, /* MICRO SIGN */
  3202. - { 0x00B6, 0xA6 }, /* PILCROW SIGN */
  3203. - { 0x00B7, 0xE1 }, /* MIDDLE DOT */
  3204. - { 0x00B8, 0xFC }, /* CEDILLA */
  3205. - { 0x00BA, 0xBC }, /* MASCULINE ORDINAL INDICATOR */
  3206. - { 0x00BB, 0xC8 }, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
  3207. - { 0x00BF, 0xC0 }, /* INVERTED QUESTION MARK */
  3208. - { 0x00C0, 0xCB }, /* LATIN CAPITAL LETTER A WITH GRAVE */
  3209. - { 0x00C1, 0xE7 }, /* LATIN CAPITAL LETTER A WITH ACUTE */
  3210. - { 0x00C2, 0xE5 }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
  3211. - { 0x00C3, 0xCC }, /* LATIN CAPITAL LETTER A WITH TILDE */
  3212. - { 0x00C4, 0x80 }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
  3213. - { 0x00C5, 0x81 }, /* LATIN CAPITAL LETTER A WITH RING ABOVE */
  3214. - { 0x00C6, 0xAE }, /* LATIN CAPITAL LETTER AE */
  3215. - { 0x00C7, 0x82 }, /* LATIN CAPITAL LETTER C WITH CEDILLA */
  3216. - { 0x00C8, 0xE9 }, /* LATIN CAPITAL LETTER E WITH GRAVE */
  3217. - { 0x00C9, 0x83 }, /* LATIN CAPITAL LETTER E WITH ACUTE */
  3218. - { 0x00CA, 0xE6 }, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
  3219. - { 0x00CB, 0xE8 }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */
  3220. - { 0x00CC, 0xED }, /* LATIN CAPITAL LETTER I WITH GRAVE */
  3221. - { 0x00CD, 0xEA }, /* LATIN CAPITAL LETTER I WITH ACUTE */
  3222. - { 0x00CE, 0xEB }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
  3223. - { 0x00CF, 0xEC }, /* LATIN CAPITAL LETTER I WITH DIAERESIS */
  3224. - { 0x00D1, 0x84 }, /* LATIN CAPITAL LETTER N WITH TILDE */
  3225. - { 0x00D2, 0xF1 }, /* LATIN CAPITAL LETTER O WITH GRAVE */
  3226. - { 0x00D3, 0xEE }, /* LATIN CAPITAL LETTER O WITH ACUTE */
  3227. - { 0x00D4, 0xEF }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
  3228. - { 0x00D5, 0xCD }, /* LATIN CAPITAL LETTER O WITH TILDE */
  3229. - { 0x00D6, 0x85 }, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
  3230. - { 0x00D8, 0xAF }, /* LATIN CAPITAL LETTER O WITH STROKE */
  3231. - { 0x00D9, 0xF4 }, /* LATIN CAPITAL LETTER U WITH GRAVE */
  3232. - { 0x00DA, 0xF2 }, /* LATIN CAPITAL LETTER U WITH ACUTE */
  3233. - { 0x00DB, 0xF3 }, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
  3234. - { 0x00DC, 0x86 }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
  3235. - { 0x00DF, 0xA7 }, /* LATIN SMALL LETTER SHARP S */
  3236. - { 0x00E0, 0x88 }, /* LATIN SMALL LETTER A WITH GRAVE */
  3237. - { 0x00E1, 0x87 }, /* LATIN SMALL LETTER A WITH ACUTE */
  3238. - { 0x00E2, 0x89 }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
  3239. - { 0x00E3, 0x8B }, /* LATIN SMALL LETTER A WITH TILDE */
  3240. - { 0x00E4, 0x8A }, /* LATIN SMALL LETTER A WITH DIAERESIS */
  3241. - { 0x00E5, 0x8C }, /* LATIN SMALL LETTER A WITH RING ABOVE */
  3242. - { 0x00E6, 0xBE }, /* LATIN SMALL LETTER AE */
  3243. - { 0x00E7, 0x8D }, /* LATIN SMALL LETTER C WITH CEDILLA */
  3244. - { 0x00E8, 0x8F }, /* LATIN SMALL LETTER E WITH GRAVE */
  3245. - { 0x00E9, 0x8E }, /* LATIN SMALL LETTER E WITH ACUTE */
  3246. - { 0x00EA, 0x90 }, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
  3247. - { 0x00EB, 0x91 }, /* LATIN SMALL LETTER E WITH DIAERESIS */
  3248. - { 0x00EC, 0x93 }, /* LATIN SMALL LETTER I WITH GRAVE */
  3249. - { 0x00ED, 0x92 }, /* LATIN SMALL LETTER I WITH ACUTE */
  3250. - { 0x00EE, 0x94 }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
  3251. - { 0x00EF, 0x95 }, /* LATIN SMALL LETTER I WITH DIAERESIS */
  3252. - { 0x00F1, 0x96 }, /* LATIN SMALL LETTER N WITH TILDE */
  3253. - { 0x00F2, 0x98 }, /* LATIN SMALL LETTER O WITH GRAVE */
  3254. - { 0x00F3, 0x97 }, /* LATIN SMALL LETTER O WITH ACUTE */
  3255. - { 0x00F4, 0x99 }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
  3256. - { 0x00F5, 0x9B }, /* LATIN SMALL LETTER O WITH TILDE */
  3257. - { 0x00F6, 0x9A }, /* LATIN SMALL LETTER O WITH DIAERESIS */
  3258. - { 0x00F7, 0xD6 }, /* DIVISION SIGN */
  3259. - { 0x00F8, 0xBF }, /* LATIN SMALL LETTER O WITH STROKE */
  3260. - { 0x00F9, 0x9D }, /* LATIN SMALL LETTER U WITH GRAVE */
  3261. - { 0x00FA, 0x9C }, /* LATIN SMALL LETTER U WITH ACUTE */
  3262. - { 0x00FB, 0x9E }, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
  3263. - { 0x00FC, 0x9F }, /* LATIN SMALL LETTER U WITH DIAERESIS */
  3264. - { 0x00FF, 0xD8 }, /* LATIN SMALL LETTER Y WITH DIAERESIS */
  3265. - { 0x0131, 0xF5 }, /* LATIN SMALL LETTER DOTLESS I */
  3266. - { 0x0152, 0xCE }, /* LATIN CAPITAL LIGATURE OE */
  3267. - { 0x0153, 0xCF }, /* LATIN SMALL LIGATURE OE */
  3268. - { 0x0178, 0xD9 }, /* LATIN CAPITAL LETTER Y WITH DIAERESIS */
  3269. - { 0x0192, 0xC4 }, /* LATIN SMALL LETTER F WITH HOOK */
  3270. - { 0x02C6, 0xF6 }, /* MODIFIER LETTER CIRCUMFLEX ACCENT */
  3271. - { 0x02C7, 0xFF }, /* CARON */
  3272. - { 0x02D8, 0xF9 }, /* BREVE */
  3273. - { 0x02D9, 0xFA }, /* DOT ABOVE */
  3274. - { 0x02DA, 0xFB }, /* RING ABOVE */
  3275. - { 0x02DB, 0xFE }, /* OGONEK */
  3276. - { 0x02DC, 0xF7 }, /* SMALL TILDE */
  3277. - { 0x02DD, 0xFD }, /* DOUBLE ACUTE ACCENT */
  3278. - { 0x03A9, 0xBD }, /* GREEK CAPITAL LETTER OMEGA */
  3279. - { 0x03C0, 0xB9 }, /* GREEK SMALL LETTER PI */
  3280. - { 0x2013, 0xD0 }, /* EN DASH */
  3281. - { 0x2014, 0xD1 }, /* EM DASH */
  3282. - { 0x2018, 0xD4 }, /* LEFT SINGLE QUOTATION MARK */
  3283. - { 0x2019, 0xD5 }, /* RIGHT SINGLE QUOTATION MARK */
  3284. - { 0x201A, 0xE2 }, /* SINGLE LOW-9 QUOTATION MARK */
  3285. - { 0x201C, 0xD2 }, /* LEFT DOUBLE QUOTATION MARK */
  3286. - { 0x201D, 0xD3 }, /* RIGHT DOUBLE QUOTATION MARK */
  3287. - { 0x201E, 0xE3 }, /* DOUBLE LOW-9 QUOTATION MARK */
  3288. - { 0x2020, 0xA0 }, /* DAGGER */
  3289. - { 0x2021, 0xE0 }, /* DOUBLE DAGGER */
  3290. - { 0x2022, 0xA5 }, /* BULLET */
  3291. - { 0x2026, 0xC9 }, /* HORIZONTAL ELLIPSIS */
  3292. - { 0x2030, 0xE4 }, /* PER MILLE SIGN */
  3293. - { 0x2039, 0xDC }, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
  3294. - { 0x203A, 0xDD }, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
  3295. - { 0x2044, 0xDA }, /* FRACTION SLASH */
  3296. - { 0x20AC, 0xDB }, /* EURO SIGN */
  3297. - { 0x2122, 0xAA }, /* TRADE MARK SIGN */
  3298. - { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL */
  3299. - { 0x2206, 0xC6 }, /* INCREMENT */
  3300. - { 0x220F, 0xB8 }, /* N-ARY PRODUCT */
  3301. - { 0x2211, 0xB7 }, /* N-ARY SUMMATION */
  3302. - { 0x221A, 0xC3 }, /* SQUARE ROOT */
  3303. - { 0x221E, 0xB0 }, /* INFINITY */
  3304. - { 0x222B, 0xBA }, /* INTEGRAL */
  3305. - { 0x2248, 0xC5 }, /* ALMOST EQUAL TO */
  3306. - { 0x2260, 0xAD }, /* NOT EQUAL TO */
  3307. - { 0x2264, 0xB2 }, /* LESS-THAN OR EQUAL TO */
  3308. - { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO */
  3309. - { 0x25CA, 0xD7 }, /* LOZENGE */
  3310. - { 0xF8FF, 0xF0 }, /* Apple logo */
  3311. - { 0xFB01, 0xDE }, /* LATIN SMALL LIGATURE FI */
  3312. - { 0xFB02, 0xDF }, /* LATIN SMALL LIGATURE FL */
  3313. -};
  3314. -
  3315. -static const FcCharMap AppleRoman = {
  3316. - AppleRomanEnt,
  3317. - sizeof (AppleRomanEnt) / sizeof (AppleRomanEnt[0])
  3318. -};
  3319. -
  3320. -static const FcCharEnt AdobeSymbolEnt[] = {
  3321. - { 0x0020, 0x20 }, /* SPACE # space */
  3322. - { 0x0021, 0x21 }, /* EXCLAMATION MARK # exclam */
  3323. - { 0x0023, 0x23 }, /* NUMBER SIGN # numbersign */
  3324. - { 0x0025, 0x25 }, /* PERCENT SIGN # percent */
  3325. - { 0x0026, 0x26 }, /* AMPERSAND # ampersand */
  3326. - { 0x0028, 0x28 }, /* LEFT PARENTHESIS # parenleft */
  3327. - { 0x0029, 0x29 }, /* RIGHT PARENTHESIS # parenright */
  3328. - { 0x002B, 0x2B }, /* PLUS SIGN # plus */
  3329. - { 0x002C, 0x2C }, /* COMMA # comma */
  3330. - { 0x002E, 0x2E }, /* FULL STOP # period */
  3331. - { 0x002F, 0x2F }, /* SOLIDUS # slash */
  3332. - { 0x0030, 0x30 }, /* DIGIT ZERO # zero */
  3333. - { 0x0031, 0x31 }, /* DIGIT ONE # one */
  3334. - { 0x0032, 0x32 }, /* DIGIT TWO # two */
  3335. - { 0x0033, 0x33 }, /* DIGIT THREE # three */
  3336. - { 0x0034, 0x34 }, /* DIGIT FOUR # four */
  3337. - { 0x0035, 0x35 }, /* DIGIT FIVE # five */
  3338. - { 0x0036, 0x36 }, /* DIGIT SIX # six */
  3339. - { 0x0037, 0x37 }, /* DIGIT SEVEN # seven */
  3340. - { 0x0038, 0x38 }, /* DIGIT EIGHT # eight */
  3341. - { 0x0039, 0x39 }, /* DIGIT NINE # nine */
  3342. - { 0x003A, 0x3A }, /* COLON # colon */
  3343. - { 0x003B, 0x3B }, /* SEMICOLON # semicolon */
  3344. - { 0x003C, 0x3C }, /* LESS-THAN SIGN # less */
  3345. - { 0x003D, 0x3D }, /* EQUALS SIGN # equal */
  3346. - { 0x003E, 0x3E }, /* GREATER-THAN SIGN # greater */
  3347. - { 0x003F, 0x3F }, /* QUESTION MARK # question */
  3348. - { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET # bracketleft */
  3349. - { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET # bracketright */
  3350. - { 0x005F, 0x5F }, /* LOW LINE # underscore */
  3351. - { 0x007B, 0x7B }, /* LEFT CURLY BRACKET # braceleft */
  3352. - { 0x007C, 0x7C }, /* VERTICAL LINE # bar */
  3353. - { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET # braceright */
  3354. - { 0x00A0, 0x20 }, /* NO-BREAK SPACE # space */
  3355. - { 0x00AC, 0xD8 }, /* NOT SIGN # logicalnot */
  3356. - { 0x00B0, 0xB0 }, /* DEGREE SIGN # degree */
  3357. - { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN # plusminus */
  3358. - { 0x00B5, 0x6D }, /* MICRO SIGN # mu */
  3359. - { 0x00D7, 0xB4 }, /* MULTIPLICATION SIGN # multiply */
  3360. - { 0x00F7, 0xB8 }, /* DIVISION SIGN # divide */
  3361. - { 0x0192, 0xA6 }, /* LATIN SMALL LETTER F WITH HOOK # florin */
  3362. - { 0x0391, 0x41 }, /* GREEK CAPITAL LETTER ALPHA # Alpha */
  3363. - { 0x0392, 0x42 }, /* GREEK CAPITAL LETTER BETA # Beta */
  3364. - { 0x0393, 0x47 }, /* GREEK CAPITAL LETTER GAMMA # Gamma */
  3365. - { 0x0394, 0x44 }, /* GREEK CAPITAL LETTER DELTA # Delta */
  3366. - { 0x0395, 0x45 }, /* GREEK CAPITAL LETTER EPSILON # Epsilon */
  3367. - { 0x0396, 0x5A }, /* GREEK CAPITAL LETTER ZETA # Zeta */
  3368. - { 0x0397, 0x48 }, /* GREEK CAPITAL LETTER ETA # Eta */
  3369. - { 0x0398, 0x51 }, /* GREEK CAPITAL LETTER THETA # Theta */
  3370. - { 0x0399, 0x49 }, /* GREEK CAPITAL LETTER IOTA # Iota */
  3371. - { 0x039A, 0x4B }, /* GREEK CAPITAL LETTER KAPPA # Kappa */
  3372. - { 0x039B, 0x4C }, /* GREEK CAPITAL LETTER LAMDA # Lambda */
  3373. - { 0x039C, 0x4D }, /* GREEK CAPITAL LETTER MU # Mu */
  3374. - { 0x039D, 0x4E }, /* GREEK CAPITAL LETTER NU # Nu */
  3375. - { 0x039E, 0x58 }, /* GREEK CAPITAL LETTER XI # Xi */
  3376. - { 0x039F, 0x4F }, /* GREEK CAPITAL LETTER OMICRON # Omicron */
  3377. - { 0x03A0, 0x50 }, /* GREEK CAPITAL LETTER PI # Pi */
  3378. - { 0x03A1, 0x52 }, /* GREEK CAPITAL LETTER RHO # Rho */
  3379. - { 0x03A3, 0x53 }, /* GREEK CAPITAL LETTER SIGMA # Sigma */
  3380. - { 0x03A4, 0x54 }, /* GREEK CAPITAL LETTER TAU # Tau */
  3381. - { 0x03A5, 0x55 }, /* GREEK CAPITAL LETTER UPSILON # Upsilon */
  3382. - { 0x03A6, 0x46 }, /* GREEK CAPITAL LETTER PHI # Phi */
  3383. - { 0x03A7, 0x43 }, /* GREEK CAPITAL LETTER CHI # Chi */
  3384. - { 0x03A8, 0x59 }, /* GREEK CAPITAL LETTER PSI # Psi */
  3385. - { 0x03A9, 0x57 }, /* GREEK CAPITAL LETTER OMEGA # Omega */
  3386. - { 0x03B1, 0x61 }, /* GREEK SMALL LETTER ALPHA # alpha */
  3387. - { 0x03B2, 0x62 }, /* GREEK SMALL LETTER BETA # beta */
  3388. - { 0x03B3, 0x67 }, /* GREEK SMALL LETTER GAMMA # gamma */
  3389. - { 0x03B4, 0x64 }, /* GREEK SMALL LETTER DELTA # delta */
  3390. - { 0x03B5, 0x65 }, /* GREEK SMALL LETTER EPSILON # epsilon */
  3391. - { 0x03B6, 0x7A }, /* GREEK SMALL LETTER ZETA # zeta */
  3392. - { 0x03B7, 0x68 }, /* GREEK SMALL LETTER ETA # eta */
  3393. - { 0x03B8, 0x71 }, /* GREEK SMALL LETTER THETA # theta */
  3394. - { 0x03B9, 0x69 }, /* GREEK SMALL LETTER IOTA # iota */
  3395. - { 0x03BA, 0x6B }, /* GREEK SMALL LETTER KAPPA # kappa */
  3396. - { 0x03BB, 0x6C }, /* GREEK SMALL LETTER LAMDA # lambda */
  3397. - { 0x03BC, 0x6D }, /* GREEK SMALL LETTER MU # mu */
  3398. - { 0x03BD, 0x6E }, /* GREEK SMALL LETTER NU # nu */
  3399. - { 0x03BE, 0x78 }, /* GREEK SMALL LETTER XI # xi */
  3400. - { 0x03BF, 0x6F }, /* GREEK SMALL LETTER OMICRON # omicron */
  3401. - { 0x03C0, 0x70 }, /* GREEK SMALL LETTER PI # pi */
  3402. - { 0x03C1, 0x72 }, /* GREEK SMALL LETTER RHO # rho */
  3403. - { 0x03C2, 0x56 }, /* GREEK SMALL LETTER FINAL SIGMA # sigma1 */
  3404. - { 0x03C3, 0x73 }, /* GREEK SMALL LETTER SIGMA # sigma */
  3405. - { 0x03C4, 0x74 }, /* GREEK SMALL LETTER TAU # tau */
  3406. - { 0x03C5, 0x75 }, /* GREEK SMALL LETTER UPSILON # upsilon */
  3407. - { 0x03C6, 0x66 }, /* GREEK SMALL LETTER PHI # phi */
  3408. - { 0x03C7, 0x63 }, /* GREEK SMALL LETTER CHI # chi */
  3409. - { 0x03C8, 0x79 }, /* GREEK SMALL LETTER PSI # psi */
  3410. - { 0x03C9, 0x77 }, /* GREEK SMALL LETTER OMEGA # omega */
  3411. - { 0x03D1, 0x4A }, /* GREEK THETA SYMBOL # theta1 */
  3412. - { 0x03D2, 0xA1 }, /* GREEK UPSILON WITH HOOK SYMBOL # Upsilon1 */
  3413. - { 0x03D5, 0x6A }, /* GREEK PHI SYMBOL # phi1 */
  3414. - { 0x03D6, 0x76 }, /* GREEK PI SYMBOL # omega1 */
  3415. - { 0x2022, 0xB7 }, /* BULLET # bullet */
  3416. - { 0x2026, 0xBC }, /* HORIZONTAL ELLIPSIS # ellipsis */
  3417. - { 0x2032, 0xA2 }, /* PRIME # minute */
  3418. - { 0x2033, 0xB2 }, /* DOUBLE PRIME # second */
  3419. - { 0x2044, 0xA4 }, /* FRACTION SLASH # fraction */
  3420. - { 0x20AC, 0xA0 }, /* EURO SIGN # Euro */
  3421. - { 0x2111, 0xC1 }, /* BLACK-LETTER CAPITAL I # Ifraktur */
  3422. - { 0x2118, 0xC3 }, /* SCRIPT CAPITAL P # weierstrass */
  3423. - { 0x211C, 0xC2 }, /* BLACK-LETTER CAPITAL R # Rfraktur */
  3424. - { 0x2126, 0x57 }, /* OHM SIGN # Omega */
  3425. - { 0x2135, 0xC0 }, /* ALEF SYMBOL # aleph */
  3426. - { 0x2190, 0xAC }, /* LEFTWARDS ARROW # arrowleft */
  3427. - { 0x2191, 0xAD }, /* UPWARDS ARROW # arrowup */
  3428. - { 0x2192, 0xAE }, /* RIGHTWARDS ARROW # arrowright */
  3429. - { 0x2193, 0xAF }, /* DOWNWARDS ARROW # arrowdown */
  3430. - { 0x2194, 0xAB }, /* LEFT RIGHT ARROW # arrowboth */
  3431. - { 0x21B5, 0xBF }, /* DOWNWARDS ARROW WITH CORNER LEFTWARDS # carriagereturn */
  3432. - { 0x21D0, 0xDC }, /* LEFTWARDS DOUBLE ARROW # arrowdblleft */
  3433. - { 0x21D1, 0xDD }, /* UPWARDS DOUBLE ARROW # arrowdblup */
  3434. - { 0x21D2, 0xDE }, /* RIGHTWARDS DOUBLE ARROW # arrowdblright */
  3435. - { 0x21D3, 0xDF }, /* DOWNWARDS DOUBLE ARROW # arrowdbldown */
  3436. - { 0x21D4, 0xDB }, /* LEFT RIGHT DOUBLE ARROW # arrowdblboth */
  3437. - { 0x2200, 0x22 }, /* FOR ALL # universal */
  3438. - { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL # partialdiff */
  3439. - { 0x2203, 0x24 }, /* THERE EXISTS # existential */
  3440. - { 0x2205, 0xC6 }, /* EMPTY SET # emptyset */
  3441. - { 0x2206, 0x44 }, /* INCREMENT # Delta */
  3442. - { 0x2207, 0xD1 }, /* NABLA # gradient */
  3443. - { 0x2208, 0xCE }, /* ELEMENT OF # element */
  3444. - { 0x2209, 0xCF }, /* NOT AN ELEMENT OF # notelement */
  3445. - { 0x220B, 0x27 }, /* CONTAINS AS MEMBER # suchthat */
  3446. - { 0x220F, 0xD5 }, /* N-ARY PRODUCT # product */
  3447. - { 0x2211, 0xE5 }, /* N-ARY SUMMATION # summation */
  3448. - { 0x2212, 0x2D }, /* MINUS SIGN # minus */
  3449. - { 0x2215, 0xA4 }, /* DIVISION SLASH # fraction */
  3450. - { 0x2217, 0x2A }, /* ASTERISK OPERATOR # asteriskmath */
  3451. - { 0x221A, 0xD6 }, /* SQUARE ROOT # radical */
  3452. - { 0x221D, 0xB5 }, /* PROPORTIONAL TO # proportional */
  3453. - { 0x221E, 0xA5 }, /* INFINITY # infinity */
  3454. - { 0x2220, 0xD0 }, /* ANGLE # angle */
  3455. - { 0x2227, 0xD9 }, /* LOGICAL AND # logicaland */
  3456. - { 0x2228, 0xDA }, /* LOGICAL OR # logicalor */
  3457. - { 0x2229, 0xC7 }, /* INTERSECTION # intersection */
  3458. - { 0x222A, 0xC8 }, /* UNION # union */
  3459. - { 0x222B, 0xF2 }, /* INTEGRAL # integral */
  3460. - { 0x2234, 0x5C }, /* THEREFORE # therefore */
  3461. - { 0x223C, 0x7E }, /* TILDE OPERATOR # similar */
  3462. - { 0x2245, 0x40 }, /* APPROXIMATELY EQUAL TO # congruent */
  3463. - { 0x2248, 0xBB }, /* ALMOST EQUAL TO # approxequal */
  3464. - { 0x2260, 0xB9 }, /* NOT EQUAL TO # notequal */
  3465. - { 0x2261, 0xBA }, /* IDENTICAL TO # equivalence */
  3466. - { 0x2264, 0xA3 }, /* LESS-THAN OR EQUAL TO # lessequal */
  3467. - { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO # greaterequal */
  3468. - { 0x2282, 0xCC }, /* SUBSET OF # propersubset */
  3469. - { 0x2283, 0xC9 }, /* SUPERSET OF # propersuperset */
  3470. - { 0x2284, 0xCB }, /* NOT A SUBSET OF # notsubset */
  3471. - { 0x2286, 0xCD }, /* SUBSET OF OR EQUAL TO # reflexsubset */
  3472. - { 0x2287, 0xCA }, /* SUPERSET OF OR EQUAL TO # reflexsuperset */
  3473. - { 0x2295, 0xC5 }, /* CIRCLED PLUS # circleplus */
  3474. - { 0x2297, 0xC4 }, /* CIRCLED TIMES # circlemultiply */
  3475. - { 0x22A5, 0x5E }, /* UP TACK # perpendicular */
  3476. - { 0x22C5, 0xD7 }, /* DOT OPERATOR # dotmath */
  3477. - { 0x2320, 0xF3 }, /* TOP HALF INTEGRAL # integraltp */
  3478. - { 0x2321, 0xF5 }, /* BOTTOM HALF INTEGRAL # integralbt */
  3479. - { 0x2329, 0xE1 }, /* LEFT-POINTING ANGLE BRACKET # angleleft */
  3480. - { 0x232A, 0xF1 }, /* RIGHT-POINTING ANGLE BRACKET # angleright */
  3481. - { 0x25CA, 0xE0 }, /* LOZENGE # lozenge */
  3482. - { 0x2660, 0xAA }, /* BLACK SPADE SUIT # spade */
  3483. - { 0x2663, 0xA7 }, /* BLACK CLUB SUIT # club */
  3484. - { 0x2665, 0xA9 }, /* BLACK HEART SUIT # heart */
  3485. - { 0x2666, 0xA8 }, /* BLACK DIAMOND SUIT # diamond */
  3486. - { 0xF6D9, 0xD3 }, /* COPYRIGHT SIGN SERIF # copyrightserif (CUS) */
  3487. - { 0xF6DA, 0xD2 }, /* REGISTERED SIGN SERIF # registerserif (CUS) */
  3488. - { 0xF6DB, 0xD4 }, /* TRADE MARK SIGN SERIF # trademarkserif (CUS) */
  3489. - { 0xF8E5, 0x60 }, /* RADICAL EXTENDER # radicalex (CUS) */
  3490. - { 0xF8E6, 0xBD }, /* VERTICAL ARROW EXTENDER # arrowvertex (CUS) */
  3491. - { 0xF8E7, 0xBE }, /* HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS) */
  3492. - { 0xF8E8, 0xE2 }, /* REGISTERED SIGN SANS SERIF # registersans (CUS) */
  3493. - { 0xF8E9, 0xE3 }, /* COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS) */
  3494. - { 0xF8EA, 0xE4 }, /* TRADE MARK SIGN SANS SERIF # trademarksans (CUS) */
  3495. - { 0xF8EB, 0xE6 }, /* LEFT PAREN TOP # parenlefttp (CUS) */
  3496. - { 0xF8EC, 0xE7 }, /* LEFT PAREN EXTENDER # parenleftex (CUS) */
  3497. - { 0xF8ED, 0xE8 }, /* LEFT PAREN BOTTOM # parenleftbt (CUS) */
  3498. - { 0xF8EE, 0xE9 }, /* LEFT SQUARE BRACKET TOP # bracketlefttp (CUS) */
  3499. - { 0xF8EF, 0xEA }, /* LEFT SQUARE BRACKET EXTENDER # bracketleftex (CUS) */
  3500. - { 0xF8F0, 0xEB }, /* LEFT SQUARE BRACKET BOTTOM # bracketleftbt (CUS) */
  3501. - { 0xF8F1, 0xEC }, /* LEFT CURLY BRACKET TOP # bracelefttp (CUS) */
  3502. - { 0xF8F2, 0xED }, /* LEFT CURLY BRACKET MID # braceleftmid (CUS) */
  3503. - { 0xF8F3, 0xEE }, /* LEFT CURLY BRACKET BOTTOM # braceleftbt (CUS) */
  3504. - { 0xF8F4, 0xEF }, /* CURLY BRACKET EXTENDER # braceex (CUS) */
  3505. - { 0xF8F5, 0xF4 }, /* INTEGRAL EXTENDER # integralex (CUS) */
  3506. - { 0xF8F6, 0xF6 }, /* RIGHT PAREN TOP # parenrighttp (CUS) */
  3507. - { 0xF8F7, 0xF7 }, /* RIGHT PAREN EXTENDER # parenrightex (CUS) */
  3508. - { 0xF8F8, 0xF8 }, /* RIGHT PAREN BOTTOM # parenrightbt (CUS) */
  3509. - { 0xF8F9, 0xF9 }, /* RIGHT SQUARE BRACKET TOP # bracketrighttp (CUS) */
  3510. - { 0xF8FA, 0xFA }, /* RIGHT SQUARE BRACKET EXTENDER # bracketrightex (CUS) */
  3511. - { 0xF8FB, 0xFB }, /* RIGHT SQUARE BRACKET BOTTOM # bracketrightbt (CUS) */
  3512. - { 0xF8FC, 0xFC }, /* RIGHT CURLY BRACKET TOP # bracerighttp (CUS) */
  3513. - { 0xF8FD, 0xFD }, /* RIGHT CURLY BRACKET MID # bracerightmid (CUS) */
  3514. - { 0xF8FE, 0xFE }, /* RIGHT CURLY BRACKET BOTTOM # bracerightbt (CUS) */
  3515. -};
  3516. -
  3517. -static const FcCharMap AdobeSymbol = {
  3518. - AdobeSymbolEnt,
  3519. - sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]),
  3520. -};
  3521. -
  3522. -static const FcFontDecode fcFontDecoders[] = {
  3523. - { ft_encoding_unicode, 0, (1 << 21) - 1 },
  3524. - { ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
  3525. - { ft_encoding_apple_roman, &AppleRoman, (1 << 16) - 1 },
  3526. -};
  3527. -
  3528. -#define NUM_DECODE (sizeof (fcFontDecoders) / sizeof (fcFontDecoders[0]))
  3529. -
  3530. -FcChar32
  3531. -FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map)
  3532. -{
  3533. - int low, high, mid;
  3534. - FcChar16 bmp;
  3535. -
  3536. - low = 0;
  3537. - high = map->nent - 1;
  3538. - if (ucs4 < map->ent[low].bmp || map->ent[high].bmp < ucs4)
  3539. - return ~0;
  3540. - while (low <= high)
  3541. - {
  3542. - mid = (high + low) >> 1;
  3543. - bmp = map->ent[mid].bmp;
  3544. - if (ucs4 == bmp)
  3545. - return (FT_ULong) map->ent[mid].encode;
  3546. - if (ucs4 < bmp)
  3547. - high = mid - 1;
  3548. - else
  3549. - low = mid + 1;
  3550. - }
  3551. - return ~0;
  3552. -}
  3553. -
  3554. -FcChar32
  3555. -FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map)
  3556. -{
  3557. - int i;
  3558. -
  3559. - for (i = 0; i < map->nent; i++)
  3560. - if (map->ent[i].encode == private)
  3561. - return (FcChar32) map->ent[i].bmp;
  3562. - return ~0;
  3563. -}
  3564. -
  3565. -const FcCharMap *
  3566. -FcFreeTypeGetPrivateMap (FT_Encoding encoding)
  3567. -{
  3568. - int i;
  3569. -
  3570. - for (i = 0; i < NUM_DECODE; i++)
  3571. - if (fcFontDecoders[i].encoding == encoding)
  3572. - return fcFontDecoders[i].map;
  3573. - return 0;
  3574. -}
  3575. -
  3576. -/*
  3577. - * Map a UCS4 glyph to a glyph index. Use all available encoding
  3578. - * tables to try and find one that works. This information is expected
  3579. - * to be cached by higher levels, so performance isn't critical
  3580. - */
  3581. -
  3582. -FT_UInt
  3583. -FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4)
  3584. -{
  3585. - int initial, offset, decode;
  3586. - FT_UInt glyphindex;
  3587. - FcChar32 charcode;
  3588. -
  3589. - initial = 0;
  3590. - /*
  3591. - * Find the current encoding
  3592. - */
  3593. - if (face->charmap)
  3594. - {
  3595. - for (; initial < NUM_DECODE; initial++)
  3596. - if (fcFontDecoders[initial].encoding == face->charmap->encoding)
  3597. - break;
  3598. - if (initial == NUM_DECODE)
  3599. - initial = 0;
  3600. - }
  3601. - /*
  3602. - * Check each encoding for the glyph, starting with the current one
  3603. - */
  3604. - for (offset = 0; offset < NUM_DECODE; offset++)
  3605. - {
  3606. - decode = (initial + offset) % NUM_DECODE;
  3607. - if (!face->charmap || face->charmap->encoding != fcFontDecoders[decode].encoding)
  3608. - if (FT_Select_Charmap (face, fcFontDecoders[decode].encoding) != 0)
  3609. - continue;
  3610. - if (fcFontDecoders[decode].map)
  3611. - {
  3612. - charcode = FcFreeTypeUcs4ToPrivate (ucs4, fcFontDecoders[decode].map);
  3613. - if (charcode == ~0)
  3614. - continue;
  3615. - }
  3616. - else
  3617. - charcode = ucs4;
  3618. - glyphindex = FT_Get_Char_Index (face, (FT_ULong) charcode);
  3619. - if (glyphindex)
  3620. - return glyphindex;
  3621. - }
  3622. - return 0;
  3623. -}
  3624. -
  3625. -static FcBool
  3626. -FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
  3627. - FT_UInt glyph, FcBlanks *blanks)
  3628. -{
  3629. - FT_Int load_flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
  3630. - FT_GlyphSlot slot;
  3631. -
  3632. - /*
  3633. - * When using scalable fonts, only report those glyphs
  3634. - * which can be scaled; otherwise those fonts will
  3635. - * only be available at some sizes, and never when
  3636. - * transformed. Avoid this by simply reporting bitmap-only
  3637. - * glyphs as missing
  3638. - */
  3639. - if (face->face_flags & FT_FACE_FLAG_SCALABLE)
  3640. - load_flags |= FT_LOAD_NO_BITMAP;
  3641. -
  3642. - if (FT_Load_Glyph (face, glyph, load_flags))
  3643. - return FcFalse;
  3644. -
  3645. - slot = face->glyph;
  3646. - if (!glyph)
  3647. - return FcFalse;
  3648. -
  3649. - switch (slot->format) {
  3650. - case ft_glyph_format_bitmap:
  3651. - /*
  3652. - * Bitmaps are assumed to be reasonable; if
  3653. - * this proves to be a rash assumption, this
  3654. - * code can be easily modified
  3655. - */
  3656. - return FcTrue;
  3657. - case ft_glyph_format_outline:
  3658. - /*
  3659. - * Glyphs with contours are always OK
  3660. - */
  3661. - if (slot->outline.n_contours != 0)
  3662. - return FcTrue;
  3663. - /*
  3664. - * Glyphs with no contours are only OK if
  3665. - * they're members of the Blanks set specified
  3666. - * in the configuration. If blanks isn't set,
  3667. - * then allow any glyph to be blank
  3668. - */
  3669. - if (!blanks || FcBlanksIsMember (blanks, ucs4))
  3670. - return FcTrue;
  3671. - /* fall through ... */
  3672. - default:
  3673. - break;
  3674. - }
  3675. - return FcFalse;
  3676. -}
  3677. -
  3678. -FcCharSet *
  3679. -FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks)
  3680. -{
  3681. - FcChar32 page, off, ucs4;
  3682. -#ifdef CHECK
  3683. - FcChar32 font_max = 0;
  3684. -#endif
  3685. - FcCharSet *fcs;
  3686. - FcCharLeaf *leaf;
  3687. - const FcCharMap *map;
  3688. - int o;
  3689. - int i;
  3690. - FT_UInt glyph;
  3691. -
  3692. - fcs = FcCharSetCreate ();
  3693. - if (!fcs)
  3694. - goto bail0;
  3695. -
  3696. - for (o = 0; o < NUM_DECODE; o++)
  3697. - {
  3698. - if (FT_Select_Charmap (face, fcFontDecoders[o].encoding) != 0)
  3699. - continue;
  3700. - map = fcFontDecoders[o].map;
  3701. - if (map)
  3702. - {
  3703. - /*
  3704. - * Non-Unicode tables are easy; there's a list of all possible
  3705. - * characters
  3706. - */
  3707. - for (i = 0; i < map->nent; i++)
  3708. - {
  3709. - ucs4 = map->ent[i].bmp;
  3710. - glyph = FT_Get_Char_Index (face, map->ent[i].encode);
  3711. - if (glyph && FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks))
  3712. - {
  3713. - leaf = FcCharSetFindLeafCreate (fcs, ucs4);
  3714. - if (!leaf)
  3715. - goto bail1;
  3716. - leaf->map[(ucs4 & 0xff) >> 5] |= (1 << (ucs4 & 0x1f));
  3717. -#ifdef CHECK
  3718. - if (ucs4 > font_max)
  3719. - font_max = ucs4;
  3720. -#endif
  3721. - }
  3722. - }
  3723. - }
  3724. - else
  3725. - {
  3726. - FT_UInt gindex;
  3727. -
  3728. - /*
  3729. - * Find the first encoded character in the font
  3730. - */
  3731. - if (FT_Get_Char_Index (face, 0))
  3732. - {
  3733. - ucs4 = 0;
  3734. - gindex = 1;
  3735. - }
  3736. - else
  3737. - {
  3738. - ucs4 = FT_Get_Next_Char (face, 0, &gindex);
  3739. - if (!ucs4)
  3740. - gindex = 0;
  3741. - }
  3742. -
  3743. - while (gindex)
  3744. - {
  3745. - page = ucs4 >> 8;
  3746. - leaf = 0;
  3747. - while ((ucs4 >> 8) == page)
  3748. - {
  3749. - glyph = FT_Get_Char_Index (face, ucs4);
  3750. - if (glyph && FcFreeTypeCheckGlyph (face, ucs4,
  3751. - glyph, blanks))
  3752. - {
  3753. - if (!leaf)
  3754. - {
  3755. - leaf = FcCharSetFindLeafCreate (fcs, ucs4);
  3756. - if (!leaf)
  3757. - goto bail1;
  3758. - }
  3759. - off = ucs4 & 0xff;
  3760. - leaf->map[off >> 5] |= (1 << (off & 0x1f));
  3761. -#ifdef CHECK
  3762. - if (ucs4 > font_max)
  3763. - font_max = ucs4;
  3764. -#endif
  3765. - }
  3766. - ucs4++;
  3767. - }
  3768. - ucs4 = FT_Get_Next_Char (face, ucs4 - 1, &gindex);
  3769. - if (!ucs4)
  3770. - gindex = 0;
  3771. - }
  3772. -#ifdef CHECK
  3773. - for (ucs4 = 0; ucs4 < 0x10000; ucs4++)
  3774. - {
  3775. - FcBool FT_Has, FC_Has;
  3776. -
  3777. - FT_Has = FT_Get_Char_Index (face, ucs4) != 0;
  3778. - FC_Has = FcCharSetHasChar (fcs, ucs4);
  3779. - if (FT_Has != FC_Has)
  3780. - {
  3781. - printf ("0x%08x FT says %d FC says %d\n", ucs4, FT_Has, FC_Has);
  3782. - }
  3783. - }
  3784. -#endif
  3785. - }
  3786. - }
  3787. -#ifdef CHECK
  3788. - printf ("%d glyphs %d encoded\n", (int) face->num_glyphs, FcCharSetCount (fcs));
  3789. - for (ucs4 = 0; ucs4 <= font_max; ucs4++)
  3790. - {
  3791. - FcBool has_char = FcFreeTypeCharIndex (face, ucs4) != 0;
  3792. - FcBool has_bit = FcCharSetHasChar (fcs, ucs4);
  3793. -
  3794. - if (has_char && !has_bit)
  3795. - printf ("Bitmap missing char 0x%x\n", ucs4);
  3796. - else if (!has_char && has_bit)
  3797. - printf ("Bitmap extra char 0x%x\n", ucs4);
  3798. - }
  3799. -#endif
  3800. - return fcs;
  3801. -bail1:
  3802. - FcCharSetDestroy (fcs);
  3803. -bail0:
  3804. - return 0;
  3805. -}
  3806. -
  3807. diff -dur xc/extras/fontconfig/src/fcdbg.c xc-p/extras/fontconfig/src/fcdbg.c
  3808. --- xc/extras/fontconfig/src/fcdbg.c 2003-09-25 13:01:22.000000000 +0200
  3809. +++ xc-p/extras/fontconfig/src/fcdbg.c 2004-11-11 22:22:24.000000000 +0100
  3810. @@ -1,7 +1,7 @@
  3811. /*
  3812. - * $XFree86: xc/extras/fontconfig/src/fcdbg.c,v 1.1.1.1 2003/06/04 02:57:52 dawes Exp $
  3813. + * $RCSId: xc/lib/fontconfig/src/fcdbg.c,v 1.10 2002/08/22 18:53:22 keithp Exp $
  3814. *
  3815. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  3816. + * Copyright � 2000 Keith Packard
  3817. *
  3818. * Permission to use, copy, modify, distribute, and sell this software and its
  3819. * documentation for any purpose is hereby granted without fee, provided that
  3820. @@ -34,10 +34,10 @@
  3821. printf (" <void>");
  3822. break;
  3823. case FcTypeInteger:
  3824. - printf (" %d", v.u.i);
  3825. + printf (" %d(i)", v.u.i);
  3826. break;
  3827. case FcTypeDouble:
  3828. - printf (" %g", v.u.d);
  3829. + printf (" %g(f)", v.u.d);
  3830. break;
  3831. case FcTypeString:
  3832. printf (" \"%s\"", v.u.s);
  3833. @@ -52,7 +52,8 @@
  3834. printf (" set");
  3835. break;
  3836. case FcTypeLangSet:
  3837. - printf (" langset");
  3838. + printf (" ");
  3839. + FcLangSetPrint (v.u.l);
  3840. break;
  3841. case FcTypeFTFace:
  3842. printf (" face");
  3843. @@ -66,12 +67,35 @@
  3844. for (; l; l = l->next)
  3845. {
  3846. FcValuePrint (l->value);
  3847. - if (l->binding == FcValueBindingWeak)
  3848. + switch (l->binding) {
  3849. + case FcValueBindingWeak:
  3850. printf ("(w)");
  3851. + break;
  3852. + case FcValueBindingStrong:
  3853. + printf ("(s)");
  3854. + break;
  3855. + case FcValueBindingSame:
  3856. + printf ("(=)");
  3857. + break;
  3858. + }
  3859. }
  3860. }
  3861. void
  3862. +FcLangSetPrint (const FcLangSet *ls)
  3863. +{
  3864. + FcStrBuf buf;
  3865. + FcChar8 init_buf[1024];
  3866. +
  3867. + FcStrBufInit (&buf, init_buf, sizeof (init_buf));
  3868. + if (FcNameUnparseLangSet (&buf, ls) && FcStrBufChar (&buf,'\0'))
  3869. + printf ("%s", buf.buf);
  3870. + else
  3871. + printf ("langset (alloc error)");
  3872. + FcStrBufDestroy (&buf);
  3873. +}
  3874. +
  3875. +void
  3876. FcPatternPrint (const FcPattern *p)
  3877. {
  3878. int i;
  3879. @@ -129,6 +153,10 @@
  3880. case FcOpNot: printf ("Not"); break;
  3881. case FcOpNil: printf ("Nil"); break;
  3882. case FcOpComma: printf ("Comma"); break;
  3883. + case FcOpFloor: printf ("Floor"); break;
  3884. + case FcOpCeil: printf ("Ceil"); break;
  3885. + case FcOpRound: printf ("Round"); break;
  3886. + case FcOpTrunc: printf ("Trunc"); break;
  3887. case FcOpInvalid: printf ("Invalid"); break;
  3888. }
  3889. }
  3890. @@ -136,7 +164,8 @@
  3891. void
  3892. FcExprPrint (const FcExpr *expr)
  3893. {
  3894. - switch (expr->op) {
  3895. + if (!expr) printf ("none");
  3896. + else switch (expr->op) {
  3897. case FcOpInteger: printf ("%d", expr->u.ival); break;
  3898. case FcOpDouble: printf ("%g", expr->u.dval); break;
  3899. case FcOpString: printf ("\"%s\"", expr->u.sval); break;
  3900. @@ -211,6 +240,22 @@
  3901. printf ("Not ");
  3902. FcExprPrint (expr->u.tree.left);
  3903. break;
  3904. + case FcOpFloor:
  3905. + printf ("Floor ");
  3906. + FcExprPrint (expr->u.tree.left);
  3907. + break;
  3908. + case FcOpCeil:
  3909. + printf ("Ceil ");
  3910. + FcExprPrint (expr->u.tree.left);
  3911. + break;
  3912. + case FcOpRound:
  3913. + printf ("Round ");
  3914. + FcExprPrint (expr->u.tree.left);
  3915. + break;
  3916. + case FcOpTrunc:
  3917. + printf ("Trunc ");
  3918. + FcExprPrint (expr->u.tree.left);
  3919. + break;
  3920. case FcOpInvalid: printf ("Invalid"); break;
  3921. }
  3922. }
  3923. diff -dur xc/extras/fontconfig/src/fcdefault.c xc-p/extras/fontconfig/src/fcdefault.c
  3924. --- xc/extras/fontconfig/src/fcdefault.c 2003-09-25 13:01:22.000000000 +0200
  3925. +++ xc-p/extras/fontconfig/src/fcdefault.c 2004-11-11 22:22:24.000000000 +0100
  3926. @@ -1,7 +1,7 @@
  3927. /*
  3928. - * $XFree86: xc/extras/fontconfig/src/fcdefault.c,v 1.1.1.1 2003/06/04 02:57:52 dawes Exp $
  3929. + * $RCSId: xc/lib/fontconfig/src/fcdefault.c,v 1.2 2002/07/09 22:08:14 keithp Exp $
  3930. *
  3931. - * Copyright � 2001 Keith Packard, member of The XFree86 Project, Inc.
  3932. + * Copyright � 2001 Keith Packard
  3933. *
  3934. * Permission to use, copy, modify, distribute, and sell this software and its
  3935. * documentation for any purpose is hereby granted without fee, provided that
  3936. @@ -55,6 +55,9 @@
  3937. }
  3938. }
  3939. + if (FcPatternGet (pattern, FC_WIDTH, 0, &v) == FcResultNoMatch)
  3940. + FcPatternAddInteger (pattern, FC_WIDTH, FC_WIDTH_NORMAL);
  3941. +
  3942. for (i = 0; i < NUM_FC_BOOL_DEFAULTS; i++)
  3943. if (FcPatternGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch)
  3944. FcPatternAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value);
  3945. diff -dur xc/extras/fontconfig/src/fcdir.c xc-p/extras/fontconfig/src/fcdir.c
  3946. --- xc/extras/fontconfig/src/fcdir.c 2003-06-04 18:29:39.000000000 +0200
  3947. +++ xc-p/extras/fontconfig/src/fcdir.c 2004-11-11 22:22:24.000000000 +0100
  3948. @@ -1,5 +1,7 @@
  3949. /*
  3950. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  3951. + * $RCSId: xc/lib/fontconfig/src/fcdir.c,v 1.9 2002/08/31 22:17:32 keithp Exp $
  3952. + *
  3953. + * Copyright � 2000 Keith Packard
  3954. *
  3955. * Permission to use, copy, modify, distribute, and sell this software and its
  3956. * documentation for any purpose is hereby granted without fee, provided that
  3957. @@ -19,7 +21,6 @@
  3958. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  3959. * PERFORMANCE OF THIS SOFTWARE.
  3960. */
  3961. -/* $XFree86: xc/extras/fontconfig/src/fcdir.c,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  3962. #include "fcint.h"
  3963. #include <dirent.h>
  3964. @@ -46,6 +47,7 @@
  3965. FcChar8 *name;
  3966. FcPattern *font;
  3967. FcBool ret = FcTrue;
  3968. + FcBool isDir;
  3969. int count = 0;
  3970. FcGlobalCacheFile *cache_file;
  3971. FcGlobalCacheDir *cache_dir;
  3972. @@ -68,7 +70,7 @@
  3973. /*
  3974. * Found a cache entry for the file
  3975. */
  3976. - if (FcGlobalCacheCheckTime (&cache_file->info))
  3977. + if (FcGlobalCacheCheckTime (file, &cache_file->info))
  3978. {
  3979. name = cache_file->name;
  3980. need_scan = FcFalse;
  3981. @@ -87,7 +89,8 @@
  3982. strlen ((const char *) file),
  3983. FcFalse)))
  3984. {
  3985. - if (FcGlobalCacheCheckTime (&cache_dir->info))
  3986. + if (FcGlobalCacheCheckTime (cache_dir->info.file,
  3987. + &cache_dir->info))
  3988. {
  3989. font = 0;
  3990. need_scan = FcFalse;
  3991. @@ -110,11 +113,11 @@
  3992. font = FcFreeTypeQuery (file, id, blanks, &count);
  3993. if (FcDebug () & FC_DBG_SCAN)
  3994. printf ("done\n");
  3995. + isDir = FcFalse;
  3996. if (!font && FcFileIsDir (file))
  3997. {
  3998. + isDir = FcTrue;
  3999. ret = FcStrSetAdd (dirs, file);
  4000. - if (cache && ret)
  4001. - FcGlobalCacheUpdate (cache, file, 0, FC_FONT_FILE_DIR);
  4002. }
  4003. /*
  4004. * Update the cache
  4005. @@ -150,6 +153,11 @@
  4006. #define FC_MAX_FILE_LEN 4096
  4007. +/*
  4008. + * Scan 'dir', adding font files to 'set' and
  4009. + * subdirectories to 'dirs'
  4010. + */
  4011. +
  4012. FcBool
  4013. FcDirScan (FcFontSet *set,
  4014. FcStrSet *dirs,
  4015. @@ -170,7 +178,11 @@
  4016. * Check fonts.cache-<version> file
  4017. */
  4018. if (FcDirCacheReadDir (set, dirs, dir))
  4019. + {
  4020. + if (cache)
  4021. + FcGlobalCacheReferenceSubdir (cache, dir);
  4022. return FcTrue;
  4023. + }
  4024. /*
  4025. * Check ~/.fonts.cache-<version> file
  4026. @@ -188,6 +200,9 @@
  4027. strcat ((char *) file, "/");
  4028. base = file + strlen ((char *) file);
  4029. + if (FcDebug () & FC_DBG_SCAN)
  4030. + printf ("\tScanning dir %s\n", dir);
  4031. +
  4032. d = opendir ((char *) dir);
  4033. if (!d)
  4034. @@ -208,6 +223,10 @@
  4035. }
  4036. free (file);
  4037. closedir (d);
  4038. + /*
  4039. + * Now that the directory has been scanned,
  4040. + * add the cache entry
  4041. + */
  4042. if (ret && cache)
  4043. FcGlobalCacheUpdate (cache, dir, 0, 0);
  4044. diff -dur xc/extras/fontconfig/src/fcfreetype.c xc-p/extras/fontconfig/src/fcfreetype.c
  4045. --- xc/extras/fontconfig/src/fcfreetype.c 2003-11-21 06:56:14.000000000 +0100
  4046. +++ xc-p/extras/fontconfig/src/fcfreetype.c 2004-11-11 22:22:24.000000000 +0100
  4047. @@ -22,6 +22,28 @@
  4048. * PERFORMANCE OF THIS SOFTWARE.
  4049. */
  4050. +/*
  4051. + Copyright � 2002-2003 by Juliusz Chroboczek
  4052. +
  4053. + Permission is hereby granted, free of charge, to any person obtaining a copy
  4054. + of this software and associated documentation files (the "Software"), to deal
  4055. + in the Software without restriction, including without limitation the rights
  4056. + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  4057. + copies of the Software, and to permit persons to whom the Software is
  4058. + furnished to do so, subject to the following conditions:
  4059. +
  4060. + The above copyright notice and this permission notice shall be included in
  4061. + all copies or substantial portions of the Software.
  4062. +
  4063. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  4064. + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  4065. + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  4066. + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  4067. + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  4068. + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  4069. + THE SOFTWARE.
  4070. +*/
  4071. +
  4072. #include <stdlib.h>
  4073. #include <stdio.h>
  4074. #include <string.h>
  4075. @@ -33,6 +55,8 @@
  4076. #include FT_SFNT_NAMES_H
  4077. #include FT_TRUETYPE_IDS_H
  4078. +#include <freetype/t1tables.h>
  4079. +
  4080. /*
  4081. * Keep Han languages separated by eliminating languages
  4082. * that the codePageRange bits says aren't supported
  4083. @@ -90,7 +125,8 @@
  4084. return FcTrue;
  4085. if (page == 0xfb)
  4086. return FcTrue;
  4087. - if (page == 0xff)
  4088. + /* halfwidth forms, don't include kana or white parens */
  4089. + if (0xff01 <= ucs4 && ucs4 <= 0xff5e)
  4090. return FcTrue;
  4091. return FcFalse;
  4092. }
  4093. @@ -112,6 +148,115 @@
  4094. return FcTrue;
  4095. }
  4096. +/* Order is significant. For example, some B&H fonts are hinted by
  4097. + URW++, and both strings appear in the notice. */
  4098. +
  4099. +static const struct {
  4100. + const FcChar8 *notice;
  4101. + const FcChar8 *foundry;
  4102. +} FcNoticeFoundries[] = {
  4103. + { (const FcChar8*) "Bigelow", (const FcChar8 *) "b&h" },
  4104. + { (const FcChar8*) "Adobe", (const FcChar8 *) "adobe" },
  4105. + { (const FcChar8*) "Bitstream", (const FcChar8 *) "bitstream" },
  4106. + { (const FcChar8*) "Monotype", (const FcChar8 *) "monotype" },
  4107. + { (const FcChar8*) "Linotype", (const FcChar8 *) "linotype" },
  4108. + { (const FcChar8*) "LINOTYPE-HELL", (const FcChar8 *) "linotype" },
  4109. + { (const FcChar8*) "IBM", (const FcChar8 *) "ibm" },
  4110. + { (const FcChar8*) "URW", (const FcChar8 *) "urw" },
  4111. + { (const FcChar8*) "International Typeface Corporation",
  4112. + (const FcChar8 *) "itc" },
  4113. + { (const FcChar8*) "Tiro Typeworks",(const FcChar8 *) "tiro" },
  4114. + { (const FcChar8*) "XFree86", (const FcChar8 *) "xfree86" },
  4115. + { (const FcChar8*) "Microsoft", (const FcChar8 *) "microsoft" },
  4116. + { (const FcChar8*) "Omega", (const FcChar8 *) "omega" },
  4117. + { (const FcChar8*) "Font21", (const FcChar8 *) "hwan" },
  4118. + { (const FcChar8*) "HanYang System",(const FcChar8 *) "hanyang" }
  4119. +};
  4120. +
  4121. +#define NUM_NOTICE_FOUNDRIES (sizeof (FcNoticeFoundries) / sizeof (FcNoticeFoundries[0]))
  4122. +
  4123. +static const FcChar8 *
  4124. +FcNoticeFoundry(const char *notice)
  4125. +{
  4126. + int i;
  4127. +
  4128. + if (notice)
  4129. + for(i = 0; i < NUM_NOTICE_FOUNDRIES; i++)
  4130. + if (strstr ((const char *) notice, (const char *) FcNoticeFoundries[i].notice))
  4131. + return FcNoticeFoundries[i].foundry;
  4132. + return 0;
  4133. +}
  4134. +
  4135. +static FcBool
  4136. +FcVendorMatch(const char *vendor, const char *vendor_string)
  4137. +{
  4138. + /* vendor is not necessarily NUL-terminated. */
  4139. + int i, len;
  4140. +
  4141. + len = strlen(vendor_string);
  4142. + if (memcmp(vendor, vendor_string, len) != 0)
  4143. + return FcFalse;
  4144. + for (i = len; i < 4; i++)
  4145. + if (vendor[i] != ' ' && vendor[i] != '\0')
  4146. + return FcFalse;
  4147. + return FcTrue;
  4148. +}
  4149. +
  4150. +/* This table is partly taken from ttmkfdir by Joerg Pommnitz. */
  4151. +
  4152. +/* It should not contain useless entries (such as UNKN) nor duplicate
  4153. + entries for padding both with spaces and NULs. */
  4154. +
  4155. +static const struct {
  4156. + const FcChar8 *vendor;
  4157. + const FcChar8 *foundry;
  4158. +} FcVendorFoundries[] = {
  4159. + { (const FcChar8*) "ADBE", (const FcChar8 *) "adobe"},
  4160. + { (const FcChar8*) "AGFA", (const FcChar8 *) "agfa"},
  4161. + { (const FcChar8*) "ALTS", (const FcChar8 *) "altsys"},
  4162. + { (const FcChar8*) "APPL", (const FcChar8 *) "apple"},
  4163. + { (const FcChar8*) "ARPH", (const FcChar8 *) "arphic"},
  4164. + { (const FcChar8*) "ATEC", (const FcChar8 *) "alltype"},
  4165. + { (const FcChar8*) "B&H", (const FcChar8 *) "b&h"},
  4166. + { (const FcChar8*) "BITS", (const FcChar8 *) "bitstream"},
  4167. + { (const FcChar8*) "CANO", (const FcChar8 *) "cannon"},
  4168. + { (const FcChar8*) "DYNA", (const FcChar8 *) "dynalab"},
  4169. + { (const FcChar8*) "EPSN", (const FcChar8 *) "epson"},
  4170. + { (const FcChar8*) "FJ", (const FcChar8 *) "fujitsu"},
  4171. + { (const FcChar8*) "IBM", (const FcChar8 *) "ibm"},
  4172. + { (const FcChar8*) "ITC", (const FcChar8 *) "itc"},
  4173. + { (const FcChar8*) "IMPR", (const FcChar8 *) "impress"},
  4174. + { (const FcChar8*) "LARA", (const FcChar8 *) "larabiefonts"},
  4175. + { (const FcChar8*) "LEAF", (const FcChar8 *) "interleaf"},
  4176. + { (const FcChar8*) "LETR", (const FcChar8 *) "letraset"},
  4177. + { (const FcChar8*) "LINO", (const FcChar8 *) "linotype"},
  4178. + { (const FcChar8*) "MACR", (const FcChar8 *) "macromedia"},
  4179. + { (const FcChar8*) "MONO", (const FcChar8 *) "monotype"},
  4180. + { (const FcChar8*) "MS", (const FcChar8 *) "microsoft"},
  4181. + { (const FcChar8*) "MT", (const FcChar8 *) "monotype"},
  4182. + { (const FcChar8*) "NEC", (const FcChar8 *) "nec"},
  4183. + { (const FcChar8*) "PARA", (const FcChar8 *) "paratype"},
  4184. + { (const FcChar8*) "QMSI", (const FcChar8 *) "qms"},
  4185. + { (const FcChar8*) "RICO", (const FcChar8 *) "ricoh"},
  4186. + { (const FcChar8*) "URW", (const FcChar8 *) "urw"},
  4187. + { (const FcChar8*) "Y&Y", (const FcChar8 *) "y&y"}
  4188. +};
  4189. +
  4190. +#define NUM_VENDOR_FOUNDRIES (sizeof (FcVendorFoundries) / sizeof (FcVendorFoundries[0]))
  4191. +
  4192. +static const FcChar8 *
  4193. +FcVendorFoundry(const char *vendor)
  4194. +{
  4195. + int i;
  4196. +
  4197. + if (vendor)
  4198. + for(i = 0; i < NUM_VENDOR_FOUNDRIES; i++)
  4199. + if (FcVendorMatch (vendor, FcVendorFoundries[i].vendor))
  4200. + return FcVendorFoundries[i].foundry;
  4201. + return 0;
  4202. +}
  4203. +
  4204. +
  4205. FcPattern *
  4206. FcFreeTypeQuery (const FcChar8 *file,
  4207. int id,
  4208. @@ -122,13 +267,17 @@
  4209. FcPattern *pat;
  4210. int slant;
  4211. int weight;
  4212. + int width = -1;
  4213. int i;
  4214. FcCharSet *cs;
  4215. FcLangSet *ls;
  4216. FT_Library ftLibrary;
  4217. - FcChar8 *family;
  4218. - FcChar8 *style;
  4219. + FcChar8 *family = 0;
  4220. + FcChar8 *style = 0;
  4221. + const FcChar8 *foundry = 0;
  4222. + int spacing;
  4223. TT_OS2 *os2;
  4224. + PS_FontInfoRec psfontinfo;
  4225. TT_Header *head;
  4226. const FcChar8 *exclusiveLang = 0;
  4227. FT_SfntName sname;
  4228. @@ -163,23 +312,32 @@
  4229. if (face->style_flags & FT_STYLE_FLAG_ITALIC)
  4230. slant = FC_SLANT_ITALIC;
  4231. - if (!FcPatternAddInteger (pat, FC_SLANT, slant))
  4232. - goto bail1;
  4233. weight = FC_WEIGHT_MEDIUM;
  4234. if (face->style_flags & FT_STYLE_FLAG_BOLD)
  4235. weight = FC_WEIGHT_BOLD;
  4236. - if (!FcPatternAddInteger (pat, FC_WEIGHT, weight))
  4237. - goto bail1;
  4238. + /*
  4239. + * Get the OS/2 table
  4240. + */
  4241. + os2 = (TT_OS2 *) FT_Get_Sfnt_Table (face, ft_sfnt_os2);
  4242. +
  4243. + /*
  4244. + * Look first in the OS/2 table for the foundry, if
  4245. + * not found here, the various notices will be searched for
  4246. + * that information, either from the sfnt name tables or
  4247. + * the Postscript FontInfo dictionary. Finally, the
  4248. + * BDF properties will queried.
  4249. + */
  4250. +
  4251. + if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
  4252. + foundry = FcVendorFoundry(os2->achVendID);
  4253. /*
  4254. * Grub through the name table looking for family
  4255. * and style names. FreeType makes quite a hash
  4256. * of them
  4257. */
  4258. - family = 0;
  4259. - style = 0;
  4260. snamec = FT_Get_Sfnt_Name_Count (face);
  4261. for (snamei = 0; snamei < snamec; snamei++)
  4262. {
  4263. @@ -289,7 +447,9 @@
  4264. prio |= FC_NAME_PRIO_NAME_PS;
  4265. break;
  4266. case TT_NAME_ID_FONT_SUBFAMILY:
  4267. - break;
  4268. + case TT_NAME_ID_TRADEMARK:
  4269. + case TT_NAME_ID_MANUFACTURER:
  4270. + break;
  4271. default:
  4272. continue;
  4273. }
  4274. @@ -402,6 +562,12 @@
  4275. style_prio = prio;
  4276. }
  4277. break;
  4278. + case TT_NAME_ID_TRADEMARK:
  4279. + case TT_NAME_ID_MANUFACTURER:
  4280. + /* If the foundry wasn't found in the OS/2 table, look here */
  4281. + if(!foundry)
  4282. + foundry = FcNoticeFoundry(utf8);
  4283. + break;
  4284. }
  4285. if (utf8)
  4286. free (utf8);
  4287. @@ -468,7 +634,12 @@
  4288. if (!FcPatternAddString (pat, FC_SOURCE, (FcChar8 *) "FreeType"))
  4289. goto bail1;
  4290. -#if 1
  4291. +#if 0
  4292. + /*
  4293. + * don't even try this -- CJK 'monospace' fonts are really
  4294. + * dual width, and most other fonts don't bother to set
  4295. + * the attribute. Sigh.
  4296. + */
  4297. if ((face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0)
  4298. if (!FcPatternAddInteger (pat, FC_SPACING, FC_MONO))
  4299. goto bail1;
  4300. @@ -489,10 +660,6 @@
  4301. goto bail1;
  4302. }
  4303. - /*
  4304. - * Get the OS/2 table and poke about
  4305. - */
  4306. - os2 = (TT_OS2 *) FT_Get_Sfnt_Table (face, ft_sfnt_os2);
  4307. if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
  4308. {
  4309. for (i = 0; i < NUM_CODE_PAGE_RANGE; i++)
  4310. @@ -526,10 +693,185 @@
  4311. }
  4312. }
  4313. + if (os2 && os2->version != 0xffff)
  4314. + {
  4315. + if (os2->usWeightClass == 0)
  4316. + weight = -1;
  4317. + else if (os2->usWeightClass < 150)
  4318. + weight = FC_WEIGHT_THIN;
  4319. + else if (os2->usWeightClass < 250)
  4320. + weight = FC_WEIGHT_EXTRALIGHT;
  4321. + else if (os2->usWeightClass < 350)
  4322. + weight = FC_WEIGHT_LIGHT;
  4323. + else if (os2->usWeightClass < 450)
  4324. + weight = FC_WEIGHT_REGULAR;
  4325. + else if (os2->usWeightClass < 550)
  4326. + weight = FC_WEIGHT_MEDIUM;
  4327. + else if (os2->usWeightClass < 650)
  4328. + weight = FC_WEIGHT_SEMIBOLD;
  4329. + else if (os2->usWeightClass < 750)
  4330. + weight = FC_WEIGHT_BOLD;
  4331. + else if (os2->usWeightClass < 850)
  4332. + weight = FC_WEIGHT_EXTRABOLD;
  4333. + else if (os2->usWeightClass < 950)
  4334. + weight = FC_WEIGHT_BLACK;
  4335. + else
  4336. + weight = FC_WEIGHT_MEDIUM;
  4337. +
  4338. + switch (os2->usWidthClass) {
  4339. + case 1: width = FC_WIDTH_ULTRACONDENSED; break;
  4340. + case 2: width = FC_WIDTH_EXTRACONDENSED; break;
  4341. + case 3: width = FC_WIDTH_CONDENSED; break;
  4342. + case 4: width = FC_WIDTH_SEMICONDENSED; break;
  4343. + case 5: width = FC_WIDTH_NORMAL; break;
  4344. + case 6: width = FC_WIDTH_SEMIEXPANDED; break;
  4345. + case 7: width = FC_WIDTH_EXPANDED; break;
  4346. + case 8: width = FC_WIDTH_EXTRAEXPANDED; break;
  4347. + case 9: width = FC_WIDTH_ULTRAEXPANDED; break;
  4348. + }
  4349. + }
  4350. +
  4351. + /*
  4352. + * Type 1: Check for FontInfo dictionary information
  4353. + * Code from g2@magestudios.net (Gerard Escalante)
  4354. + */
  4355. +
  4356. + if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
  4357. + {
  4358. + if (psfontinfo.weight)
  4359. + {
  4360. + static struct {
  4361. + char *name;
  4362. + int value;
  4363. + } ps_weights[] = {
  4364. + { "thin", FC_WEIGHT_THIN },
  4365. + { "extralight", FC_WEIGHT_EXTRALIGHT },
  4366. + { "ultralight", FC_WEIGHT_ULTRALIGHT },
  4367. + { "light", FC_WEIGHT_LIGHT },
  4368. + { "regular", FC_WEIGHT_REGULAR },
  4369. + { "normal", FC_WEIGHT_NORMAL },
  4370. + { "medium", FC_WEIGHT_MEDIUM },
  4371. + { "demibold", FC_WEIGHT_DEMIBOLD },
  4372. + { "semibold", FC_WEIGHT_SEMIBOLD },
  4373. + { "bold", FC_WEIGHT_BOLD },
  4374. + { "extrabold", FC_WEIGHT_EXTRABOLD },
  4375. + { "ultrabold", FC_WEIGHT_ULTRABOLD },
  4376. + { "black", FC_WEIGHT_BLACK },
  4377. + { "heavy", FC_WEIGHT_HEAVY },
  4378. + };
  4379. +#define NUM_PS_WEIGHTS (sizeof (ps_weights) / sizeof (ps_weights[0]))
  4380. + int w;
  4381. + for (w = 0; w < NUM_PS_WEIGHTS; w++)
  4382. + if (!FcStrCmpIgnoreCase ((FcChar8 *) ps_weights[w].name,
  4383. + (FcChar8 *) psfontinfo.weight))
  4384. + {
  4385. + weight = ps_weights[w].value;
  4386. + break;
  4387. + }
  4388. + }
  4389. +
  4390. +#if 0
  4391. + /*
  4392. + * Don't bother with italic_angle; FreeType already extracts that
  4393. + * information for us and sticks it into style_flags
  4394. + */
  4395. + if (psfontinfo.italic_angle < 0)
  4396. + slant = FC_SLANT_ITALIC;
  4397. + else if (psfontinfo.italic_angle >= 0)
  4398. + slant = FC_SLANT_ROMAN;
  4399. +#endif
  4400. +
  4401. + if(!foundry)
  4402. + foundry = FcNoticeFoundry(psfontinfo.notice);
  4403. + }
  4404. +
  4405. +#ifdef USE_FTBDF
  4406. + /*
  4407. + * Finally, look for a FOUNDRY BDF property if no other
  4408. + * mechanism has managed to locate a foundry
  4409. + */
  4410. +
  4411. + if (!foundry)
  4412. + {
  4413. + int rc;
  4414. + BDF_PropertyRec prop;
  4415. + rc = MY_Get_BDF_Property(face, "FOUNDRY", &prop);
  4416. + if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_ATOM)
  4417. + foundry = prop.u.atom;
  4418. + }
  4419. +
  4420. + if (width == -1)
  4421. + {
  4422. + BDF_PropertyRec prop;
  4423. + if (MY_Get_BDF_Property(face, "RELATIVE_SETWIDTH", &prop) == 0 &&
  4424. + (prop.type == BDF_PROPERTY_TYPE_INTEGER ||
  4425. + prop.type == BDF_PROPERTY_TYPE_CARDINAL))
  4426. + {
  4427. + FT_Int32 value;
  4428. +
  4429. + if (prop.type == BDF_PROPERTY_TYPE_INTEGER)
  4430. + value = prop.u.integer;
  4431. + else
  4432. + value = (FT_Int32) prop.u.cardinal;
  4433. + switch ((value + 5) / 10) {
  4434. + case 1: width = FC_WIDTH_ULTRACONDENSED; break;
  4435. + case 2: width = FC_WIDTH_EXTRACONDENSED; break;
  4436. + case 3: width = FC_WIDTH_CONDENSED; break;
  4437. + case 4: width = FC_WIDTH_SEMICONDENSED; break;
  4438. + case 5: width = FC_WIDTH_NORMAL; break;
  4439. + case 6: width = FC_WIDTH_SEMIEXPANDED; break;
  4440. + case 7: width = FC_WIDTH_EXPANDED; break;
  4441. + case 8: width = FC_WIDTH_EXTRAEXPANDED; break;
  4442. + case 9: width = FC_WIDTH_ULTRAEXPANDED; break;
  4443. + }
  4444. + }
  4445. + else if (MY_Get_BDF_Property (face, "SETWIDTH_NAME", &prop) == 0 &&
  4446. + prop.type == BDF_PROPERTY_TYPE_ATOM)
  4447. + {
  4448. + static struct {
  4449. + FcChar8 *width_name;
  4450. + int width;
  4451. + } FcSetWidths[] = {
  4452. + { "Condensed", FC_WIDTH_CONDENSED },
  4453. + { "SemiCondensed", FC_WIDTH_SEMICONDENSED },
  4454. + { "Normal", FC_WIDTH_NORMAL },
  4455. + };
  4456. + int i;
  4457. +
  4458. + if (FcDebug () & FC_DBG_SCANV)
  4459. + printf ("\nsetwidth: %s\n", prop.u.atom);
  4460. + for (i = 0; i < sizeof (FcSetWidths) / sizeof (FcSetWidths[0]); i++)
  4461. + if (!FcStrCmpIgnoreCase ((FcChar8 *) prop.u.atom,
  4462. + FcSetWidths[i].width_name))
  4463. + {
  4464. + width = FcSetWidths[i].width;
  4465. + break;
  4466. + }
  4467. + }
  4468. + }
  4469. +
  4470. +#endif
  4471. +
  4472. + if (!FcPatternAddInteger (pat, FC_SLANT, slant))
  4473. + goto bail1;
  4474. +
  4475. + if (!FcPatternAddInteger (pat, FC_WEIGHT, weight))
  4476. + goto bail1;
  4477. +
  4478. + if (width != -1)
  4479. + if (!FcPatternAddInteger (pat, FC_WIDTH, width))
  4480. + goto bail1;
  4481. +
  4482. + if(foundry)
  4483. + {
  4484. + if(!FcPatternAddString (pat, FC_FOUNDRY, foundry))
  4485. + goto bail1;
  4486. + }
  4487. +
  4488. /*
  4489. * Compute the unicode coverage for the font
  4490. */
  4491. - cs = FcFreeTypeCharSet (face, blanks);
  4492. + cs = FcFreeTypeCharSetAndSpacing (face, blanks, &spacing);
  4493. if (!cs)
  4494. goto bail1;
  4495. @@ -553,6 +895,10 @@
  4496. if (!FcPatternAddLangSet (pat, FC_LANG, ls))
  4497. goto bail2;
  4498. + if (spacing != FC_PROPORTIONAL)
  4499. + if (!FcPatternAddInteger (pat, FC_SPACING, spacing))
  4500. + goto bail2;
  4501. +
  4502. /*
  4503. * Drop our reference to the charset
  4504. */
  4505. @@ -582,3 +928,802 @@
  4506. FT_Done_FreeType (ftLibrary);
  4507. return 0;
  4508. }
  4509. +
  4510. +
  4511. +/*
  4512. + * Figure out whether the available freetype has FT_Get_Next_Char
  4513. + */
  4514. +
  4515. +#if FREETYPE_MAJOR > 2
  4516. +# define HAS_NEXT_CHAR
  4517. +#else
  4518. +# if FREETYPE_MAJOR == 2
  4519. +# if FREETYPE_MINOR > 0
  4520. +# define HAS_NEXT_CHAR
  4521. +# else
  4522. +# if FREETYPE_MINOR == 0
  4523. +# if FREETYPE_PATCH >= 9
  4524. +# define HAS_NEXT_CHAR
  4525. +# endif
  4526. +# endif
  4527. +# endif
  4528. +# endif
  4529. +#endif
  4530. +
  4531. +/*
  4532. + * For our purposes, this approximation is sufficient
  4533. + */
  4534. +#ifndef HAS_NEXT_CHAR
  4535. +#define FT_Get_First_Char(face, gi) ((*(gi) = 1), 1)
  4536. +#define FT_Get_Next_Char(face, ucs4, gi) ((ucs4) >= 0xffffff ? \
  4537. + (*(gi) = 0), 0 : \
  4538. + (*(gi) = 1), (ucs4) + 1)
  4539. +#warning "No FT_Get_Next_Char"
  4540. +#endif
  4541. +
  4542. +typedef struct _FcCharEnt {
  4543. + FcChar16 bmp;
  4544. + unsigned char encode;
  4545. +} FcCharEnt;
  4546. +
  4547. +struct _FcCharMap {
  4548. + const FcCharEnt *ent;
  4549. + int nent;
  4550. +};
  4551. +
  4552. +typedef struct _FcFontDecode {
  4553. + FT_Encoding encoding;
  4554. + const FcCharMap *map;
  4555. + FcChar32 max;
  4556. +} FcFontDecode;
  4557. +
  4558. +static const FcCharEnt AppleRomanEnt[] = {
  4559. + { 0x0020, 0x20 }, /* SPACE */
  4560. + { 0x0021, 0x21 }, /* EXCLAMATION MARK */
  4561. + { 0x0022, 0x22 }, /* QUOTATION MARK */
  4562. + { 0x0023, 0x23 }, /* NUMBER SIGN */
  4563. + { 0x0024, 0x24 }, /* DOLLAR SIGN */
  4564. + { 0x0025, 0x25 }, /* PERCENT SIGN */
  4565. + { 0x0026, 0x26 }, /* AMPERSAND */
  4566. + { 0x0027, 0x27 }, /* APOSTROPHE */
  4567. + { 0x0028, 0x28 }, /* LEFT PARENTHESIS */
  4568. + { 0x0029, 0x29 }, /* RIGHT PARENTHESIS */
  4569. + { 0x002A, 0x2A }, /* ASTERISK */
  4570. + { 0x002B, 0x2B }, /* PLUS SIGN */
  4571. + { 0x002C, 0x2C }, /* COMMA */
  4572. + { 0x002D, 0x2D }, /* HYPHEN-MINUS */
  4573. + { 0x002E, 0x2E }, /* FULL STOP */
  4574. + { 0x002F, 0x2F }, /* SOLIDUS */
  4575. + { 0x0030, 0x30 }, /* DIGIT ZERO */
  4576. + { 0x0031, 0x31 }, /* DIGIT ONE */
  4577. + { 0x0032, 0x32 }, /* DIGIT TWO */
  4578. + { 0x0033, 0x33 }, /* DIGIT THREE */
  4579. + { 0x0034, 0x34 }, /* DIGIT FOUR */
  4580. + { 0x0035, 0x35 }, /* DIGIT FIVE */
  4581. + { 0x0036, 0x36 }, /* DIGIT SIX */
  4582. + { 0x0037, 0x37 }, /* DIGIT SEVEN */
  4583. + { 0x0038, 0x38 }, /* DIGIT EIGHT */
  4584. + { 0x0039, 0x39 }, /* DIGIT NINE */
  4585. + { 0x003A, 0x3A }, /* COLON */
  4586. + { 0x003B, 0x3B }, /* SEMICOLON */
  4587. + { 0x003C, 0x3C }, /* LESS-THAN SIGN */
  4588. + { 0x003D, 0x3D }, /* EQUALS SIGN */
  4589. + { 0x003E, 0x3E }, /* GREATER-THAN SIGN */
  4590. + { 0x003F, 0x3F }, /* QUESTION MARK */
  4591. + { 0x0040, 0x40 }, /* COMMERCIAL AT */
  4592. + { 0x0041, 0x41 }, /* LATIN CAPITAL LETTER A */
  4593. + { 0x0042, 0x42 }, /* LATIN CAPITAL LETTER B */
  4594. + { 0x0043, 0x43 }, /* LATIN CAPITAL LETTER C */
  4595. + { 0x0044, 0x44 }, /* LATIN CAPITAL LETTER D */
  4596. + { 0x0045, 0x45 }, /* LATIN CAPITAL LETTER E */
  4597. + { 0x0046, 0x46 }, /* LATIN CAPITAL LETTER F */
  4598. + { 0x0047, 0x47 }, /* LATIN CAPITAL LETTER G */
  4599. + { 0x0048, 0x48 }, /* LATIN CAPITAL LETTER H */
  4600. + { 0x0049, 0x49 }, /* LATIN CAPITAL LETTER I */
  4601. + { 0x004A, 0x4A }, /* LATIN CAPITAL LETTER J */
  4602. + { 0x004B, 0x4B }, /* LATIN CAPITAL LETTER K */
  4603. + { 0x004C, 0x4C }, /* LATIN CAPITAL LETTER L */
  4604. + { 0x004D, 0x4D }, /* LATIN CAPITAL LETTER M */
  4605. + { 0x004E, 0x4E }, /* LATIN CAPITAL LETTER N */
  4606. + { 0x004F, 0x4F }, /* LATIN CAPITAL LETTER O */
  4607. + { 0x0050, 0x50 }, /* LATIN CAPITAL LETTER P */
  4608. + { 0x0051, 0x51 }, /* LATIN CAPITAL LETTER Q */
  4609. + { 0x0052, 0x52 }, /* LATIN CAPITAL LETTER R */
  4610. + { 0x0053, 0x53 }, /* LATIN CAPITAL LETTER S */
  4611. + { 0x0054, 0x54 }, /* LATIN CAPITAL LETTER T */
  4612. + { 0x0055, 0x55 }, /* LATIN CAPITAL LETTER U */
  4613. + { 0x0056, 0x56 }, /* LATIN CAPITAL LETTER V */
  4614. + { 0x0057, 0x57 }, /* LATIN CAPITAL LETTER W */
  4615. + { 0x0058, 0x58 }, /* LATIN CAPITAL LETTER X */
  4616. + { 0x0059, 0x59 }, /* LATIN CAPITAL LETTER Y */
  4617. + { 0x005A, 0x5A }, /* LATIN CAPITAL LETTER Z */
  4618. + { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET */
  4619. + { 0x005C, 0x5C }, /* REVERSE SOLIDUS */
  4620. + { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET */
  4621. + { 0x005E, 0x5E }, /* CIRCUMFLEX ACCENT */
  4622. + { 0x005F, 0x5F }, /* LOW LINE */
  4623. + { 0x0060, 0x60 }, /* GRAVE ACCENT */
  4624. + { 0x0061, 0x61 }, /* LATIN SMALL LETTER A */
  4625. + { 0x0062, 0x62 }, /* LATIN SMALL LETTER B */
  4626. + { 0x0063, 0x63 }, /* LATIN SMALL LETTER C */
  4627. + { 0x0064, 0x64 }, /* LATIN SMALL LETTER D */
  4628. + { 0x0065, 0x65 }, /* LATIN SMALL LETTER E */
  4629. + { 0x0066, 0x66 }, /* LATIN SMALL LETTER F */
  4630. + { 0x0067, 0x67 }, /* LATIN SMALL LETTER G */
  4631. + { 0x0068, 0x68 }, /* LATIN SMALL LETTER H */
  4632. + { 0x0069, 0x69 }, /* LATIN SMALL LETTER I */
  4633. + { 0x006A, 0x6A }, /* LATIN SMALL LETTER J */
  4634. + { 0x006B, 0x6B }, /* LATIN SMALL LETTER K */
  4635. + { 0x006C, 0x6C }, /* LATIN SMALL LETTER L */
  4636. + { 0x006D, 0x6D }, /* LATIN SMALL LETTER M */
  4637. + { 0x006E, 0x6E }, /* LATIN SMALL LETTER N */
  4638. + { 0x006F, 0x6F }, /* LATIN SMALL LETTER O */
  4639. + { 0x0070, 0x70 }, /* LATIN SMALL LETTER P */
  4640. + { 0x0071, 0x71 }, /* LATIN SMALL LETTER Q */
  4641. + { 0x0072, 0x72 }, /* LATIN SMALL LETTER R */
  4642. + { 0x0073, 0x73 }, /* LATIN SMALL LETTER S */
  4643. + { 0x0074, 0x74 }, /* LATIN SMALL LETTER T */
  4644. + { 0x0075, 0x75 }, /* LATIN SMALL LETTER U */
  4645. + { 0x0076, 0x76 }, /* LATIN SMALL LETTER V */
  4646. + { 0x0077, 0x77 }, /* LATIN SMALL LETTER W */
  4647. + { 0x0078, 0x78 }, /* LATIN SMALL LETTER X */
  4648. + { 0x0079, 0x79 }, /* LATIN SMALL LETTER Y */
  4649. + { 0x007A, 0x7A }, /* LATIN SMALL LETTER Z */
  4650. + { 0x007B, 0x7B }, /* LEFT CURLY BRACKET */
  4651. + { 0x007C, 0x7C }, /* VERTICAL LINE */
  4652. + { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET */
  4653. + { 0x007E, 0x7E }, /* TILDE */
  4654. + { 0x00A0, 0xCA }, /* NO-BREAK SPACE */
  4655. + { 0x00A1, 0xC1 }, /* INVERTED EXCLAMATION MARK */
  4656. + { 0x00A2, 0xA2 }, /* CENT SIGN */
  4657. + { 0x00A3, 0xA3 }, /* POUND SIGN */
  4658. + { 0x00A5, 0xB4 }, /* YEN SIGN */
  4659. + { 0x00A7, 0xA4 }, /* SECTION SIGN */
  4660. + { 0x00A8, 0xAC }, /* DIAERESIS */
  4661. + { 0x00A9, 0xA9 }, /* COPYRIGHT SIGN */
  4662. + { 0x00AA, 0xBB }, /* FEMININE ORDINAL INDICATOR */
  4663. + { 0x00AB, 0xC7 }, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
  4664. + { 0x00AC, 0xC2 }, /* NOT SIGN */
  4665. + { 0x00AE, 0xA8 }, /* REGISTERED SIGN */
  4666. + { 0x00AF, 0xF8 }, /* MACRON */
  4667. + { 0x00B0, 0xA1 }, /* DEGREE SIGN */
  4668. + { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN */
  4669. + { 0x00B4, 0xAB }, /* ACUTE ACCENT */
  4670. + { 0x00B5, 0xB5 }, /* MICRO SIGN */
  4671. + { 0x00B6, 0xA6 }, /* PILCROW SIGN */
  4672. + { 0x00B7, 0xE1 }, /* MIDDLE DOT */
  4673. + { 0x00B8, 0xFC }, /* CEDILLA */
  4674. + { 0x00BA, 0xBC }, /* MASCULINE ORDINAL INDICATOR */
  4675. + { 0x00BB, 0xC8 }, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
  4676. + { 0x00BF, 0xC0 }, /* INVERTED QUESTION MARK */
  4677. + { 0x00C0, 0xCB }, /* LATIN CAPITAL LETTER A WITH GRAVE */
  4678. + { 0x00C1, 0xE7 }, /* LATIN CAPITAL LETTER A WITH ACUTE */
  4679. + { 0x00C2, 0xE5 }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
  4680. + { 0x00C3, 0xCC }, /* LATIN CAPITAL LETTER A WITH TILDE */
  4681. + { 0x00C4, 0x80 }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
  4682. + { 0x00C5, 0x81 }, /* LATIN CAPITAL LETTER A WITH RING ABOVE */
  4683. + { 0x00C6, 0xAE }, /* LATIN CAPITAL LETTER AE */
  4684. + { 0x00C7, 0x82 }, /* LATIN CAPITAL LETTER C WITH CEDILLA */
  4685. + { 0x00C8, 0xE9 }, /* LATIN CAPITAL LETTER E WITH GRAVE */
  4686. + { 0x00C9, 0x83 }, /* LATIN CAPITAL LETTER E WITH ACUTE */
  4687. + { 0x00CA, 0xE6 }, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
  4688. + { 0x00CB, 0xE8 }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */
  4689. + { 0x00CC, 0xED }, /* LATIN CAPITAL LETTER I WITH GRAVE */
  4690. + { 0x00CD, 0xEA }, /* LATIN CAPITAL LETTER I WITH ACUTE */
  4691. + { 0x00CE, 0xEB }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
  4692. + { 0x00CF, 0xEC }, /* LATIN CAPITAL LETTER I WITH DIAERESIS */
  4693. + { 0x00D1, 0x84 }, /* LATIN CAPITAL LETTER N WITH TILDE */
  4694. + { 0x00D2, 0xF1 }, /* LATIN CAPITAL LETTER O WITH GRAVE */
  4695. + { 0x00D3, 0xEE }, /* LATIN CAPITAL LETTER O WITH ACUTE */
  4696. + { 0x00D4, 0xEF }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
  4697. + { 0x00D5, 0xCD }, /* LATIN CAPITAL LETTER O WITH TILDE */
  4698. + { 0x00D6, 0x85 }, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
  4699. + { 0x00D8, 0xAF }, /* LATIN CAPITAL LETTER O WITH STROKE */
  4700. + { 0x00D9, 0xF4 }, /* LATIN CAPITAL LETTER U WITH GRAVE */
  4701. + { 0x00DA, 0xF2 }, /* LATIN CAPITAL LETTER U WITH ACUTE */
  4702. + { 0x00DB, 0xF3 }, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
  4703. + { 0x00DC, 0x86 }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
  4704. + { 0x00DF, 0xA7 }, /* LATIN SMALL LETTER SHARP S */
  4705. + { 0x00E0, 0x88 }, /* LATIN SMALL LETTER A WITH GRAVE */
  4706. + { 0x00E1, 0x87 }, /* LATIN SMALL LETTER A WITH ACUTE */
  4707. + { 0x00E2, 0x89 }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
  4708. + { 0x00E3, 0x8B }, /* LATIN SMALL LETTER A WITH TILDE */
  4709. + { 0x00E4, 0x8A }, /* LATIN SMALL LETTER A WITH DIAERESIS */
  4710. + { 0x00E5, 0x8C }, /* LATIN SMALL LETTER A WITH RING ABOVE */
  4711. + { 0x00E6, 0xBE }, /* LATIN SMALL LETTER AE */
  4712. + { 0x00E7, 0x8D }, /* LATIN SMALL LETTER C WITH CEDILLA */
  4713. + { 0x00E8, 0x8F }, /* LATIN SMALL LETTER E WITH GRAVE */
  4714. + { 0x00E9, 0x8E }, /* LATIN SMALL LETTER E WITH ACUTE */
  4715. + { 0x00EA, 0x90 }, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
  4716. + { 0x00EB, 0x91 }, /* LATIN SMALL LETTER E WITH DIAERESIS */
  4717. + { 0x00EC, 0x93 }, /* LATIN SMALL LETTER I WITH GRAVE */
  4718. + { 0x00ED, 0x92 }, /* LATIN SMALL LETTER I WITH ACUTE */
  4719. + { 0x00EE, 0x94 }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
  4720. + { 0x00EF, 0x95 }, /* LATIN SMALL LETTER I WITH DIAERESIS */
  4721. + { 0x00F1, 0x96 }, /* LATIN SMALL LETTER N WITH TILDE */
  4722. + { 0x00F2, 0x98 }, /* LATIN SMALL LETTER O WITH GRAVE */
  4723. + { 0x00F3, 0x97 }, /* LATIN SMALL LETTER O WITH ACUTE */
  4724. + { 0x00F4, 0x99 }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
  4725. + { 0x00F5, 0x9B }, /* LATIN SMALL LETTER O WITH TILDE */
  4726. + { 0x00F6, 0x9A }, /* LATIN SMALL LETTER O WITH DIAERESIS */
  4727. + { 0x00F7, 0xD6 }, /* DIVISION SIGN */
  4728. + { 0x00F8, 0xBF }, /* LATIN SMALL LETTER O WITH STROKE */
  4729. + { 0x00F9, 0x9D }, /* LATIN SMALL LETTER U WITH GRAVE */
  4730. + { 0x00FA, 0x9C }, /* LATIN SMALL LETTER U WITH ACUTE */
  4731. + { 0x00FB, 0x9E }, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
  4732. + { 0x00FC, 0x9F }, /* LATIN SMALL LETTER U WITH DIAERESIS */
  4733. + { 0x00FF, 0xD8 }, /* LATIN SMALL LETTER Y WITH DIAERESIS */
  4734. + { 0x0131, 0xF5 }, /* LATIN SMALL LETTER DOTLESS I */
  4735. + { 0x0152, 0xCE }, /* LATIN CAPITAL LIGATURE OE */
  4736. + { 0x0153, 0xCF }, /* LATIN SMALL LIGATURE OE */
  4737. + { 0x0178, 0xD9 }, /* LATIN CAPITAL LETTER Y WITH DIAERESIS */
  4738. + { 0x0192, 0xC4 }, /* LATIN SMALL LETTER F WITH HOOK */
  4739. + { 0x02C6, 0xF6 }, /* MODIFIER LETTER CIRCUMFLEX ACCENT */
  4740. + { 0x02C7, 0xFF }, /* CARON */
  4741. + { 0x02D8, 0xF9 }, /* BREVE */
  4742. + { 0x02D9, 0xFA }, /* DOT ABOVE */
  4743. + { 0x02DA, 0xFB }, /* RING ABOVE */
  4744. + { 0x02DB, 0xFE }, /* OGONEK */
  4745. + { 0x02DC, 0xF7 }, /* SMALL TILDE */
  4746. + { 0x02DD, 0xFD }, /* DOUBLE ACUTE ACCENT */
  4747. + { 0x03A9, 0xBD }, /* GREEK CAPITAL LETTER OMEGA */
  4748. + { 0x03C0, 0xB9 }, /* GREEK SMALL LETTER PI */
  4749. + { 0x2013, 0xD0 }, /* EN DASH */
  4750. + { 0x2014, 0xD1 }, /* EM DASH */
  4751. + { 0x2018, 0xD4 }, /* LEFT SINGLE QUOTATION MARK */
  4752. + { 0x2019, 0xD5 }, /* RIGHT SINGLE QUOTATION MARK */
  4753. + { 0x201A, 0xE2 }, /* SINGLE LOW-9 QUOTATION MARK */
  4754. + { 0x201C, 0xD2 }, /* LEFT DOUBLE QUOTATION MARK */
  4755. + { 0x201D, 0xD3 }, /* RIGHT DOUBLE QUOTATION MARK */
  4756. + { 0x201E, 0xE3 }, /* DOUBLE LOW-9 QUOTATION MARK */
  4757. + { 0x2020, 0xA0 }, /* DAGGER */
  4758. + { 0x2021, 0xE0 }, /* DOUBLE DAGGER */
  4759. + { 0x2022, 0xA5 }, /* BULLET */
  4760. + { 0x2026, 0xC9 }, /* HORIZONTAL ELLIPSIS */
  4761. + { 0x2030, 0xE4 }, /* PER MILLE SIGN */
  4762. + { 0x2039, 0xDC }, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
  4763. + { 0x203A, 0xDD }, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
  4764. + { 0x2044, 0xDA }, /* FRACTION SLASH */
  4765. + { 0x20AC, 0xDB }, /* EURO SIGN */
  4766. + { 0x2122, 0xAA }, /* TRADE MARK SIGN */
  4767. + { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL */
  4768. + { 0x2206, 0xC6 }, /* INCREMENT */
  4769. + { 0x220F, 0xB8 }, /* N-ARY PRODUCT */
  4770. + { 0x2211, 0xB7 }, /* N-ARY SUMMATION */
  4771. + { 0x221A, 0xC3 }, /* SQUARE ROOT */
  4772. + { 0x221E, 0xB0 }, /* INFINITY */
  4773. + { 0x222B, 0xBA }, /* INTEGRAL */
  4774. + { 0x2248, 0xC5 }, /* ALMOST EQUAL TO */
  4775. + { 0x2260, 0xAD }, /* NOT EQUAL TO */
  4776. + { 0x2264, 0xB2 }, /* LESS-THAN OR EQUAL TO */
  4777. + { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO */
  4778. + { 0x25CA, 0xD7 }, /* LOZENGE */
  4779. + { 0xF8FF, 0xF0 }, /* Apple logo */
  4780. + { 0xFB01, 0xDE }, /* LATIN SMALL LIGATURE FI */
  4781. + { 0xFB02, 0xDF }, /* LATIN SMALL LIGATURE FL */
  4782. +};
  4783. +
  4784. +static const FcCharMap AppleRoman = {
  4785. + AppleRomanEnt,
  4786. + sizeof (AppleRomanEnt) / sizeof (AppleRomanEnt[0])
  4787. +};
  4788. +
  4789. +static const FcCharEnt AdobeSymbolEnt[] = {
  4790. + { 0x0020, 0x20 }, /* SPACE # space */
  4791. + { 0x0021, 0x21 }, /* EXCLAMATION MARK # exclam */
  4792. + { 0x0023, 0x23 }, /* NUMBER SIGN # numbersign */
  4793. + { 0x0025, 0x25 }, /* PERCENT SIGN # percent */
  4794. + { 0x0026, 0x26 }, /* AMPERSAND # ampersand */
  4795. + { 0x0028, 0x28 }, /* LEFT PARENTHESIS # parenleft */
  4796. + { 0x0029, 0x29 }, /* RIGHT PARENTHESIS # parenright */
  4797. + { 0x002B, 0x2B }, /* PLUS SIGN # plus */
  4798. + { 0x002C, 0x2C }, /* COMMA # comma */
  4799. + { 0x002E, 0x2E }, /* FULL STOP # period */
  4800. + { 0x002F, 0x2F }, /* SOLIDUS # slash */
  4801. + { 0x0030, 0x30 }, /* DIGIT ZERO # zero */
  4802. + { 0x0031, 0x31 }, /* DIGIT ONE # one */
  4803. + { 0x0032, 0x32 }, /* DIGIT TWO # two */
  4804. + { 0x0033, 0x33 }, /* DIGIT THREE # three */
  4805. + { 0x0034, 0x34 }, /* DIGIT FOUR # four */
  4806. + { 0x0035, 0x35 }, /* DIGIT FIVE # five */
  4807. + { 0x0036, 0x36 }, /* DIGIT SIX # six */
  4808. + { 0x0037, 0x37 }, /* DIGIT SEVEN # seven */
  4809. + { 0x0038, 0x38 }, /* DIGIT EIGHT # eight */
  4810. + { 0x0039, 0x39 }, /* DIGIT NINE # nine */
  4811. + { 0x003A, 0x3A }, /* COLON # colon */
  4812. + { 0x003B, 0x3B }, /* SEMICOLON # semicolon */
  4813. + { 0x003C, 0x3C }, /* LESS-THAN SIGN # less */
  4814. + { 0x003D, 0x3D }, /* EQUALS SIGN # equal */
  4815. + { 0x003E, 0x3E }, /* GREATER-THAN SIGN # greater */
  4816. + { 0x003F, 0x3F }, /* QUESTION MARK # question */
  4817. + { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET # bracketleft */
  4818. + { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET # bracketright */
  4819. + { 0x005F, 0x5F }, /* LOW LINE # underscore */
  4820. + { 0x007B, 0x7B }, /* LEFT CURLY BRACKET # braceleft */
  4821. + { 0x007C, 0x7C }, /* VERTICAL LINE # bar */
  4822. + { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET # braceright */
  4823. + { 0x00A0, 0x20 }, /* NO-BREAK SPACE # space */
  4824. + { 0x00AC, 0xD8 }, /* NOT SIGN # logicalnot */
  4825. + { 0x00B0, 0xB0 }, /* DEGREE SIGN # degree */
  4826. + { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN # plusminus */
  4827. + { 0x00B5, 0x6D }, /* MICRO SIGN # mu */
  4828. + { 0x00D7, 0xB4 }, /* MULTIPLICATION SIGN # multiply */
  4829. + { 0x00F7, 0xB8 }, /* DIVISION SIGN # divide */
  4830. + { 0x0192, 0xA6 }, /* LATIN SMALL LETTER F WITH HOOK # florin */
  4831. + { 0x0391, 0x41 }, /* GREEK CAPITAL LETTER ALPHA # Alpha */
  4832. + { 0x0392, 0x42 }, /* GREEK CAPITAL LETTER BETA # Beta */
  4833. + { 0x0393, 0x47 }, /* GREEK CAPITAL LETTER GAMMA # Gamma */
  4834. + { 0x0394, 0x44 }, /* GREEK CAPITAL LETTER DELTA # Delta */
  4835. + { 0x0395, 0x45 }, /* GREEK CAPITAL LETTER EPSILON # Epsilon */
  4836. + { 0x0396, 0x5A }, /* GREEK CAPITAL LETTER ZETA # Zeta */
  4837. + { 0x0397, 0x48 }, /* GREEK CAPITAL LETTER ETA # Eta */
  4838. + { 0x0398, 0x51 }, /* GREEK CAPITAL LETTER THETA # Theta */
  4839. + { 0x0399, 0x49 }, /* GREEK CAPITAL LETTER IOTA # Iota */
  4840. + { 0x039A, 0x4B }, /* GREEK CAPITAL LETTER KAPPA # Kappa */
  4841. + { 0x039B, 0x4C }, /* GREEK CAPITAL LETTER LAMDA # Lambda */
  4842. + { 0x039C, 0x4D }, /* GREEK CAPITAL LETTER MU # Mu */
  4843. + { 0x039D, 0x4E }, /* GREEK CAPITAL LETTER NU # Nu */
  4844. + { 0x039E, 0x58 }, /* GREEK CAPITAL LETTER XI # Xi */
  4845. + { 0x039F, 0x4F }, /* GREEK CAPITAL LETTER OMICRON # Omicron */
  4846. + { 0x03A0, 0x50 }, /* GREEK CAPITAL LETTER PI # Pi */
  4847. + { 0x03A1, 0x52 }, /* GREEK CAPITAL LETTER RHO # Rho */
  4848. + { 0x03A3, 0x53 }, /* GREEK CAPITAL LETTER SIGMA # Sigma */
  4849. + { 0x03A4, 0x54 }, /* GREEK CAPITAL LETTER TAU # Tau */
  4850. + { 0x03A5, 0x55 }, /* GREEK CAPITAL LETTER UPSILON # Upsilon */
  4851. + { 0x03A6, 0x46 }, /* GREEK CAPITAL LETTER PHI # Phi */
  4852. + { 0x03A7, 0x43 }, /* GREEK CAPITAL LETTER CHI # Chi */
  4853. + { 0x03A8, 0x59 }, /* GREEK CAPITAL LETTER PSI # Psi */
  4854. + { 0x03A9, 0x57 }, /* GREEK CAPITAL LETTER OMEGA # Omega */
  4855. + { 0x03B1, 0x61 }, /* GREEK SMALL LETTER ALPHA # alpha */
  4856. + { 0x03B2, 0x62 }, /* GREEK SMALL LETTER BETA # beta */
  4857. + { 0x03B3, 0x67 }, /* GREEK SMALL LETTER GAMMA # gamma */
  4858. + { 0x03B4, 0x64 }, /* GREEK SMALL LETTER DELTA # delta */
  4859. + { 0x03B5, 0x65 }, /* GREEK SMALL LETTER EPSILON # epsilon */
  4860. + { 0x03B6, 0x7A }, /* GREEK SMALL LETTER ZETA # zeta */
  4861. + { 0x03B7, 0x68 }, /* GREEK SMALL LETTER ETA # eta */
  4862. + { 0x03B8, 0x71 }, /* GREEK SMALL LETTER THETA # theta */
  4863. + { 0x03B9, 0x69 }, /* GREEK SMALL LETTER IOTA # iota */
  4864. + { 0x03BA, 0x6B }, /* GREEK SMALL LETTER KAPPA # kappa */
  4865. + { 0x03BB, 0x6C }, /* GREEK SMALL LETTER LAMDA # lambda */
  4866. + { 0x03BC, 0x6D }, /* GREEK SMALL LETTER MU # mu */
  4867. + { 0x03BD, 0x6E }, /* GREEK SMALL LETTER NU # nu */
  4868. + { 0x03BE, 0x78 }, /* GREEK SMALL LETTER XI # xi */
  4869. + { 0x03BF, 0x6F }, /* GREEK SMALL LETTER OMICRON # omicron */
  4870. + { 0x03C0, 0x70 }, /* GREEK SMALL LETTER PI # pi */
  4871. + { 0x03C1, 0x72 }, /* GREEK SMALL LETTER RHO # rho */
  4872. + { 0x03C2, 0x56 }, /* GREEK SMALL LETTER FINAL SIGMA # sigma1 */
  4873. + { 0x03C3, 0x73 }, /* GREEK SMALL LETTER SIGMA # sigma */
  4874. + { 0x03C4, 0x74 }, /* GREEK SMALL LETTER TAU # tau */
  4875. + { 0x03C5, 0x75 }, /* GREEK SMALL LETTER UPSILON # upsilon */
  4876. + { 0x03C6, 0x66 }, /* GREEK SMALL LETTER PHI # phi */
  4877. + { 0x03C7, 0x63 }, /* GREEK SMALL LETTER CHI # chi */
  4878. + { 0x03C8, 0x79 }, /* GREEK SMALL LETTER PSI # psi */
  4879. + { 0x03C9, 0x77 }, /* GREEK SMALL LETTER OMEGA # omega */
  4880. + { 0x03D1, 0x4A }, /* GREEK THETA SYMBOL # theta1 */
  4881. + { 0x03D2, 0xA1 }, /* GREEK UPSILON WITH HOOK SYMBOL # Upsilon1 */
  4882. + { 0x03D5, 0x6A }, /* GREEK PHI SYMBOL # phi1 */
  4883. + { 0x03D6, 0x76 }, /* GREEK PI SYMBOL # omega1 */
  4884. + { 0x2022, 0xB7 }, /* BULLET # bullet */
  4885. + { 0x2026, 0xBC }, /* HORIZONTAL ELLIPSIS # ellipsis */
  4886. + { 0x2032, 0xA2 }, /* PRIME # minute */
  4887. + { 0x2033, 0xB2 }, /* DOUBLE PRIME # second */
  4888. + { 0x2044, 0xA4 }, /* FRACTION SLASH # fraction */
  4889. + { 0x20AC, 0xA0 }, /* EURO SIGN # Euro */
  4890. + { 0x2111, 0xC1 }, /* BLACK-LETTER CAPITAL I # Ifraktur */
  4891. + { 0x2118, 0xC3 }, /* SCRIPT CAPITAL P # weierstrass */
  4892. + { 0x211C, 0xC2 }, /* BLACK-LETTER CAPITAL R # Rfraktur */
  4893. + { 0x2126, 0x57 }, /* OHM SIGN # Omega */
  4894. + { 0x2135, 0xC0 }, /* ALEF SYMBOL # aleph */
  4895. + { 0x2190, 0xAC }, /* LEFTWARDS ARROW # arrowleft */
  4896. + { 0x2191, 0xAD }, /* UPWARDS ARROW # arrowup */
  4897. + { 0x2192, 0xAE }, /* RIGHTWARDS ARROW # arrowright */
  4898. + { 0x2193, 0xAF }, /* DOWNWARDS ARROW # arrowdown */
  4899. + { 0x2194, 0xAB }, /* LEFT RIGHT ARROW # arrowboth */
  4900. + { 0x21B5, 0xBF }, /* DOWNWARDS ARROW WITH CORNER LEFTWARDS # carriagereturn */
  4901. + { 0x21D0, 0xDC }, /* LEFTWARDS DOUBLE ARROW # arrowdblleft */
  4902. + { 0x21D1, 0xDD }, /* UPWARDS DOUBLE ARROW # arrowdblup */
  4903. + { 0x21D2, 0xDE }, /* RIGHTWARDS DOUBLE ARROW # arrowdblright */
  4904. + { 0x21D3, 0xDF }, /* DOWNWARDS DOUBLE ARROW # arrowdbldown */
  4905. + { 0x21D4, 0xDB }, /* LEFT RIGHT DOUBLE ARROW # arrowdblboth */
  4906. + { 0x2200, 0x22 }, /* FOR ALL # universal */
  4907. + { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL # partialdiff */
  4908. + { 0x2203, 0x24 }, /* THERE EXISTS # existential */
  4909. + { 0x2205, 0xC6 }, /* EMPTY SET # emptyset */
  4910. + { 0x2206, 0x44 }, /* INCREMENT # Delta */
  4911. + { 0x2207, 0xD1 }, /* NABLA # gradient */
  4912. + { 0x2208, 0xCE }, /* ELEMENT OF # element */
  4913. + { 0x2209, 0xCF }, /* NOT AN ELEMENT OF # notelement */
  4914. + { 0x220B, 0x27 }, /* CONTAINS AS MEMBER # suchthat */
  4915. + { 0x220F, 0xD5 }, /* N-ARY PRODUCT # product */
  4916. + { 0x2211, 0xE5 }, /* N-ARY SUMMATION # summation */
  4917. + { 0x2212, 0x2D }, /* MINUS SIGN # minus */
  4918. + { 0x2215, 0xA4 }, /* DIVISION SLASH # fraction */
  4919. + { 0x2217, 0x2A }, /* ASTERISK OPERATOR # asteriskmath */
  4920. + { 0x221A, 0xD6 }, /* SQUARE ROOT # radical */
  4921. + { 0x221D, 0xB5 }, /* PROPORTIONAL TO # proportional */
  4922. + { 0x221E, 0xA5 }, /* INFINITY # infinity */
  4923. + { 0x2220, 0xD0 }, /* ANGLE # angle */
  4924. + { 0x2227, 0xD9 }, /* LOGICAL AND # logicaland */
  4925. + { 0x2228, 0xDA }, /* LOGICAL OR # logicalor */
  4926. + { 0x2229, 0xC7 }, /* INTERSECTION # intersection */
  4927. + { 0x222A, 0xC8 }, /* UNION # union */
  4928. + { 0x222B, 0xF2 }, /* INTEGRAL # integral */
  4929. + { 0x2234, 0x5C }, /* THEREFORE # therefore */
  4930. + { 0x223C, 0x7E }, /* TILDE OPERATOR # similar */
  4931. + { 0x2245, 0x40 }, /* APPROXIMATELY EQUAL TO # congruent */
  4932. + { 0x2248, 0xBB }, /* ALMOST EQUAL TO # approxequal */
  4933. + { 0x2260, 0xB9 }, /* NOT EQUAL TO # notequal */
  4934. + { 0x2261, 0xBA }, /* IDENTICAL TO # equivalence */
  4935. + { 0x2264, 0xA3 }, /* LESS-THAN OR EQUAL TO # lessequal */
  4936. + { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO # greaterequal */
  4937. + { 0x2282, 0xCC }, /* SUBSET OF # propersubset */
  4938. + { 0x2283, 0xC9 }, /* SUPERSET OF # propersuperset */
  4939. + { 0x2284, 0xCB }, /* NOT A SUBSET OF # notsubset */
  4940. + { 0x2286, 0xCD }, /* SUBSET OF OR EQUAL TO # reflexsubset */
  4941. + { 0x2287, 0xCA }, /* SUPERSET OF OR EQUAL TO # reflexsuperset */
  4942. + { 0x2295, 0xC5 }, /* CIRCLED PLUS # circleplus */
  4943. + { 0x2297, 0xC4 }, /* CIRCLED TIMES # circlemultiply */
  4944. + { 0x22A5, 0x5E }, /* UP TACK # perpendicular */
  4945. + { 0x22C5, 0xD7 }, /* DOT OPERATOR # dotmath */
  4946. + { 0x2320, 0xF3 }, /* TOP HALF INTEGRAL # integraltp */
  4947. + { 0x2321, 0xF5 }, /* BOTTOM HALF INTEGRAL # integralbt */
  4948. + { 0x2329, 0xE1 }, /* LEFT-POINTING ANGLE BRACKET # angleleft */
  4949. + { 0x232A, 0xF1 }, /* RIGHT-POINTING ANGLE BRACKET # angleright */
  4950. + { 0x25CA, 0xE0 }, /* LOZENGE # lozenge */
  4951. + { 0x2660, 0xAA }, /* BLACK SPADE SUIT # spade */
  4952. + { 0x2663, 0xA7 }, /* BLACK CLUB SUIT # club */
  4953. + { 0x2665, 0xA9 }, /* BLACK HEART SUIT # heart */
  4954. + { 0x2666, 0xA8 }, /* BLACK DIAMOND SUIT # diamond */
  4955. + { 0xF6D9, 0xD3 }, /* COPYRIGHT SIGN SERIF # copyrightserif (CUS) */
  4956. + { 0xF6DA, 0xD2 }, /* REGISTERED SIGN SERIF # registerserif (CUS) */
  4957. + { 0xF6DB, 0xD4 }, /* TRADE MARK SIGN SERIF # trademarkserif (CUS) */
  4958. + { 0xF8E5, 0x60 }, /* RADICAL EXTENDER # radicalex (CUS) */
  4959. + { 0xF8E6, 0xBD }, /* VERTICAL ARROW EXTENDER # arrowvertex (CUS) */
  4960. + { 0xF8E7, 0xBE }, /* HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS) */
  4961. + { 0xF8E8, 0xE2 }, /* REGISTERED SIGN SANS SERIF # registersans (CUS) */
  4962. + { 0xF8E9, 0xE3 }, /* COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS) */
  4963. + { 0xF8EA, 0xE4 }, /* TRADE MARK SIGN SANS SERIF # trademarksans (CUS) */
  4964. + { 0xF8EB, 0xE6 }, /* LEFT PAREN TOP # parenlefttp (CUS) */
  4965. + { 0xF8EC, 0xE7 }, /* LEFT PAREN EXTENDER # parenleftex (CUS) */
  4966. + { 0xF8ED, 0xE8 }, /* LEFT PAREN BOTTOM # parenleftbt (CUS) */
  4967. + { 0xF8EE, 0xE9 }, /* LEFT SQUARE BRACKET TOP # bracketlefttp (CUS) */
  4968. + { 0xF8EF, 0xEA }, /* LEFT SQUARE BRACKET EXTENDER # bracketleftex (CUS) */
  4969. + { 0xF8F0, 0xEB }, /* LEFT SQUARE BRACKET BOTTOM # bracketleftbt (CUS) */
  4970. + { 0xF8F1, 0xEC }, /* LEFT CURLY BRACKET TOP # bracelefttp (CUS) */
  4971. + { 0xF8F2, 0xED }, /* LEFT CURLY BRACKET MID # braceleftmid (CUS) */
  4972. + { 0xF8F3, 0xEE }, /* LEFT CURLY BRACKET BOTTOM # braceleftbt (CUS) */
  4973. + { 0xF8F4, 0xEF }, /* CURLY BRACKET EXTENDER # braceex (CUS) */
  4974. + { 0xF8F5, 0xF4 }, /* INTEGRAL EXTENDER # integralex (CUS) */
  4975. + { 0xF8F6, 0xF6 }, /* RIGHT PAREN TOP # parenrighttp (CUS) */
  4976. + { 0xF8F7, 0xF7 }, /* RIGHT PAREN EXTENDER # parenrightex (CUS) */
  4977. + { 0xF8F8, 0xF8 }, /* RIGHT PAREN BOTTOM # parenrightbt (CUS) */
  4978. + { 0xF8F9, 0xF9 }, /* RIGHT SQUARE BRACKET TOP # bracketrighttp (CUS) */
  4979. + { 0xF8FA, 0xFA }, /* RIGHT SQUARE BRACKET EXTENDER # bracketrightex (CUS) */
  4980. + { 0xF8FB, 0xFB }, /* RIGHT SQUARE BRACKET BOTTOM # bracketrightbt (CUS) */
  4981. + { 0xF8FC, 0xFC }, /* RIGHT CURLY BRACKET TOP # bracerighttp (CUS) */
  4982. + { 0xF8FD, 0xFD }, /* RIGHT CURLY BRACKET MID # bracerightmid (CUS) */
  4983. + { 0xF8FE, 0xFE }, /* RIGHT CURLY BRACKET BOTTOM # bracerightbt (CUS) */
  4984. +};
  4985. +
  4986. +static const FcCharMap AdobeSymbol = {
  4987. + AdobeSymbolEnt,
  4988. + sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]),
  4989. +};
  4990. +
  4991. +static const FcFontDecode fcFontDecoders[] = {
  4992. + { ft_encoding_unicode, 0, (1 << 21) - 1 },
  4993. + { ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
  4994. + { ft_encoding_apple_roman, &AppleRoman, (1 << 16) - 1 },
  4995. +};
  4996. +
  4997. +#define NUM_DECODE (sizeof (fcFontDecoders) / sizeof (fcFontDecoders[0]))
  4998. +
  4999. +FcChar32
  5000. +FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map)
  5001. +{
  5002. + int low, high, mid;
  5003. + FcChar16 bmp;
  5004. +
  5005. + low = 0;
  5006. + high = map->nent - 1;
  5007. + if (ucs4 < map->ent[low].bmp || map->ent[high].bmp < ucs4)
  5008. + return ~0;
  5009. + while (low <= high)
  5010. + {
  5011. + mid = (high + low) >> 1;
  5012. + bmp = map->ent[mid].bmp;
  5013. + if (ucs4 == bmp)
  5014. + return (FT_ULong) map->ent[mid].encode;
  5015. + if (ucs4 < bmp)
  5016. + high = mid - 1;
  5017. + else
  5018. + low = mid + 1;
  5019. + }
  5020. + return ~0;
  5021. +}
  5022. +
  5023. +FcChar32
  5024. +FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map)
  5025. +{
  5026. + int i;
  5027. +
  5028. + for (i = 0; i < map->nent; i++)
  5029. + if (map->ent[i].encode == private)
  5030. + return (FcChar32) map->ent[i].bmp;
  5031. + return ~0;
  5032. +}
  5033. +
  5034. +const FcCharMap *
  5035. +FcFreeTypeGetPrivateMap (FT_Encoding encoding)
  5036. +{
  5037. + int i;
  5038. +
  5039. + for (i = 0; i < NUM_DECODE; i++)
  5040. + if (fcFontDecoders[i].encoding == encoding)
  5041. + return fcFontDecoders[i].map;
  5042. + return 0;
  5043. +}
  5044. +
  5045. +/*
  5046. + * Map a UCS4 glyph to a glyph index. Use all available encoding
  5047. + * tables to try and find one that works. This information is expected
  5048. + * to be cached by higher levels, so performance isn't critical
  5049. + */
  5050. +
  5051. +FT_UInt
  5052. +FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4)
  5053. +{
  5054. + int initial, offset, decode;
  5055. + FT_UInt glyphindex;
  5056. + FcChar32 charcode;
  5057. +
  5058. + initial = 0;
  5059. + /*
  5060. + * Find the current encoding
  5061. + */
  5062. + if (face->charmap)
  5063. + {
  5064. + for (; initial < NUM_DECODE; initial++)
  5065. + if (fcFontDecoders[initial].encoding == face->charmap->encoding)
  5066. + break;
  5067. + if (initial == NUM_DECODE)
  5068. + initial = 0;
  5069. + }
  5070. + /*
  5071. + * Check each encoding for the glyph, starting with the current one
  5072. + */
  5073. + for (offset = 0; offset < NUM_DECODE; offset++)
  5074. + {
  5075. + decode = (initial + offset) % NUM_DECODE;
  5076. + if (!face->charmap || face->charmap->encoding != fcFontDecoders[decode].encoding)
  5077. + if (FT_Select_Charmap (face, fcFontDecoders[decode].encoding) != 0)
  5078. + continue;
  5079. + if (fcFontDecoders[decode].map)
  5080. + {
  5081. + charcode = FcFreeTypeUcs4ToPrivate (ucs4, fcFontDecoders[decode].map);
  5082. + if (charcode == ~0)
  5083. + continue;
  5084. + }
  5085. + else
  5086. + charcode = ucs4;
  5087. + glyphindex = FT_Get_Char_Index (face, (FT_ULong) charcode);
  5088. + if (glyphindex)
  5089. + return glyphindex;
  5090. + }
  5091. + return 0;
  5092. +}
  5093. +
  5094. +static FcBool
  5095. +FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
  5096. + FT_UInt glyph, FcBlanks *blanks,
  5097. + FT_Pos *advance)
  5098. +{
  5099. + FT_Int load_flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
  5100. + FT_GlyphSlot slot;
  5101. +
  5102. + /*
  5103. + * When using scalable fonts, only report those glyphs
  5104. + * which can be scaled; otherwise those fonts will
  5105. + * only be available at some sizes, and never when
  5106. + * transformed. Avoid this by simply reporting bitmap-only
  5107. + * glyphs as missing
  5108. + */
  5109. + if (face->face_flags & FT_FACE_FLAG_SCALABLE)
  5110. + load_flags |= FT_LOAD_NO_BITMAP;
  5111. +
  5112. + if (FT_Load_Glyph (face, glyph, load_flags))
  5113. + return FcFalse;
  5114. +
  5115. + slot = face->glyph;
  5116. + if (!glyph)
  5117. + return FcFalse;
  5118. +
  5119. + *advance = slot->metrics.horiAdvance;
  5120. +
  5121. + switch (slot->format) {
  5122. + case ft_glyph_format_bitmap:
  5123. + /*
  5124. + * Bitmaps are assumed to be reasonable; if
  5125. + * this proves to be a rash assumption, this
  5126. + * code can be easily modified
  5127. + */
  5128. + return FcTrue;
  5129. + case ft_glyph_format_outline:
  5130. + /*
  5131. + * Glyphs with contours are always OK
  5132. + */
  5133. + if (slot->outline.n_contours != 0)
  5134. + return FcTrue;
  5135. + /*
  5136. + * Glyphs with no contours are only OK if
  5137. + * they're members of the Blanks set specified
  5138. + * in the configuration. If blanks isn't set,
  5139. + * then allow any glyph to be blank
  5140. + */
  5141. + if (!blanks || FcBlanksIsMember (blanks, ucs4))
  5142. + return FcTrue;
  5143. + /* fall through ... */
  5144. + default:
  5145. + break;
  5146. + }
  5147. + return FcFalse;
  5148. +}
  5149. +
  5150. +FcCharSet *
  5151. +FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing)
  5152. +{
  5153. + FcChar32 page, off, max, ucs4;
  5154. +#ifdef CHECK
  5155. + FcChar32 font_max = 0;
  5156. +#endif
  5157. + FcCharSet *fcs;
  5158. + FcCharLeaf *leaf;
  5159. + const FcCharMap *map;
  5160. + int o;
  5161. + int i;
  5162. + FT_UInt glyph;
  5163. + FT_Pos advance, all_advance = 0;
  5164. + FcBool has_advance = FcFalse, fixed_advance = FcTrue;
  5165. +
  5166. + fcs = FcCharSetCreate ();
  5167. + if (!fcs)
  5168. + goto bail0;
  5169. +
  5170. + for (o = 0; o < NUM_DECODE; o++)
  5171. + {
  5172. + if (FT_Select_Charmap (face, fcFontDecoders[o].encoding) != 0)
  5173. + continue;
  5174. + map = fcFontDecoders[o].map;
  5175. + if (map)
  5176. + {
  5177. + /*
  5178. + * Non-Unicode tables are easy; there's a list of all possible
  5179. + * characters
  5180. + */
  5181. + for (i = 0; i < map->nent; i++)
  5182. + {
  5183. + ucs4 = map->ent[i].bmp;
  5184. + glyph = FT_Get_Char_Index (face, map->ent[i].encode);
  5185. + if (glyph &&
  5186. + FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance))
  5187. + {
  5188. + if (!has_advance)
  5189. + {
  5190. + has_advance = FcTrue;
  5191. + all_advance = advance;
  5192. + }
  5193. + else if (advance != all_advance)
  5194. + fixed_advance = FcFalse;
  5195. + leaf = FcCharSetFindLeafCreate (fcs, ucs4);
  5196. + if (!leaf)
  5197. + goto bail1;
  5198. + leaf->map[(ucs4 & 0xff) >> 5] |= (1 << (ucs4 & 0x1f));
  5199. +#ifdef CHECK
  5200. + if (ucs4 > font_max)
  5201. + font_max = ucs4;
  5202. +#endif
  5203. + }
  5204. + }
  5205. + }
  5206. + else
  5207. + {
  5208. + FT_UInt gindex;
  5209. +
  5210. + max = fcFontDecoders[o].max;
  5211. + /*
  5212. + * Find the first encoded character in the font
  5213. + */
  5214. + if (FT_Get_Char_Index (face, 0))
  5215. + {
  5216. + ucs4 = 0;
  5217. + gindex = 1;
  5218. + }
  5219. + else
  5220. + {
  5221. + ucs4 = FT_Get_Next_Char (face, 0, &gindex);
  5222. + if (!ucs4)
  5223. + gindex = 0;
  5224. + }
  5225. +
  5226. + while (gindex)
  5227. + {
  5228. + page = ucs4 >> 8;
  5229. + leaf = 0;
  5230. + while ((ucs4 >> 8) == page)
  5231. + {
  5232. + glyph = FT_Get_Char_Index (face, ucs4);
  5233. + if (glyph && FcFreeTypeCheckGlyph (face, ucs4,
  5234. + glyph, blanks, &advance))
  5235. + {
  5236. + if (!has_advance)
  5237. + {
  5238. + has_advance = FcTrue;
  5239. + all_advance = advance;
  5240. + }
  5241. + else if (advance != all_advance)
  5242. + fixed_advance = FcFalse;
  5243. + if (!leaf)
  5244. + {
  5245. + leaf = FcCharSetFindLeafCreate (fcs, ucs4);
  5246. + if (!leaf)
  5247. + goto bail1;
  5248. + }
  5249. + off = ucs4 & 0xff;
  5250. + leaf->map[off >> 5] |= (1 << (off & 0x1f));
  5251. +#ifdef CHECK
  5252. + if (ucs4 > font_max)
  5253. + font_max = ucs4;
  5254. +#endif
  5255. + }
  5256. + ucs4++;
  5257. + }
  5258. + ucs4 = FT_Get_Next_Char (face, ucs4 - 1, &gindex);
  5259. + if (!ucs4)
  5260. + gindex = 0;
  5261. + }
  5262. +#ifdef CHECK
  5263. + for (ucs4 = 0; ucs4 < 0x10000; ucs4++)
  5264. + {
  5265. + FcBool FT_Has, FC_Has;
  5266. +
  5267. + FT_Has = FT_Get_Char_Index (face, ucs4) != 0;
  5268. + FC_Has = FcCharSetHasChar (fcs, ucs4);
  5269. + if (FT_Has != FC_Has)
  5270. + {
  5271. + printf ("0x%08x FT says %d FC says %d\n", ucs4, FT_Has, FC_Has);
  5272. + }
  5273. + }
  5274. +#endif
  5275. + }
  5276. + }
  5277. +#ifdef CHECK
  5278. + printf ("%d glyphs %d encoded\n", (int) face->num_glyphs, FcCharSetCount (fcs));
  5279. + for (ucs4 = 0; ucs4 <= font_max; ucs4++)
  5280. + {
  5281. + FcBool has_char = FcFreeTypeCharIndex (face, ucs4) != 0;
  5282. + FcBool has_bit = FcCharSetHasChar (fcs, ucs4);
  5283. +
  5284. + if (has_char && !has_bit)
  5285. + printf ("Bitmap missing char 0x%x\n", ucs4);
  5286. + else if (!has_char && has_bit)
  5287. + printf ("Bitmap extra char 0x%x\n", ucs4);
  5288. + }
  5289. +#endif
  5290. + if (fixed_advance)
  5291. + *spacing = FC_MONO;
  5292. + else
  5293. + *spacing = FC_PROPORTIONAL;
  5294. + return fcs;
  5295. +bail1:
  5296. + FcCharSetDestroy (fcs);
  5297. +bail0:
  5298. + return 0;
  5299. +}
  5300. +
  5301. +FcCharSet *
  5302. +FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks)
  5303. +{
  5304. + int spacing;
  5305. +
  5306. + return FcFreeTypeCharSetAndSpacing (face, blanks, &spacing);
  5307. +}
  5308. diff -dur xc/extras/fontconfig/src/fcfs.c xc-p/extras/fontconfig/src/fcfs.c
  5309. --- xc/extras/fontconfig/src/fcfs.c 2003-09-25 13:01:22.000000000 +0200
  5310. +++ xc-p/extras/fontconfig/src/fcfs.c 2004-11-11 22:22:24.000000000 +0100
  5311. @@ -1,7 +1,7 @@
  5312. /*
  5313. - * $XFree86: xc/extras/fontconfig/src/fcfs.c,v 1.1.1.1 2003/06/04 02:57:52 dawes Exp $
  5314. + * $RCSId: $
  5315. *
  5316. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5317. + * Copyright � 2000 Keith Packard
  5318. *
  5319. * Permission to use, copy, modify, distribute, and sell this software and its
  5320. * documentation for any purpose is hereby granted without fee, provided that
  5321. diff -dur xc/extras/fontconfig/src/fcinit.c xc-p/extras/fontconfig/src/fcinit.c
  5322. --- xc/extras/fontconfig/src/fcinit.c 2003-09-25 13:01:22.000000000 +0200
  5323. +++ xc-p/extras/fontconfig/src/fcinit.c 2004-11-11 22:22:24.000000000 +0100
  5324. @@ -1,7 +1,7 @@
  5325. /*
  5326. - * $XFree86: xc/extras/fontconfig/src/fcinit.c,v 1.1.1.1 2003/06/04 02:57:52 dawes Exp $
  5327. + * $RCSId: xc/lib/fontconfig/src/fcinit.c,v 1.7 2002/08/22 07:36:44 keithp Exp $
  5328. *
  5329. - * Copyright � 2001 Keith Packard, member of The XFree86 Project, Inc.
  5330. + * Copyright � 2001 Keith Packard
  5331. *
  5332. * Permission to use, copy, modify, distribute, and sell this software and its
  5333. * documentation for any purpose is hereby granted without fee, provided that
  5334. diff -dur xc/extras/fontconfig/src/fcint.h xc-p/extras/fontconfig/src/fcint.h
  5335. --- xc/extras/fontconfig/src/fcint.h 2003-11-02 05:40:29.000000000 +0100
  5336. +++ xc-p/extras/fontconfig/src/fcint.h 2004-11-11 22:22:24.000000000 +0100
  5337. @@ -1,7 +1,7 @@
  5338. /*
  5339. - * $XFree86: xc/extras/fontconfig/src/fcint.h,v 1.2 2003/10/22 17:15:22 tsi Exp $
  5340. + * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
  5341. *
  5342. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5343. + * Copyright � 2000 Keith Packard
  5344. *
  5345. * Permission to use, copy, modify, distribute, and sell this software and its
  5346. * documentation for any purpose is hereby granted without fee, provided that
  5347. @@ -53,6 +53,12 @@
  5348. #define FC_FONT_FILE_INVALID ((FcChar8 *) ".")
  5349. #define FC_FONT_FILE_DIR ((FcChar8 *) ".dir")
  5350. +#ifdef _WIN32
  5351. +#define FC_SEARCH_PATH_SEPARATOR ';'
  5352. +#else
  5353. +#define FC_SEARCH_PATH_SEPARATOR ':'
  5354. +#endif
  5355. +
  5356. #define FC_DBG_MATCH 1
  5357. #define FC_DBG_MATCHV 2
  5358. #define FC_DBG_EDIT 4
  5359. @@ -97,7 +103,7 @@
  5360. #define FC_MEM_NUM 29
  5361. typedef enum _FcValueBinding {
  5362. - FcValueBindingWeak, FcValueBindingStrong
  5363. + FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
  5364. } FcValueBinding;
  5365. typedef struct _FcValueList {
  5366. @@ -129,7 +135,8 @@
  5367. FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual, FcOpContains, FcOpNotContains,
  5368. FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
  5369. FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
  5370. - FcOpNot, FcOpComma, FcOpInvalid
  5371. + FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
  5372. + FcOpInvalid
  5373. } FcOp;
  5374. typedef struct _FcExpr {
  5375. @@ -338,12 +345,16 @@
  5376. FcGlobalCacheDestroy (FcGlobalCache *cache);
  5377. FcBool
  5378. -FcGlobalCacheCheckTime (FcGlobalCacheInfo *info);
  5379. +FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info);
  5380. void
  5381. FcGlobalCacheReferenced (FcGlobalCache *cache,
  5382. FcGlobalCacheInfo *info);
  5383. +void
  5384. +FcGlobalCacheReferenceSubdir (FcGlobalCache *cache,
  5385. + const FcChar8 *dir);
  5386. +
  5387. FcGlobalCacheDir *
  5388. FcGlobalCacheDirGet (FcGlobalCache *cache,
  5389. const FcChar8 *dir,
  5390. @@ -421,9 +432,9 @@
  5391. FcSetName set);
  5392. FcBool
  5393. -FcConfigCompareValue (FcValue m,
  5394. - FcOp op,
  5395. - FcValue v);
  5396. +FcConfigCompareValue (const FcValue m,
  5397. + FcOp op,
  5398. + const FcValue v);
  5399. /* fccharset.c */
  5400. FcCharSet *
  5401. @@ -435,20 +446,17 @@
  5402. FcCharSet *
  5403. FcNameParseCharSet (FcChar8 *string);
  5404. -FcChar32
  5405. -FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
  5406. -
  5407. -FcChar32
  5408. -FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
  5409. +FcCharLeaf *
  5410. +FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
  5411. -const FcCharMap *
  5412. -FcFreeTypeGetPrivateMap (FT_Encoding encoding);
  5413. -
  5414. /* fcdbg.c */
  5415. void
  5416. FcValueListPrint (const FcValueList *l);
  5417. void
  5418. +FcLangSetPrint (const FcLangSet *ls);
  5419. +
  5420. +void
  5421. FcOpPrint (FcOp op);
  5422. void
  5423. @@ -479,6 +487,15 @@
  5424. FcBool
  5425. FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
  5426. +FcChar32
  5427. +FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
  5428. +
  5429. +FcChar32
  5430. +FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
  5431. +
  5432. +const FcCharMap *
  5433. +FcFreeTypeGetPrivateMap (FT_Encoding encoding);
  5434. +
  5435. /* fcfs.c */
  5436. /* fcgram.y */
  5437. int
  5438. @@ -636,4 +653,10 @@
  5439. int
  5440. FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
  5441. +FcBool
  5442. +FcStrUsesHome (const FcChar8 *s);
  5443. +
  5444. +FcChar8 *
  5445. +FcStrLastSlash (const FcChar8 *path);
  5446. +
  5447. #endif /* _FC_INT_H_ */
  5448. diff -dur xc/extras/fontconfig/src/fclang.c xc-p/extras/fontconfig/src/fclang.c
  5449. --- xc/extras/fontconfig/src/fclang.c 2004-10-27 13:00:28.000000000 +0200
  5450. +++ xc-p/extras/fontconfig/src/fclang.c 2004-11-11 22:22:24.000000000 +0100
  5451. @@ -1,5 +1,7 @@
  5452. /*
  5453. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  5454. + * $RCSId: xc/lib/fontconfig/src/fclang.c,v 1.7 2002/08/26 23:34:31 keithp Exp $
  5455. + *
  5456. + * Copyright � 2002 Keith Packard
  5457. *
  5458. * Permission to use, copy, modify, distribute, and sell this software and its
  5459. * documentation for any purpose is hereby granted without fee, provided that
  5460. @@ -28,6 +30,11 @@
  5461. FcCharSet charset;
  5462. } FcLangCharSet;
  5463. +typedef struct {
  5464. + int begin;
  5465. + int end;
  5466. +} FcLangCharSetRange;
  5467. +
  5468. #include "../fc-lang/fclang.h"
  5469. struct _FcLangSet {
  5470. @@ -137,6 +144,37 @@
  5471. }
  5472. }
  5473. +/*
  5474. + * Return FcTrue when s1 contains s2.
  5475. + *
  5476. + * s1 contains s2 if s1 equals s2 or if s1 is a
  5477. + * language with a country and s2 is just a language
  5478. + */
  5479. +
  5480. +static FcBool
  5481. +FcLangContains (const FcChar8 *s1, const FcChar8 *s2)
  5482. +{
  5483. + FcChar8 c1, c2;
  5484. +
  5485. + for (;;)
  5486. + {
  5487. + c1 = *s1++;
  5488. + c2 = *s2++;
  5489. +
  5490. + c1 = FcToLower (c1);
  5491. + c2 = FcToLower (c2);
  5492. + if (c1 != c2)
  5493. + {
  5494. + /* see if s1 has a country while s2 is mising one */
  5495. + if (c1 == '-' && c2 == '\0')
  5496. + return FcTrue;
  5497. + return FcFalse;
  5498. + }
  5499. + else if (!c1)
  5500. + return FcTrue;
  5501. + }
  5502. +}
  5503. +
  5504. const FcCharSet *
  5505. FcCharSetForLang (const FcChar8 *lang)
  5506. {
  5507. @@ -222,16 +260,48 @@
  5508. static int
  5509. FcLangSetIndex (const FcChar8 *lang)
  5510. {
  5511. - int low, high, mid;
  5512. - int cmp;
  5513. + int low, high, mid = 0;
  5514. + int cmp = 0;
  5515. + FcChar8 firstChar = FcToLower(lang[0]);
  5516. + FcChar8 secondChar = firstChar ? FcToLower(lang[1]) : '\0';
  5517. +
  5518. + if (firstChar < 'a')
  5519. + {
  5520. + low = 0;
  5521. + high = fcLangCharSetRanges[0].begin;
  5522. + }
  5523. + else if(firstChar > 'z')
  5524. + {
  5525. + low = fcLangCharSetRanges[25].begin;
  5526. + high = NUM_LANG_CHAR_SET - 1;
  5527. + }
  5528. + else
  5529. + {
  5530. + low = fcLangCharSetRanges[firstChar - 'a'].begin;
  5531. + high = fcLangCharSetRanges[firstChar - 'a'].end;
  5532. + /* no matches */
  5533. + if (low > high)
  5534. + return -low; /* next entry after where it would be */
  5535. + }
  5536. - low = 0;
  5537. - high = NUM_LANG_CHAR_SET - 1;
  5538. while (low <= high)
  5539. {
  5540. mid = (high + low) >> 1;
  5541. - cmp = FcStrCmpIgnoreCase (fcLangCharSets[mid].lang, lang);
  5542. - if (cmp == 0)
  5543. + if(fcLangCharSets[mid].lang[0] != firstChar)
  5544. + cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang, lang);
  5545. + else
  5546. + { /* fast path for resolving 2-letter languages (by far the most common) after
  5547. + * finding the first char (probably already true because of the hash table) */
  5548. + cmp = fcLangCharSets[mid].lang[1] - secondChar;
  5549. + if (cmp == 0 &&
  5550. + (fcLangCharSets[mid].lang[2] != '\0' ||
  5551. + lang[2] != '\0'))
  5552. + {
  5553. + cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2,
  5554. + lang+2);
  5555. + }
  5556. + }
  5557. + if (cmp == 0)
  5558. return mid;
  5559. if (cmp < 0)
  5560. low = mid + 1;
  5561. @@ -411,32 +481,28 @@
  5562. FcLangSet *
  5563. FcNameParseLangSet (const FcChar8 *string)
  5564. {
  5565. - FcChar8 lang[32];
  5566. - const FcChar8 *end, *next;
  5567. + FcChar8 lang[32],c;
  5568. + int i;
  5569. FcLangSet *ls;
  5570. ls = FcLangSetCreate ();
  5571. if (!ls)
  5572. goto bail0;
  5573. - while (string && *string)
  5574. + for(;;)
  5575. {
  5576. - end = (FcChar8 *) strchr ((char *) string, '|');
  5577. - if (!end)
  5578. - {
  5579. - end = string + strlen ((char *) string);
  5580. - next = end;
  5581. - }
  5582. - else
  5583. - next = end + 1;
  5584. - if (end - string < sizeof (lang) - 1)
  5585. + for(i = 0; i < 31;i++)
  5586. {
  5587. - strncpy ((char *) lang, (char *) string, end - string);
  5588. - lang[end-string] = '\0';
  5589. - if (!FcLangSetAdd (ls, lang))
  5590. - goto bail1;
  5591. + c = *string++;
  5592. + if(c == '\0' || c == '|')
  5593. + break; /* end of this code */
  5594. + lang[i] = c;
  5595. }
  5596. - string = next;
  5597. + lang[i] = '\0';
  5598. + if (!FcLangSetAdd (ls, lang))
  5599. + goto bail1;
  5600. + if(c == '\0')
  5601. + break;
  5602. }
  5603. return ls;
  5604. bail1:
  5605. @@ -505,3 +571,113 @@
  5606. return FcStrSetEqual (lsa->extra, lsb->extra);
  5607. return FcFalse;
  5608. }
  5609. +
  5610. +static FcBool
  5611. +FcLangSetContainsLang (const FcLangSet *ls, const FcChar8 *lang)
  5612. +{
  5613. + int id;
  5614. + int i;
  5615. +
  5616. + id = FcLangSetIndex (lang);
  5617. + if (id < 0)
  5618. + id = -id - 1;
  5619. + else if (FcLangSetBitGet (ls, id))
  5620. + return FcTrue;
  5621. + /*
  5622. + * search up and down among equal languages for a match
  5623. + */
  5624. + for (i = id - 1; i >= 0; i--)
  5625. + {
  5626. + if (FcLangCompare (fcLangCharSets[i].lang, lang) == FcLangDifferentLang)
  5627. + break;
  5628. + if (FcLangSetBitGet (ls, i) &&
  5629. + FcLangContains (fcLangCharSets[i].lang, lang))
  5630. + return FcTrue;
  5631. + }
  5632. + for (i = id; i < NUM_LANG_CHAR_SET; i++)
  5633. + {
  5634. + if (FcLangCompare (fcLangCharSets[i].lang, lang) == FcLangDifferentLang)
  5635. + break;
  5636. + if (FcLangSetBitGet (ls, i) &&
  5637. + FcLangContains (fcLangCharSets[i].lang, lang))
  5638. + return FcTrue;
  5639. + }
  5640. + if (ls->extra)
  5641. + {
  5642. + FcStrList *list = FcStrListCreate (ls->extra);
  5643. + FcChar8 *extra;
  5644. +
  5645. + if (list)
  5646. + {
  5647. + while ((extra = FcStrListNext (list)))
  5648. + {
  5649. + if (FcLangContains (extra, lang))
  5650. + break;
  5651. + }
  5652. + FcStrListDone (list);
  5653. + if (extra)
  5654. + return FcTrue;
  5655. + }
  5656. + }
  5657. + return FcFalse;
  5658. +}
  5659. +
  5660. +/*
  5661. + * return FcTrue if lsa contains every language in lsb
  5662. + */
  5663. +FcBool
  5664. +FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb)
  5665. +{
  5666. + int i, j;
  5667. + FcChar32 missing;
  5668. +
  5669. + if (FcDebug() & FC_DBG_MATCHV)
  5670. + {
  5671. + printf ("FcLangSet "); FcLangSetPrint (lsa);
  5672. + printf (" contains "); FcLangSetPrint (lsb);
  5673. + printf ("\n");
  5674. + }
  5675. + /*
  5676. + * check bitmaps for missing language support
  5677. + */
  5678. + for (i = 0; i < NUM_LANG_SET_MAP; i++)
  5679. + {
  5680. + missing = lsb->map[i] & ~lsa->map[i];
  5681. + if (missing)
  5682. + {
  5683. + for (j = 0; j < 32; j++)
  5684. + if (missing & (1 << j))
  5685. + {
  5686. + if (!FcLangSetContainsLang (lsa,
  5687. + fcLangCharSets[i*32 + j].lang))
  5688. + {
  5689. + if (FcDebug() & FC_DBG_MATCHV)
  5690. + printf ("\tMissing bitmap %s\n", fcLangCharSets[i*32+j].lang);
  5691. + return FcFalse;
  5692. + }
  5693. + }
  5694. + }
  5695. + }
  5696. + if (lsb->extra)
  5697. + {
  5698. + FcStrList *list = FcStrListCreate (lsb->extra);
  5699. + FcChar8 *extra;
  5700. +
  5701. + if (list)
  5702. + {
  5703. + while ((extra = FcStrListNext (list)))
  5704. + {
  5705. + if (!FcLangSetContainsLang (lsa, extra))
  5706. + {
  5707. + if (FcDebug() & FC_DBG_MATCHV)
  5708. + printf ("\tMissing string %s\n", extra);
  5709. + break;
  5710. + }
  5711. + }
  5712. + FcStrListDone (list);
  5713. + if (extra)
  5714. + return FcFalse;
  5715. + }
  5716. + }
  5717. + return FcTrue;
  5718. +}
  5719. Nur in xc-p/extras/fontconfig/src: fclang.c~.
  5720. Nur in xc-p/extras/fontconfig/src: fclang.c.rej.
  5721. diff -dur xc/extras/fontconfig/src/fclist.c xc-p/extras/fontconfig/src/fclist.c
  5722. --- xc/extras/fontconfig/src/fclist.c 2003-09-25 13:01:22.000000000 +0200
  5723. +++ xc-p/extras/fontconfig/src/fclist.c 2004-11-11 22:22:24.000000000 +0100
  5724. @@ -1,7 +1,7 @@
  5725. /*
  5726. - * $XFree86: xc/extras/fontconfig/src/fclist.c,v 1.1.1.1 2003/06/04 02:58:01 dawes Exp $
  5727. + * $RCSId: xc/lib/fontconfig/src/fclist.c,v 1.11tsi Exp $
  5728. *
  5729. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5730. + * Copyright � 2000 Keith Packard
  5731. *
  5732. * Permission to use, copy, modify, distribute, and sell this software and its
  5733. * documentation for any purpose is hereby granted without fee, provided that
  5734. @@ -128,7 +128,7 @@
  5735. for (v1 = v1orig; v1; v1 = v1->next)
  5736. for (v2 = v2orig; v2; v2 = v2->next)
  5737. - if (FcConfigCompareValue (v2->value, FcOpContains, v1->value))
  5738. + if (FcConfigCompareValue (v1->value, FcOpContains, v2->value))
  5739. return FcTrue;
  5740. return FcFalse;
  5741. }
  5742. diff -dur xc/extras/fontconfig/src/fcmatch.c xc-p/extras/fontconfig/src/fcmatch.c
  5743. --- xc/extras/fontconfig/src/fcmatch.c 2003-09-25 13:01:22.000000000 +0200
  5744. +++ xc-p/extras/fontconfig/src/fcmatch.c 2004-11-11 22:22:24.000000000 +0100
  5745. @@ -1,7 +1,7 @@
  5746. /*
  5747. - * $XFree86: xc/extras/fontconfig/src/fcmatch.c,v 1.1.1.1 2003/06/04 02:58:01 dawes Exp $
  5748. + * $RCSId: xc/lib/fontconfig/src/fcmatch.c,v 1.20 2002/08/31 22:17:32 keithp Exp $
  5749. *
  5750. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5751. + * Copyright � 2000 Keith Packard
  5752. *
  5753. * Permission to use, copy, modify, distribute, and sell this software and its
  5754. * documentation for any purpose is hereby granted without fee, provided that
  5755. @@ -28,13 +28,31 @@
  5756. #include <stdio.h>
  5757. static double
  5758. -FcCompareInteger (char *object, FcValue value1, FcValue value2)
  5759. +FcCompareNumber (char *object, FcValue value1, FcValue value2)
  5760. {
  5761. - int v;
  5762. + double v1, v2, v;
  5763. - if (value2.type != FcTypeInteger || value1.type != FcTypeInteger)
  5764. + switch (value1.type) {
  5765. + case FcTypeInteger:
  5766. + v1 = (double) value1.u.i;
  5767. + break;
  5768. + case FcTypeDouble:
  5769. + v1 = value1.u.d;
  5770. + break;
  5771. + default:
  5772. return -1.0;
  5773. - v = value2.u.i - value1.u.i;
  5774. + }
  5775. + switch (value2.type) {
  5776. + case FcTypeInteger:
  5777. + v2 = (double) value2.u.i;
  5778. + break;
  5779. + case FcTypeDouble:
  5780. + v2 = value2.u.d;
  5781. + break;
  5782. + default:
  5783. + return -1.0;
  5784. + }
  5785. + v = v2 - v1;
  5786. if (v < 0)
  5787. v = -v;
  5788. return (double) v;
  5789. @@ -173,7 +191,7 @@
  5790. { FC_LANG, FcCompareLang, 3, 3 },
  5791. #define MATCH_LANG 3
  5792. - { FC_SPACING, FcCompareInteger, 5, 5 },
  5793. + { FC_SPACING, FcCompareNumber, 5, 5 },
  5794. #define MATCH_SPACING 4
  5795. { FC_PIXEL_SIZE, FcCompareSize, 6, 6 },
  5796. @@ -182,26 +200,29 @@
  5797. { FC_STYLE, FcCompareString, 7, 7 },
  5798. #define MATCH_STYLE 6
  5799. - { FC_SLANT, FcCompareInteger, 8, 8 },
  5800. + { FC_SLANT, FcCompareNumber, 8, 8 },
  5801. #define MATCH_SLANT 7
  5802. - { FC_WEIGHT, FcCompareInteger, 9, 9 },
  5803. + { FC_WEIGHT, FcCompareNumber, 9, 9 },
  5804. #define MATCH_WEIGHT 8
  5805. - { FC_ANTIALIAS, FcCompareBool, 10, 10 },
  5806. -#define MATCH_ANTIALIAS 9
  5807. + { FC_WIDTH, FcCompareNumber, 10, 10 },
  5808. +#define MATCH_WIDTH 9
  5809. - { FC_RASTERIZER, FcCompareString, 11, 11 },
  5810. -#define MATCH_RASTERIZER 10
  5811. + { FC_ANTIALIAS, FcCompareBool, 11, 11 },
  5812. +#define MATCH_ANTIALIAS 10
  5813. - { FC_OUTLINE, FcCompareBool, 12, 12 },
  5814. -#define MATCH_OUTLINE 11
  5815. + { FC_RASTERIZER, FcCompareString, 12, 12 },
  5816. +#define MATCH_RASTERIZER 11
  5817. +
  5818. + { FC_OUTLINE, FcCompareBool, 13, 13 },
  5819. +#define MATCH_OUTLINE 12
  5820. - { FC_FONTVERSION, FcCompareInteger, 13, 13 },
  5821. -#define MATCH_FONTVERSION 12
  5822. + { FC_FONTVERSION, FcCompareNumber, 14, 14 },
  5823. +#define MATCH_FONTVERSION 13
  5824. };
  5825. -#define NUM_MATCH_VALUES 14
  5826. +#define NUM_MATCH_VALUES 15
  5827. static FcBool
  5828. FcCompareValueList (const char *object,
  5829. @@ -255,7 +276,13 @@
  5830. case 'p':
  5831. i = MATCH_PIXEL_SIZE; break;
  5832. case 'w':
  5833. - i = MATCH_WEIGHT; break;
  5834. + switch (FcToLower (object[1])) {
  5835. + case 'i':
  5836. + i = MATCH_WIDTH; break;
  5837. + case 'e':
  5838. + i = MATCH_WEIGHT; break;
  5839. + }
  5840. + break;
  5841. case 'r':
  5842. i = MATCH_RASTERIZER; break;
  5843. case 'o':
  5844. diff -dur xc/extras/fontconfig/src/fcmatrix.c xc-p/extras/fontconfig/src/fcmatrix.c
  5845. --- xc/extras/fontconfig/src/fcmatrix.c 2003-09-25 13:01:22.000000000 +0200
  5846. +++ xc-p/extras/fontconfig/src/fcmatrix.c 2004-11-11 22:22:24.000000000 +0100
  5847. @@ -1,5 +1,5 @@
  5848. /*
  5849. - * $XFree86: xc/extras/fontconfig/src/fcmatrix.c,v 1.1.1.1 2003/06/04 02:58:01 dawes Exp $
  5850. + * $RCSId: $
  5851. *
  5852. * Copyright � 2000 Tuomas J. Lukka
  5853. *
  5854. diff -dur xc/extras/fontconfig/src/fcname.c xc-p/extras/fontconfig/src/fcname.c
  5855. --- xc/extras/fontconfig/src/fcname.c 2003-09-25 13:01:22.000000000 +0200
  5856. +++ xc-p/extras/fontconfig/src/fcname.c 2004-11-11 22:22:24.000000000 +0100
  5857. @@ -1,7 +1,7 @@
  5858. /*
  5859. - * $XFree86: xc/extras/fontconfig/src/fcname.c,v 1.1.1.1 2003/06/04 02:58:01 dawes Exp $
  5860. + * $RCSId: xc/lib/fontconfig/src/fcname.c,v 1.15 2002/09/26 00:17:28 keithp Exp $
  5861. *
  5862. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5863. + * Copyright � 2000 Keith Packard
  5864. *
  5865. * Permission to use, copy, modify, distribute, and sell this software and its
  5866. * documentation for any purpose is hereby granted without fee, provided that
  5867. @@ -33,6 +33,7 @@
  5868. { FC_STYLE, FcTypeString, },
  5869. { FC_SLANT, FcTypeInteger, },
  5870. { FC_WEIGHT, FcTypeInteger, },
  5871. + { FC_WIDTH, FcTypeInteger, },
  5872. { FC_SIZE, FcTypeDouble, },
  5873. { FC_ASPECT, FcTypeDouble, },
  5874. { FC_PIXEL_SIZE, FcTypeDouble, },
  5875. @@ -137,16 +138,33 @@
  5876. }
  5877. static const FcConstant _FcBaseConstants[] = {
  5878. + { (FcChar8 *) "thin", "weight", FC_WEIGHT_THIN, },
  5879. + { (FcChar8 *) "extralight", "weight", FC_WEIGHT_EXTRALIGHT, },
  5880. + { (FcChar8 *) "ultralight", "weight", FC_WEIGHT_EXTRALIGHT, },
  5881. { (FcChar8 *) "light", "weight", FC_WEIGHT_LIGHT, },
  5882. + { (FcChar8 *) "regular", "weight", FC_WEIGHT_REGULAR, },
  5883. { (FcChar8 *) "medium", "weight", FC_WEIGHT_MEDIUM, },
  5884. { (FcChar8 *) "demibold", "weight", FC_WEIGHT_DEMIBOLD, },
  5885. + { (FcChar8 *) "semibold", "weight", FC_WEIGHT_DEMIBOLD, },
  5886. { (FcChar8 *) "bold", "weight", FC_WEIGHT_BOLD, },
  5887. + { (FcChar8 *) "extrabold", "weight", FC_WEIGHT_EXTRABOLD, },
  5888. + { (FcChar8 *) "ultrabold", "weight", FC_WEIGHT_EXTRABOLD, },
  5889. { (FcChar8 *) "black", "weight", FC_WEIGHT_BLACK, },
  5890. { (FcChar8 *) "roman", "slant", FC_SLANT_ROMAN, },
  5891. { (FcChar8 *) "italic", "slant", FC_SLANT_ITALIC, },
  5892. { (FcChar8 *) "oblique", "slant", FC_SLANT_OBLIQUE, },
  5893. + { (FcChar8 *) "ultracondensed", "width", FC_WIDTH_ULTRACONDENSED },
  5894. + { (FcChar8 *) "extracondensed", "width", FC_WIDTH_EXTRACONDENSED },
  5895. + { (FcChar8 *) "condensed", "width", FC_WIDTH_CONDENSED },
  5896. + { (FcChar8 *) "semicondensed", "width", FC_WIDTH_SEMICONDENSED },
  5897. + { (FcChar8 *) "normal", "width", FC_WIDTH_NORMAL },
  5898. + { (FcChar8 *) "semiexpanded", "width", FC_WIDTH_SEMIEXPANDED },
  5899. + { (FcChar8 *) "expanded", "width", FC_WIDTH_EXPANDED },
  5900. + { (FcChar8 *) "extraexpanded", "width", FC_WIDTH_EXTRAEXPANDED },
  5901. + { (FcChar8 *) "ultraexpanded", "width", FC_WIDTH_ULTRAEXPANDED },
  5902. +
  5903. { (FcChar8 *) "proportional", "spacing", FC_PROPORTIONAL, },
  5904. { (FcChar8 *) "mono", "spacing", FC_MONO, },
  5905. { (FcChar8 *) "charcell", "spacing", FC_CHARCELL, },
  5906. @@ -218,7 +236,7 @@
  5907. {
  5908. const FcConstantList *l;
  5909. int i;
  5910. -
  5911. +
  5912. for (l = _FcConstants; l; l = l->next)
  5913. {
  5914. for (i = 0; i < l->nconsts; i++)
  5915. @@ -247,8 +265,7 @@
  5916. char c0, c1;
  5917. c0 = *v;
  5918. - if (isupper (c0))
  5919. - c0 = tolower (c0);
  5920. + c0 = FcToLower (c0);
  5921. if (c0 == 't' || c0 == 'y' || c0 == '1')
  5922. {
  5923. *result = FcTrue;
  5924. @@ -262,8 +279,7 @@
  5925. if (c0 == 'o')
  5926. {
  5927. c1 = v[1];
  5928. - if (isupper (c1))
  5929. - c1 = tolower (c1);
  5930. + c1 = FcToLower (c1);
  5931. if (c1 == 'n')
  5932. {
  5933. *result = FcTrue;
  5934. diff -dur xc/extras/fontconfig/src/fcpat.c xc-p/extras/fontconfig/src/fcpat.c
  5935. --- xc/extras/fontconfig/src/fcpat.c 2003-06-04 18:29:39.000000000 +0200
  5936. +++ xc-p/extras/fontconfig/src/fcpat.c 2004-11-11 22:22:24.000000000 +0100
  5937. @@ -1,5 +1,7 @@
  5938. /*
  5939. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5940. + * $RCSId: xc/lib/fontconfig/src/fcpat.c,v 1.18 2002/09/18 17:11:46 tsi Exp $
  5941. + *
  5942. + * Copyright � 2000 Keith Packard
  5943. *
  5944. * Permission to use, copy, modify, distribute, and sell this software and its
  5945. * documentation for any purpose is hereby granted without fee, provided that
  5946. @@ -19,7 +21,6 @@
  5947. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  5948. * PERFORMANCE OF THIS SOFTWARE.
  5949. */
  5950. -/* $XFree86: xc/extras/fontconfig/src/fcpat.c,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  5951. #include <stdlib.h>
  5952. #include <string.h>
  5953. @@ -753,11 +754,14 @@
  5954. FcPatternDel (FcPattern *p, const char *object)
  5955. {
  5956. FcPatternElt *e;
  5957. + int i;
  5958. e = FcPatternFindElt (p, object);
  5959. if (!e)
  5960. return FcFalse;
  5961. + i = e - p->elts;
  5962. +
  5963. /* destroy value */
  5964. FcValueListDestroy (e->values);
  5965. diff -dur xc/extras/fontconfig/src/fcstr.c xc-p/extras/fontconfig/src/fcstr.c
  5966. --- xc/extras/fontconfig/src/fcstr.c 2003-11-21 06:56:14.000000000 +0100
  5967. +++ xc-p/extras/fontconfig/src/fcstr.c 2004-11-11 22:22:24.000000000 +0100
  5968. @@ -1,5 +1,7 @@
  5969. /*
  5970. - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc.
  5971. + * $RCSId: xc/lib/fontconfig/src/fcstr.c,v 1.10 2002/08/31 22:17:32 keithp Exp $
  5972. + *
  5973. + * Copyright � 2000 Keith Packard
  5974. *
  5975. * Permission to use, copy, modify, distribute, and sell this software and its
  5976. * documentation for any purpose is hereby granted without fee, provided that
  5977. @@ -71,11 +73,7 @@
  5978. {
  5979. c1 = *s1++;
  5980. c2 = *s2++;
  5981. - if (!c1 || !c2)
  5982. - break;
  5983. - c1 = FcToLower (c1);
  5984. - c2 = FcToLower (c2);
  5985. - if (c1 != c2)
  5986. + if (!c1 || (c1 != c2 && (c1 = FcToLower(c1)) != (c2 = FcToLower(c2))))
  5987. break;
  5988. }
  5989. return (int) c1 - (int) c2;
  5990. @@ -94,11 +92,7 @@
  5991. do
  5992. c2 = *s2++;
  5993. while (c2 == ' ');
  5994. - if (!c1 || !c2)
  5995. - break;
  5996. - c1 = FcToLower (c1);
  5997. - c2 = FcToLower (c2);
  5998. - if (c1 != c2)
  5999. + if (!c1 || (c1 != c2 && (c1 = FcToLower(c1)) != (c2 = FcToLower(c2))))
  6000. break;
  6001. }
  6002. return (int) c1 - (int) c2;
  6003. @@ -115,9 +109,7 @@
  6004. {
  6005. c1 = *s1++;
  6006. c2 = *s2++;
  6007. - if (!c1 || !c2)
  6008. - break;
  6009. - if (c1 != c2)
  6010. + if (!c1 || c1 != c2)
  6011. break;
  6012. }
  6013. return (int) c1 - (int) c2;
  6014. @@ -419,6 +411,12 @@
  6015. return FcTrue;
  6016. }
  6017. +FcBool
  6018. +FcStrUsesHome (const FcChar8 *s)
  6019. +{
  6020. + return *s == '~';
  6021. +}
  6022. +
  6023. FcChar8 *
  6024. FcStrCopyFilename (const FcChar8 *s)
  6025. {
  6026. @@ -426,7 +424,7 @@
  6027. if (*s == '~')
  6028. {
  6029. - FcChar8 *home = (FcChar8 *) getenv ("HOME");
  6030. + FcChar8 *home = FcConfigHome ();
  6031. int size;
  6032. if (!home)
  6033. return 0;
  6034. @@ -451,12 +449,31 @@
  6035. }
  6036. FcChar8 *
  6037. +FcStrLastSlash (const FcChar8 *path)
  6038. +{
  6039. + FcChar8 *slash;
  6040. +
  6041. + slash = (FcChar8 *) strrchr ((const char *) path, '/');
  6042. +#ifdef _WIN32
  6043. + {
  6044. + FcChar8 *backslash;
  6045. +
  6046. + backslash = (FcChar8 *) strrchr ((const char *) path, '\\');
  6047. + if (!slash || (backslash && backslash > slash))
  6048. + slash = backslash;
  6049. + }
  6050. +#endif
  6051. +
  6052. + return slash;
  6053. +}
  6054. +
  6055. +FcChar8 *
  6056. FcStrDirname (const FcChar8 *file)
  6057. {
  6058. FcChar8 *slash;
  6059. FcChar8 *dir;
  6060. - slash = (FcChar8 *) strrchr ((char *) file, '/');
  6061. + slash = FcStrLastSlash (file);
  6062. if (!slash)
  6063. return FcStrCopy ((FcChar8 *) ".");
  6064. dir = malloc ((slash - file) + 1);
  6065. @@ -473,7 +490,7 @@
  6066. {
  6067. FcChar8 *slash;
  6068. - slash = (FcChar8 *) strrchr ((char *) file, '/');
  6069. + slash = FcStrLastSlash (file);
  6070. if (!slash)
  6071. return FcStrCopy (file);
  6072. return FcStrCopy (slash + 1);
  6073. diff -dur xc/extras/fontconfig/src/fcxml.c xc-p/extras/fontconfig/src/fcxml.c
  6074. --- xc/extras/fontconfig/src/fcxml.c 2003-06-04 18:29:39.000000000 +0200
  6075. +++ xc-p/extras/fontconfig/src/fcxml.c 2004-11-11 22:22:24.000000000 +0100
  6076. @@ -1,5 +1,7 @@
  6077. /*
  6078. - * Copyright � 2002 Keith Packard, member of The XFree86 Project, Inc.
  6079. + * $RCSId: xc/lib/fontconfig/src/fcxml.c,v 1.21 2002/08/22 18:53:22 keithp Exp $
  6080. + *
  6081. + * Copyright � 2002 Keith Packard
  6082. *
  6083. * Permission to use, copy, modify, distribute, and sell this software and its
  6084. * documentation for any purpose is hereby granted without fee, provided that
  6085. @@ -19,7 +21,6 @@
  6086. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  6087. * PERFORMANCE OF THIS SOFTWARE.
  6088. */
  6089. -/* $XFree86: xc/extras/fontconfig/src/fcxml.c,v 1.2 2003/06/04 16:29:39 dawes Exp $ */
  6090. #include <stdarg.h>
  6091. #include "fcint.h"
  6092. @@ -34,6 +35,12 @@
  6093. #include <expat.h>
  6094. #endif
  6095. +#ifdef _WIN32
  6096. +#define STRICT
  6097. +#include <windows.h>
  6098. +#undef STRICT
  6099. +#endif
  6100. +
  6101. FcTest *
  6102. FcTestCreate (FcMatchKind kind,
  6103. FcQual qual,
  6104. @@ -196,6 +203,8 @@
  6105. void
  6106. FcExprDestroy (FcExpr *e)
  6107. {
  6108. + if (!e)
  6109. + return;
  6110. switch (e->op) {
  6111. case FcOpInteger:
  6112. break;
  6113. @@ -244,6 +253,10 @@
  6114. FcExprDestroy (e->u.tree.right);
  6115. /* fall through */
  6116. case FcOpNot:
  6117. + case FcOpFloor:
  6118. + case FcOpCeil:
  6119. + case FcOpRound:
  6120. + case FcOpTrunc:
  6121. FcExprDestroy (e->u.tree.left);
  6122. break;
  6123. case FcOpNil:
  6124. @@ -330,6 +343,10 @@
  6125. FcElementDivide,
  6126. FcElementNot,
  6127. FcElementIf,
  6128. + FcElementFloor,
  6129. + FcElementCeil,
  6130. + FcElementRound,
  6131. + FcElementTrunc,
  6132. FcElementUnknown
  6133. } FcElement;
  6134. @@ -382,8 +399,12 @@
  6135. { "divide", FcElementDivide },
  6136. { "not", FcElementNot },
  6137. { "if", FcElementIf },
  6138. + { "floor", FcElementFloor },
  6139. + { "ceil", FcElementCeil },
  6140. + { "round", FcElementRound },
  6141. + { "trunc", FcElementTrunc },
  6142. - { 0, FcElementUnknown }
  6143. + { 0, 0 }
  6144. };
  6145. int i;
  6146. @@ -702,6 +723,7 @@
  6147. static FcChar8 **
  6148. FcConfigSaveAttr (const XML_Char **attr)
  6149. {
  6150. + int n;
  6151. int slen;
  6152. int i;
  6153. FcChar8 **new;
  6154. @@ -712,6 +734,7 @@
  6155. slen = 0;
  6156. for (i = 0; attr[i]; i++)
  6157. slen += strlen (attr[i]) + 1;
  6158. + n = i;
  6159. new = malloc ((i + 1) * sizeof (FcChar8 *) + slen);
  6160. if (!new)
  6161. return 0;
  6162. @@ -1283,8 +1306,17 @@
  6163. return expr;
  6164. }
  6165. +/*
  6166. + * This builds a tree of binary operations. Note
  6167. + * that every operator is defined so that if only
  6168. + * a single operand is contained, the value of the
  6169. + * whole expression is the value of the operand.
  6170. + *
  6171. + * This code reduces in that case to returning that
  6172. + * operand.
  6173. + */
  6174. static FcExpr *
  6175. -FcPopExprs (FcConfigParse *parse, FcOp op)
  6176. +FcPopBinary (FcConfigParse *parse, FcOp op)
  6177. {
  6178. FcExpr *left, *expr = 0, *new;
  6179. @@ -1309,9 +1341,39 @@
  6180. }
  6181. static void
  6182. -FcParseExpr (FcConfigParse *parse, FcOp op)
  6183. +FcParseBinary (FcConfigParse *parse, FcOp op)
  6184. {
  6185. - FcExpr *expr = FcPopExprs (parse, op);
  6186. + FcExpr *expr = FcPopBinary (parse, op);
  6187. + if (expr)
  6188. + FcVStackPushExpr (parse, FcVStackExpr, expr);
  6189. +}
  6190. +
  6191. +/*
  6192. + * This builds a a unary operator, it consumes only
  6193. + * a single operand
  6194. + */
  6195. +
  6196. +static FcExpr *
  6197. +FcPopUnary (FcConfigParse *parse, FcOp op)
  6198. +{
  6199. + FcExpr *operand, *new = 0;
  6200. +
  6201. + if ((operand = FcPopExpr (parse)))
  6202. + {
  6203. + new = FcExprCreateOp (operand, op, 0);
  6204. + if (!new)
  6205. + {
  6206. + FcExprDestroy (operand);
  6207. + FcConfigMessage (parse, FcSevereError, "out of memory");
  6208. + }
  6209. + }
  6210. + return new;
  6211. +}
  6212. +
  6213. +static void
  6214. +FcParseUnary (FcConfigParse *parse, FcOp op)
  6215. +{
  6216. + FcExpr *expr = FcPopUnary (parse, op);
  6217. if (expr)
  6218. FcVStackPushExpr (parse, FcVStackExpr, expr);
  6219. }
  6220. @@ -1440,7 +1502,7 @@
  6221. return;
  6222. }
  6223. }
  6224. - expr = FcPopExprs (parse, FcOpComma);
  6225. + expr = FcPopBinary (parse, FcOpComma);
  6226. if (!expr)
  6227. {
  6228. FcConfigMessage (parse, FcSevereWarning, "missing test expression");
  6229. @@ -1510,13 +1572,15 @@
  6230. binding = FcValueBindingWeak;
  6231. else if (!strcmp ((char *) binding_string, "strong"))
  6232. binding = FcValueBindingStrong;
  6233. + else if (!strcmp ((char *) binding_string, "same"))
  6234. + binding = FcValueBindingSame;
  6235. else
  6236. {
  6237. FcConfigMessage (parse, FcSevereWarning, "invalid edit binding \"%s\"", binding_string);
  6238. return;
  6239. }
  6240. }
  6241. - expr = FcPopExprs (parse, FcOpComma);
  6242. + expr = FcPopBinary (parse, FcOpComma);
  6243. edit = FcEditCreate ((char *) FcStrCopy (name), mode, expr, binding);
  6244. if (!edit)
  6245. {
  6246. @@ -1595,8 +1659,35 @@
  6247. FcConfigMessage (parse, FcSevereError, "out of memory");
  6248. break;
  6249. }
  6250. - if (!FcConfigAddDir (parse->config, data))
  6251. - FcConfigMessage (parse, FcSevereError, "out of memory");
  6252. +#ifdef _WIN32
  6253. + if (strcmp (data, "WINDOWSFONTDIR") == 0)
  6254. + {
  6255. + int rc;
  6256. + FcStrFree (data);
  6257. + data = malloc (1000);
  6258. + if (!data)
  6259. + {
  6260. + FcConfigMessage (parse, FcSevereError, "out of memory");
  6261. + break;
  6262. + }
  6263. + FcMemAlloc (FC_MEM_STRING, 1000);
  6264. + rc = GetWindowsDirectory (data, 800);
  6265. + if (rc == 0 || rc > 800)
  6266. + {
  6267. + FcConfigMessage (parse, FcSevereError, "GetWindowsDirectory failed");
  6268. + FcStrFree (data);
  6269. + break;
  6270. + }
  6271. + if (data [strlen (data) - 1] != '\\')
  6272. + strcat (data, "\\");
  6273. + strcat (data, "fonts");
  6274. + }
  6275. +#endif
  6276. + if (!FcStrUsesHome (data) || FcConfigHome ())
  6277. + {
  6278. + if (!FcConfigAddDir (parse->config, data))
  6279. + FcConfigMessage (parse, FcSevereError, "out of memory");
  6280. + }
  6281. FcStrFree (data);
  6282. break;
  6283. case FcElementCache:
  6284. @@ -1606,8 +1697,11 @@
  6285. FcConfigMessage (parse, FcSevereError, "out of memory");
  6286. break;
  6287. }
  6288. - if (!FcConfigSetCache (parse->config, data))
  6289. - FcConfigMessage (parse, FcSevereError, "out of memory");
  6290. + if (!FcStrUsesHome (data) || FcConfigHome ())
  6291. + {
  6292. + if (!FcConfigSetCache (parse->config, data))
  6293. + FcConfigMessage (parse, FcSevereError, "out of memory");
  6294. + }
  6295. FcStrFree (data);
  6296. break;
  6297. case FcElementInclude:
  6298. @@ -1675,52 +1769,64 @@
  6299. FcParseString (parse, FcVStackConstant);
  6300. break;
  6301. case FcElementOr:
  6302. - FcParseExpr (parse, FcOpOr);
  6303. + FcParseBinary (parse, FcOpOr);
  6304. break;
  6305. case FcElementAnd:
  6306. - FcParseExpr (parse, FcOpAnd);
  6307. + FcParseBinary (parse, FcOpAnd);
  6308. break;
  6309. case FcElementEq:
  6310. - FcParseExpr (parse, FcOpEqual);
  6311. + FcParseBinary (parse, FcOpEqual);
  6312. break;
  6313. case FcElementNotEq:
  6314. - FcParseExpr (parse, FcOpNotEqual);
  6315. + FcParseBinary (parse, FcOpNotEqual);
  6316. break;
  6317. case FcElementLess:
  6318. - FcParseExpr (parse, FcOpLess);
  6319. + FcParseBinary (parse, FcOpLess);
  6320. break;
  6321. case FcElementLessEq:
  6322. - FcParseExpr (parse, FcOpLessEqual);
  6323. + FcParseBinary (parse, FcOpLessEqual);
  6324. break;
  6325. case FcElementMore:
  6326. - FcParseExpr (parse, FcOpMore);
  6327. + FcParseBinary (parse, FcOpMore);
  6328. break;
  6329. case FcElementMoreEq:
  6330. - FcParseExpr (parse, FcOpMoreEqual);
  6331. + FcParseBinary (parse, FcOpMoreEqual);
  6332. break;
  6333. case FcElementContains:
  6334. - FcParseExpr (parse, FcOpContains);
  6335. + FcParseBinary (parse, FcOpContains);
  6336. break;
  6337. case FcElementNotContains:
  6338. - FcParseExpr (parse, FcOpNotContains);
  6339. + FcParseBinary (parse, FcOpNotContains);
  6340. break;
  6341. case FcElementPlus:
  6342. - FcParseExpr (parse, FcOpPlus);
  6343. + FcParseBinary (parse, FcOpPlus);
  6344. break;
  6345. case FcElementMinus:
  6346. - FcParseExpr (parse, FcOpMinus);
  6347. + FcParseBinary (parse, FcOpMinus);
  6348. break;
  6349. case FcElementTimes:
  6350. - FcParseExpr (parse, FcOpTimes);
  6351. + FcParseBinary (parse, FcOpTimes);
  6352. break;
  6353. case FcElementDivide:
  6354. - FcParseExpr (parse, FcOpDivide);
  6355. + FcParseBinary (parse, FcOpDivide);
  6356. break;
  6357. case FcElementNot:
  6358. - FcParseExpr (parse, FcOpNot);
  6359. + FcParseUnary (parse, FcOpNot);
  6360. break;
  6361. case FcElementIf:
  6362. - FcParseExpr (parse, FcOpQuest);
  6363. + FcParseBinary (parse, FcOpQuest);
  6364. + break;
  6365. + case FcElementFloor:
  6366. + FcParseUnary (parse, FcOpFloor);
  6367. + break;
  6368. + case FcElementCeil:
  6369. + FcParseUnary (parse, FcOpCeil);
  6370. + break;
  6371. + case FcElementRound:
  6372. + FcParseUnary (parse, FcOpRound);
  6373. + break;
  6374. + case FcElementTrunc:
  6375. + FcParseUnary (parse, FcOpTrunc);
  6376. break;
  6377. case FcElementUnknown:
  6378. break;
  6379. diff -dur xc/extras/fontconfig/src/Imakefile xc-p/extras/fontconfig/src/Imakefile
  6380. --- xc/extras/fontconfig/src/Imakefile 2003-09-25 13:01:22.000000000 +0200
  6381. +++ xc-p/extras/fontconfig/src/Imakefile 2004-11-11 22:22:24.000000000 +0100
  6382. @@ -16,7 +16,7 @@
  6383. #define DoProfileLib ProfileLibFontconfig
  6384. #define HasSharedData YES
  6385. #define LibName fontconfig
  6386. -SOFONTCONFIGREV=1.0
  6387. +SOFONTCONFIGREV=2.2
  6388. #define SoRev SOFONTCONFIGREV
  6389. #include <Threads.tmpl>
  6390. diff -dur xc/lib/fontconfig/Imakefile xc-p/lib/fontconfig/Imakefile
  6391. --- xc/lib/fontconfig/Imakefile 2004-04-12 13:01:28.000000000 +0200
  6392. +++ xc-p/lib/fontconfig/Imakefile 2004-11-11 22:22:24.000000000 +0100
  6393. @@ -7,6 +7,8 @@
  6394. #define DoProfileLib ProfileLibFontconfig
  6395. #define HasSharedData YES
  6396. #define LibName fontconfig
  6397. +
  6398. +SOFONTCONFIGREV=2.2
  6399. #define SoRev SOFONTCONFIGREV
  6400. #define IncSubdir fontconfig
  6401. @@ -45,7 +47,7 @@
  6402. InstallManPage(fontconfig,$(LIBMANDIR))
  6403. DependTarget()
  6404. -FONTCONFIG_VERSION=2.1.0
  6405. +FONTCONFIG_VERSION=2.2.1
  6406. #ifndef FontconfigFontsConfDir
  6407. #if NothingOutsideProjectRoot
  6408. Nur in xc-p/programs/Xserver/hw/tinyx/linux: linux.c~.