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.

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