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.

6605 lines
205 KiB

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