Reimplement FC_LANG as FcTypeLang, freeze patterns, other cleanup

This commit is contained in:
Keith Packard 2002-08-22 07:36:45 +00:00
parent f4fe447f49
commit d8d7395877
18 changed files with 1244 additions and 420 deletions

View File

@ -1,4 +1,24 @@
Mon Aug 19 11:57:27 PDT 2002 Thu Aug 22 00:32:29 PDT 2002 keithp
+ Reimplement FC_LANG as new datatype. Lists of strings
was consuming over a megabyte of memory for 401 fonts.
+ Freeze patterns loaded from cache files. This shares
common value lists and common patterns which saves
considerable memory.
+ Change the denotation of 'constant' charsets to use special
ref value instead of separate boolean.
+ Clean up leak tracing stuff, found several unannoted alloc/free
calls
Tue Aug 20 16:17:37 PDT 2002 keithp
+ Fix memory leak when parsing matrices from XML
Mon Aug 19 11:57:27 PDT 2002 keithp
+ Fix autoconf files to pass FONTCONFIG_PATH on + Fix autoconf files to pass FONTCONFIG_PATH on
compile line so that ${prefix} gets substituted compile line so that ${prefix} gets substituted
correctly. correctly.

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.1 2002/07/06 23:21:36 keithp Exp $ * $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.2 2002/07/07 19:18:51 keithp Exp $
* *
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -159,9 +159,16 @@ get_lang (char *name)
return lang; return lang;
} }
static int compare (const void *a, const void *b)
{
const FcChar8 *const *as = a, *const *bs = b;
return FcStrCmpIgnoreCase (*as, *bs);
}
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
char *files[1024];
FcCharSet *sets[1024]; FcCharSet *sets[1024];
int duplicate[1024]; int duplicate[1024];
char *names[1024]; char *names[1024];
@ -173,12 +180,17 @@ main (int argc, char **argv)
char line[1024]; char line[1024];
while (*++argv) while (*++argv)
files[i++] = *argv;
files[i] = 0;
qsort (files, i, sizeof (char *), compare);
i = 0;
while (files[i])
{ {
f = fopen (*argv, "r"); f = fopen (files[i], "r");
if (!f) if (!f)
fatal (*argv, 0, strerror (errno)); fatal (files[i], 0, strerror (errno));
sets[i] = scan (f, *argv); sets[i] = scan (f, files[i]);
names[i] = get_name (*argv); names[i] = get_name (files[i]);
total_leaves += sets[i]->num; total_leaves += sets[i]->num;
i++; i++;
fclose (f); fclose (f);
@ -304,7 +316,7 @@ main (int argc, char **argv)
if (j < 0) if (j < 0)
j = i; j = i;
printf (" { (FcChar8 *) \"%s\",\n" printf (" { (FcChar8 *) \"%s\",\n"
" { 1, FcTrue, %d, " " { FC_REF_CONSTANT, %d, "
"(FcCharLeaf **) leaves_%s, " "(FcCharLeaf **) leaves_%s, "
"(FcChar16 *) numbers_%s } },\n", "(FcChar16 *) numbers_%s } },\n",
get_lang(names[i]), get_lang(names[i]),

View File

@ -82,21 +82,21 @@ static const FcCharLeaf leaves[609] = {
0x300c0000, 0x0f00c000, 0x03000000, 0x00000300, 0x300c0000, 0x0f00c000, 0x03000000, 0x00000300,
} }, } },
{ { /* 14 */ { { /* 14 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x030c0000, 0x0000cc0f, 0x03000000, 0x00000300,
} },
{ { /* 15 */
0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 15 */ { { /* 16 */
0x00000000, 0x00000000, 0x00000c00, 0x00000000, 0x00000000, 0x00000000, 0x00000c00, 0x00000000,
0x20010040, 0x00000000, 0x00000000, 0x00000000, 0x20010040, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 16 */ { { /* 17 */
0x00000000, 0x00000000, 0x08100000, 0x00040000, 0x00000000, 0x00000000, 0x08100000, 0x00040000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 17 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x030c0000, 0x0000cc0f, 0x03000000, 0x00000300,
} },
{ { /* 18 */ { { /* 18 */
0xffff4042, 0xffffffff, 0x4042ffff, 0x00000000, 0xffff4042, 0xffffffff, 0x4042ffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@ -111,20 +111,20 @@ static const FcCharLeaf leaves[609] = {
} }, } },
{ { /* 21 */ { { /* 21 */
0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
0x00000000, 0x00000000, 0x060c3303, 0x060c3303, 0x00000000, 0x00000000, 0x10008200, 0x10008200,
} }, } },
{ { /* 22 */ { { /* 22 */
0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
0x00000000, 0x00000000, 0x060c3303, 0x060c3303,
} },
{ { /* 23 */
0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 23 */ { { /* 24 */
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x03000000, 0x00003000, 0x00000000, 0x00000000, 0x03000000, 0x00003000, 0x00000000,
} }, } },
{ { /* 24 */
0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
0x00000000, 0x00000000, 0x10008200, 0x10008200,
} },
{ { /* 25 */ { { /* 25 */
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xfff99fee, 0xd3c5fdff, 0xb080399f, 0x07ffffcf, 0xfff99fee, 0xd3c5fdff, 0xb080399f, 0x07ffffcf,
@ -154,13 +154,13 @@ static const FcCharLeaf leaves[609] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 32 */ { { /* 32 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x00000000, 0x00000030, 0x000c0000, 0x030300c0,
} },
{ { /* 33 */
0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe,
0x00000000, 0x00000000, 0x10020004, 0x10020004, 0x00000000, 0x00000000, 0x10020004, 0x10020004,
} }, } },
{ { /* 33 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x00000000, 0x00000030, 0x000c0000, 0x030300c0,
} },
{ { /* 34 */ { { /* 34 */
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xffffffff, 0xffffffff, 0x001fffff, 0x00000000, 0xffffffff, 0xffffffff, 0x001fffff,
@ -738,17 +738,17 @@ static const FcCharLeaf leaves[609] = {
0x00000000, 0x00000000, 0x00000000, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000020,
} }, } },
{ { /* 178 */ { { /* 178 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x000c0000,
0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000,
} },
{ { /* 179 */
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 180 */ { { /* 179 */
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xffffffff, 0xffff003f, 0x087fffff, 0x00000000, 0xffffffff, 0xffff003f, 0x087fffff,
} }, } },
{ { /* 180 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x000c0000,
0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000,
} },
{ { /* 181 */ { { /* 181 */
0x00000000, 0x00000300, 0x00000000, 0x00000300, 0x00000000, 0x00000300, 0x00000000, 0x00000300,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@ -1118,17 +1118,17 @@ static const FcCharLeaf leaves[609] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 273 */ { { /* 273 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} },
{ { /* 274 */
0x00000000, 0x00000000, 0x00820000, 0x00820000, 0x00000000, 0x00000000, 0x00820000, 0x00820000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
} }, } },
{ { /* 275 */ { { /* 274 */
0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000, 0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000,
0x00000000, 0x0c000000, 0x03000000, 0x000000c0, 0x00000000, 0x0c000000, 0x03000000, 0x000000c0,
} }, } },
{ { /* 275 */
0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} },
{ { /* 276 */ { { /* 276 */
0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x000000c0, 0x00000000, 0x00000000, 0x00000000, 0x000000c0,
@ -2537,22 +2537,22 @@ static const FcChar16 numbers_az[4] = {
0x0000, 0x0001, 0x0002, 0x0004, 0x0000, 0x0001, 0x0002, 0x0004,
}; };
static const FcCharLeaf *leaves_bam[3] = {
L( 14), L( 15), L( 16),
};
static const FcChar16 numbers_bam[3] = {
0x0000, 0x0001, 0x0002,
};
static const FcCharLeaf *leaves_ba[1] = { static const FcCharLeaf *leaves_ba[1] = {
L( 17), L( 14),
}; };
static const FcChar16 numbers_ba[1] = { static const FcChar16 numbers_ba[1] = {
0x0004, 0x0004,
}; };
static const FcCharLeaf *leaves_bam[3] = {
L( 15), L( 16), L( 17),
};
static const FcChar16 numbers_bam[3] = {
0x0000, 0x0001, 0x0002,
};
static const FcCharLeaf *leaves_be[1] = { static const FcCharLeaf *leaves_be[1] = {
L( 18), L( 18),
}; };
@ -2569,30 +2569,30 @@ static const FcChar16 numbers_bg[1] = {
0x0004, 0x0004,
}; };
static const FcCharLeaf *leaves_bho[1] = { static const FcCharLeaf *leaves_bh[1] = {
L( 20), L( 20),
}; };
static const FcChar16 numbers_bho[1] = { static const FcChar16 numbers_bh[1] = {
0x0009, 0x0009,
}; };
static const FcCharLeaf *leaves_bin[3] = {
L( 21), L( 22), L( 23),
};
static const FcChar16 numbers_bin[3] = {
0x0000, 0x0003, 0x001e,
};
static const FcCharLeaf *leaves_bi[1] = { static const FcCharLeaf *leaves_bi[1] = {
L( 24), L( 21),
}; };
static const FcChar16 numbers_bi[1] = { static const FcChar16 numbers_bi[1] = {
0x0000, 0x0000,
}; };
static const FcCharLeaf *leaves_bin[3] = {
L( 22), L( 23), L( 24),
};
static const FcChar16 numbers_bin[3] = {
0x0000, 0x0003, 0x001e,
};
static const FcCharLeaf *leaves_bn[1] = { static const FcCharLeaf *leaves_bn[1] = {
L( 25), L( 25),
}; };
@ -2618,7 +2618,7 @@ static const FcChar16 numbers_br[1] = {
}; };
static const FcCharLeaf *leaves_bs[2] = { static const FcCharLeaf *leaves_bs[2] = {
L( 14), L( 28), L( 15), L( 28),
}; };
static const FcChar16 numbers_bs[2] = { static const FcChar16 numbers_bs[2] = {
@ -2641,22 +2641,22 @@ static const FcChar16 numbers_ca[2] = {
0x0000, 0x0001, 0x0000, 0x0001,
}; };
static const FcCharLeaf *leaves_chm[1] = {
L( 32),
};
static const FcChar16 numbers_chm[1] = {
0x0004,
};
static const FcCharLeaf *leaves_ch[1] = { static const FcCharLeaf *leaves_ch[1] = {
L( 33), L( 32),
}; };
static const FcChar16 numbers_ch[1] = { static const FcChar16 numbers_ch[1] = {
0x0000, 0x0000,
}; };
static const FcCharLeaf *leaves_chm[1] = {
L( 33),
};
static const FcChar16 numbers_chm[1] = {
0x0004,
};
static const FcCharLeaf *leaves_chr[1] = { static const FcCharLeaf *leaves_chr[1] = {
L( 34), L( 34),
}; };
@ -2738,7 +2738,7 @@ static const FcChar16 numbers_en[1] = {
}; };
static const FcCharLeaf *leaves_eo[2] = { static const FcCharLeaf *leaves_eo[2] = {
L( 14), L( 50), L( 15), L( 50),
}; };
static const FcChar16 numbers_eo[2] = { static const FcChar16 numbers_eo[2] = {
@ -2786,7 +2786,7 @@ static const FcChar16 numbers_fi[2] = {
}; };
static const FcCharLeaf *leaves_fj[1] = { static const FcCharLeaf *leaves_fj[1] = {
L( 14), L( 15),
}; };
static const FcChar16 numbers_fj[1] = { static const FcChar16 numbers_fj[1] = {
@ -2802,7 +2802,7 @@ static const FcChar16 numbers_fo[1] = {
}; };
static const FcCharLeaf *leaves_ful[3] = { static const FcCharLeaf *leaves_ful[3] = {
L( 14), L( 60), L( 61), L( 15), L( 60), L( 61),
}; };
static const FcChar16 numbers_ful[3] = { static const FcChar16 numbers_ful[3] = {
@ -2874,7 +2874,7 @@ static const FcChar16 numbers_gv[1] = {
}; };
static const FcCharLeaf *leaves_ha[3] = { static const FcCharLeaf *leaves_ha[3] = {
L( 14), L( 75), L( 76), L( 15), L( 75), L( 76),
}; };
static const FcChar16 numbers_ha[3] = { static const FcChar16 numbers_ha[3] = {
@ -2882,7 +2882,7 @@ static const FcChar16 numbers_ha[3] = {
}; };
static const FcCharLeaf *leaves_haw[3] = { static const FcCharLeaf *leaves_haw[3] = {
L( 14), L( 77), L( 78), L( 15), L( 77), L( 78),
}; };
static const FcChar16 numbers_haw[3] = { static const FcChar16 numbers_haw[3] = {
@ -2922,7 +2922,7 @@ static const FcChar16 numbers_hy[1] = {
}; };
static const FcCharLeaf *leaves_ibo[2] = { static const FcCharLeaf *leaves_ibo[2] = {
L( 14), L( 86), L( 15), L( 86),
}; };
static const FcChar16 numbers_ibo[2] = { static const FcChar16 numbers_ibo[2] = {
@ -2997,24 +2997,24 @@ static const FcChar16 numbers_ja[84] = {
0x009d, 0x009e, 0x009f, 0x00ff, 0x009d, 0x009e, 0x009f, 0x00ff,
}; };
static const FcCharLeaf *leaves_kaa[1] = {
L(178),
};
static const FcChar16 numbers_kaa[1] = {
0x0004,
};
static const FcCharLeaf *leaves_ka[2] = { static const FcCharLeaf *leaves_ka[2] = {
L(179), L(180), L(178), L(179),
}; };
static const FcChar16 numbers_ka[2] = { static const FcChar16 numbers_ka[2] = {
0x0005, 0x0010, 0x0005, 0x0010,
}; };
static const FcCharLeaf *leaves_kaa[1] = {
L(180),
};
static const FcChar16 numbers_kaa[1] = {
0x0004,
};
static const FcCharLeaf *leaves_ki[2] = { static const FcCharLeaf *leaves_ki[2] = {
L( 14), L(181), L( 15), L(181),
}; };
static const FcChar16 numbers_ki[2] = { static const FcChar16 numbers_ki[2] = {
@ -3093,22 +3093,22 @@ static const FcChar16 numbers_ko[129] = {
0x00fa, 0x00fa,
}; };
static const FcCharLeaf *leaves_kum[1] = {
L(273),
};
static const FcChar16 numbers_kum[1] = {
0x0004,
};
static const FcCharLeaf *leaves_ku[2] = { static const FcCharLeaf *leaves_ku[2] = {
L(274), L(275), L(273), L(274),
}; };
static const FcChar16 numbers_ku[2] = { static const FcChar16 numbers_ku[2] = {
0x0000, 0x0004, 0x0000, 0x0004,
}; };
static const FcCharLeaf *leaves_kum[1] = {
L(275),
};
static const FcChar16 numbers_kum[1] = {
0x0004,
};
static const FcCharLeaf *leaves_kv[1] = { static const FcCharLeaf *leaves_kv[1] = {
L(276), L(276),
}; };
@ -3118,7 +3118,7 @@ static const FcChar16 numbers_kv[1] = {
}; };
static const FcCharLeaf *leaves_kw[3] = { static const FcCharLeaf *leaves_kw[3] = {
L( 14), L( 77), L(277), L( 15), L( 77), L(277),
}; };
static const FcChar16 numbers_kw[3] = { static const FcChar16 numbers_kw[3] = {
@ -3134,7 +3134,7 @@ static const FcChar16 numbers_ky[1] = {
}; };
static const FcCharLeaf *leaves_la[2] = { static const FcCharLeaf *leaves_la[2] = {
L( 14), L(279), L( 15), L(279),
}; };
static const FcChar16 numbers_la[2] = { static const FcChar16 numbers_la[2] = {
@ -3158,7 +3158,7 @@ static const FcChar16 numbers_lo[1] = {
}; };
static const FcCharLeaf *leaves_lt[2] = { static const FcCharLeaf *leaves_lt[2] = {
L( 14), L(282), L( 15), L(282),
}; };
static const FcChar16 numbers_lt[2] = { static const FcChar16 numbers_lt[2] = {
@ -3166,7 +3166,7 @@ static const FcChar16 numbers_lt[2] = {
}; };
static const FcCharLeaf *leaves_lv[2] = { static const FcCharLeaf *leaves_lv[2] = {
L( 14), L(283), L( 15), L(283),
}; };
static const FcChar16 numbers_lv[2] = { static const FcChar16 numbers_lv[2] = {
@ -3182,7 +3182,7 @@ static const FcChar16 numbers_mg[1] = {
}; };
static const FcCharLeaf *leaves_mh[2] = { static const FcCharLeaf *leaves_mh[2] = {
L( 14), L(285), L( 15), L(285),
}; };
static const FcChar16 numbers_mh[2] = { static const FcChar16 numbers_mh[2] = {
@ -3190,7 +3190,7 @@ static const FcChar16 numbers_mh[2] = {
}; };
static const FcCharLeaf *leaves_mi[3] = { static const FcCharLeaf *leaves_mi[3] = {
L( 14), L( 77), L(286), L( 15), L( 77), L(286),
}; };
static const FcChar16 numbers_mi[3] = { static const FcChar16 numbers_mi[3] = {
@ -3222,7 +3222,7 @@ static const FcChar16 numbers_mn[1] = {
}; };
static const FcCharLeaf *leaves_mo[4] = { static const FcCharLeaf *leaves_mo[4] = {
L(290), L( 40), L(291), L(273), L(290), L( 40), L(291), L(275),
}; };
static const FcChar16 numbers_mo[4] = { static const FcChar16 numbers_mo[4] = {
@ -3270,7 +3270,7 @@ static const FcChar16 numbers_nn[1] = {
}; };
static const FcCharLeaf *leaves_ny[2] = { static const FcCharLeaf *leaves_ny[2] = {
L( 14), L(299), L( 15), L(299),
}; };
static const FcChar16 numbers_ny[2] = { static const FcChar16 numbers_ny[2] = {
@ -3342,7 +3342,7 @@ static const FcChar16 numbers_sah[1] = {
}; };
static const FcCharLeaf *leaves_sco[3] = { static const FcCharLeaf *leaves_sco[3] = {
L( 14), L(308), L(309), L( 15), L(308), L(309),
}; };
static const FcChar16 numbers_sco[3] = { static const FcChar16 numbers_sco[3] = {
@ -3382,13 +3382,21 @@ static const FcChar16 numbers_sk[2] = {
}; };
static const FcCharLeaf *leaves_sl[3] = { static const FcCharLeaf *leaves_sl[3] = {
L( 14), L(316), L(317), L( 15), L(316), L(317),
}; };
static const FcChar16 numbers_sl[3] = { static const FcChar16 numbers_sl[3] = {
0x0000, 0x0001, 0x0004, 0x0000, 0x0001, 0x0004,
}; };
static const FcCharLeaf *leaves_sm[2] = {
L( 15), L( 78),
};
static const FcChar16 numbers_sm[2] = {
0x0000, 0x0002,
};
static const FcCharLeaf *leaves_sma[1] = { static const FcCharLeaf *leaves_sma[1] = {
L(318), L(318),
}; };
@ -3413,14 +3421,6 @@ static const FcChar16 numbers_smn[2] = {
0x0000, 0x0001, 0x0000, 0x0001,
}; };
static const FcCharLeaf *leaves_sm[2] = {
L( 14), L( 78),
};
static const FcChar16 numbers_sm[2] = {
0x0000, 0x0002,
};
static const FcCharLeaf *leaves_sms[3] = { static const FcCharLeaf *leaves_sms[3] = {
L(322), L(323), L(324), L(322), L(323), L(324),
}; };
@ -3550,7 +3550,7 @@ static const FcChar16 numbers_uz[1] = {
}; };
static const FcCharLeaf *leaves_ven[2] = { static const FcCharLeaf *leaves_ven[2] = {
L( 14), L(345), L( 15), L(345),
}; };
static const FcChar16 numbers_ven[2] = { static const FcChar16 numbers_ven[2] = {
@ -3709,354 +3709,354 @@ static const FcChar16 numbers_zh_mo[83] = {
static const FcLangCharSet fcLangCharSets[] = { static const FcLangCharSet fcLangCharSets[] = {
{ (FcChar8 *) "aa", { (FcChar8 *) "aa",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_aa, (FcChar16 *) numbers_aa } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_aa, (FcChar16 *) numbers_aa } },
{ (FcChar8 *) "ab", { (FcChar8 *) "ab",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ab, (FcChar16 *) numbers_ab } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ab, (FcChar16 *) numbers_ab } },
{ (FcChar8 *) "af", { (FcChar8 *) "af",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_af, (FcChar16 *) numbers_af } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_af, (FcChar16 *) numbers_af } },
{ (FcChar8 *) "am", { (FcChar8 *) "am",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } },
{ (FcChar8 *) "ar", { (FcChar8 *) "ar",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } },
{ (FcChar8 *) "ast", { (FcChar8 *) "ast",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ast, (FcChar16 *) numbers_ast } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ast, (FcChar16 *) numbers_ast } },
{ (FcChar8 *) "ava", { (FcChar8 *) "ava",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } },
{ (FcChar8 *) "ay", { (FcChar8 *) "ay",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ay, (FcChar16 *) numbers_ay } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ay, (FcChar16 *) numbers_ay } },
{ (FcChar8 *) "az", { (FcChar8 *) "az",
{ 1, FcTrue, 4, (FcCharLeaf **) leaves_az, (FcChar16 *) numbers_az } }, { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_az, (FcChar16 *) numbers_az } },
{ (FcChar8 *) "bam",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_bam, (FcChar16 *) numbers_bam } },
{ (FcChar8 *) "ba", { (FcChar8 *) "ba",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ba, (FcChar16 *) numbers_ba } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ba, (FcChar16 *) numbers_ba } },
{ (FcChar8 *) "bam",
{ FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_bam, (FcChar16 *) numbers_bam } },
{ (FcChar8 *) "be", { (FcChar8 *) "be",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_be, (FcChar16 *) numbers_be } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_be, (FcChar16 *) numbers_be } },
{ (FcChar8 *) "bg", { (FcChar8 *) "bg",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bg, (FcChar16 *) numbers_bg } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bg, (FcChar16 *) numbers_bg } },
{ (FcChar8 *) "bho",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } },
{ (FcChar8 *) "bh", { (FcChar8 *) "bh",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "bin", { (FcChar8 *) "bho",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_bin, (FcChar16 *) numbers_bin } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "bi", { (FcChar8 *) "bi",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bi, (FcChar16 *) numbers_bi } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bi, (FcChar16 *) numbers_bi } },
{ (FcChar8 *) "bin",
{ FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_bin, (FcChar16 *) numbers_bin } },
{ (FcChar8 *) "bn", { (FcChar8 *) "bn",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bn, (FcChar16 *) numbers_bn } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bn, (FcChar16 *) numbers_bn } },
{ (FcChar8 *) "bo", { (FcChar8 *) "bo",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } },
{ (FcChar8 *) "br", { (FcChar8 *) "br",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_br, (FcChar16 *) numbers_br } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_br, (FcChar16 *) numbers_br } },
{ (FcChar8 *) "bs", { (FcChar8 *) "bs",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_bs, (FcChar16 *) numbers_bs } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_bs, (FcChar16 *) numbers_bs } },
{ (FcChar8 *) "bua", { (FcChar8 *) "bua",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bua, (FcChar16 *) numbers_bua } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bua, (FcChar16 *) numbers_bua } },
{ (FcChar8 *) "ca", { (FcChar8 *) "ca",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ca, (FcChar16 *) numbers_ca } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ca, (FcChar16 *) numbers_ca } },
{ (FcChar8 *) "ce", { (FcChar8 *) "ce",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } },
{ (FcChar8 *) "chm",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_chm, (FcChar16 *) numbers_chm } },
{ (FcChar8 *) "ch", { (FcChar8 *) "ch",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ch, (FcChar16 *) numbers_ch } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ch, (FcChar16 *) numbers_ch } },
{ (FcChar8 *) "chm",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_chm, (FcChar16 *) numbers_chm } },
{ (FcChar8 *) "chr", { (FcChar8 *) "chr",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_chr, (FcChar16 *) numbers_chr } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_chr, (FcChar16 *) numbers_chr } },
{ (FcChar8 *) "co", { (FcChar8 *) "co",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } },
{ (FcChar8 *) "cs", { (FcChar8 *) "cs",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_cs, (FcChar16 *) numbers_cs } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_cs, (FcChar16 *) numbers_cs } },
{ (FcChar8 *) "cu", { (FcChar8 *) "cu",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_cu, (FcChar16 *) numbers_cu } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_cu, (FcChar16 *) numbers_cu } },
{ (FcChar8 *) "cv", { (FcChar8 *) "cv",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_cv, (FcChar16 *) numbers_cv } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_cv, (FcChar16 *) numbers_cv } },
{ (FcChar8 *) "cy", { (FcChar8 *) "cy",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_cy, (FcChar16 *) numbers_cy } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_cy, (FcChar16 *) numbers_cy } },
{ (FcChar8 *) "da", { (FcChar8 *) "da",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_da, (FcChar16 *) numbers_da } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_da, (FcChar16 *) numbers_da } },
{ (FcChar8 *) "de", { (FcChar8 *) "de",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_de, (FcChar16 *) numbers_de } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_de, (FcChar16 *) numbers_de } },
{ (FcChar8 *) "dz", { (FcChar8 *) "dz",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } },
{ (FcChar8 *) "el", { (FcChar8 *) "el",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_el, (FcChar16 *) numbers_el } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_el, (FcChar16 *) numbers_el } },
{ (FcChar8 *) "en", { (FcChar8 *) "en",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_en, (FcChar16 *) numbers_en } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_en, (FcChar16 *) numbers_en } },
{ (FcChar8 *) "eo", { (FcChar8 *) "eo",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_eo, (FcChar16 *) numbers_eo } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_eo, (FcChar16 *) numbers_eo } },
{ (FcChar8 *) "es", { (FcChar8 *) "es",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_es, (FcChar16 *) numbers_es } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_es, (FcChar16 *) numbers_es } },
{ (FcChar8 *) "et", { (FcChar8 *) "et",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_et, (FcChar16 *) numbers_et } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_et, (FcChar16 *) numbers_et } },
{ (FcChar8 *) "eu", { (FcChar8 *) "eu",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_eu, (FcChar16 *) numbers_eu } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_eu, (FcChar16 *) numbers_eu } },
{ (FcChar8 *) "fa", { (FcChar8 *) "fa",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_fa, (FcChar16 *) numbers_fa } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_fa, (FcChar16 *) numbers_fa } },
{ (FcChar8 *) "fi", { (FcChar8 *) "fi",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_fi, (FcChar16 *) numbers_fi } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_fi, (FcChar16 *) numbers_fi } },
{ (FcChar8 *) "fj", { (FcChar8 *) "fj",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "fo", { (FcChar8 *) "fo",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fo, (FcChar16 *) numbers_fo } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fo, (FcChar16 *) numbers_fo } },
{ (FcChar8 *) "fr", { (FcChar8 *) "fr",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } },
{ (FcChar8 *) "ful", { (FcChar8 *) "ful",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_ful, (FcChar16 *) numbers_ful } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ful, (FcChar16 *) numbers_ful } },
{ (FcChar8 *) "fur", { (FcChar8 *) "fur",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fur, (FcChar16 *) numbers_fur } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fur, (FcChar16 *) numbers_fur } },
{ (FcChar8 *) "fy", { (FcChar8 *) "fy",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fy, (FcChar16 *) numbers_fy } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fy, (FcChar16 *) numbers_fy } },
{ (FcChar8 *) "ga", { (FcChar8 *) "ga",
{ 1, FcTrue, 4, (FcCharLeaf **) leaves_ga, (FcChar16 *) numbers_ga } }, { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_ga, (FcChar16 *) numbers_ga } },
{ (FcChar8 *) "gd", { (FcChar8 *) "gd",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_gd, (FcChar16 *) numbers_gd } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gd, (FcChar16 *) numbers_gd } },
{ (FcChar8 *) "gez", { (FcChar8 *) "gez",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } },
{ (FcChar8 *) "gl", { (FcChar8 *) "gl",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_gl, (FcChar16 *) numbers_gl } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gl, (FcChar16 *) numbers_gl } },
{ (FcChar8 *) "gn", { (FcChar8 *) "gn",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_gn, (FcChar16 *) numbers_gn } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_gn, (FcChar16 *) numbers_gn } },
{ (FcChar8 *) "gu", { (FcChar8 *) "gu",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_gu, (FcChar16 *) numbers_gu } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gu, (FcChar16 *) numbers_gu } },
{ (FcChar8 *) "gv", { (FcChar8 *) "gv",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_gv, (FcChar16 *) numbers_gv } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gv, (FcChar16 *) numbers_gv } },
{ (FcChar8 *) "ha", { (FcChar8 *) "ha",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_ha, (FcChar16 *) numbers_ha } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ha, (FcChar16 *) numbers_ha } },
{ (FcChar8 *) "haw", { (FcChar8 *) "haw",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_haw, (FcChar16 *) numbers_haw } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_haw, (FcChar16 *) numbers_haw } },
{ (FcChar8 *) "he", { (FcChar8 *) "he",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } },
{ (FcChar8 *) "hi", { (FcChar8 *) "hi",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "ho", { (FcChar8 *) "ho",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "hr", { (FcChar8 *) "hr",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_hr, (FcChar16 *) numbers_hr } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_hr, (FcChar16 *) numbers_hr } },
{ (FcChar8 *) "hu", { (FcChar8 *) "hu",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_hu, (FcChar16 *) numbers_hu } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_hu, (FcChar16 *) numbers_hu } },
{ (FcChar8 *) "hy", { (FcChar8 *) "hy",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_hy, (FcChar16 *) numbers_hy } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_hy, (FcChar16 *) numbers_hy } },
{ (FcChar8 *) "ia", { (FcChar8 *) "ia",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "ibo", { (FcChar8 *) "ibo",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ibo, (FcChar16 *) numbers_ibo } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ibo, (FcChar16 *) numbers_ibo } },
{ (FcChar8 *) "id", { (FcChar8 *) "id",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_id, (FcChar16 *) numbers_id } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_id, (FcChar16 *) numbers_id } },
{ (FcChar8 *) "ie", { (FcChar8 *) "ie",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "ik", { (FcChar8 *) "ik",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ik, (FcChar16 *) numbers_ik } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ik, (FcChar16 *) numbers_ik } },
{ (FcChar8 *) "io", { (FcChar8 *) "io",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "is", { (FcChar8 *) "is",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_is, (FcChar16 *) numbers_is } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_is, (FcChar16 *) numbers_is } },
{ (FcChar8 *) "it", { (FcChar8 *) "it",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_it, (FcChar16 *) numbers_it } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_it, (FcChar16 *) numbers_it } },
{ (FcChar8 *) "iu", { (FcChar8 *) "iu",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_iu, (FcChar16 *) numbers_iu } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_iu, (FcChar16 *) numbers_iu } },
{ (FcChar8 *) "ja", { (FcChar8 *) "ja",
{ 1, FcTrue, 84, (FcCharLeaf **) leaves_ja, (FcChar16 *) numbers_ja } }, { FC_REF_CONSTANT, 84, (FcCharLeaf **) leaves_ja, (FcChar16 *) numbers_ja } },
{ (FcChar8 *) "kaa",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kaa, (FcChar16 *) numbers_kaa } },
{ (FcChar8 *) "ka", { (FcChar8 *) "ka",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ka, (FcChar16 *) numbers_ka } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ka, (FcChar16 *) numbers_ka } },
{ (FcChar8 *) "kaa",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kaa, (FcChar16 *) numbers_kaa } },
{ (FcChar8 *) "ki", { (FcChar8 *) "ki",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ki, (FcChar16 *) numbers_ki } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ki, (FcChar16 *) numbers_ki } },
{ (FcChar8 *) "kk", { (FcChar8 *) "kk",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kk, (FcChar16 *) numbers_kk } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kk, (FcChar16 *) numbers_kk } },
{ (FcChar8 *) "kl", { (FcChar8 *) "kl",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_kl, (FcChar16 *) numbers_kl } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_kl, (FcChar16 *) numbers_kl } },
{ (FcChar8 *) "km", { (FcChar8 *) "km",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_km, (FcChar16 *) numbers_km } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_km, (FcChar16 *) numbers_km } },
{ (FcChar8 *) "kn", { (FcChar8 *) "kn",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kn, (FcChar16 *) numbers_kn } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kn, (FcChar16 *) numbers_kn } },
{ (FcChar8 *) "kok",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } },
{ (FcChar8 *) "ko", { (FcChar8 *) "ko",
{ 1, FcTrue, 129, (FcCharLeaf **) leaves_ko, (FcChar16 *) numbers_ko } }, { FC_REF_CONSTANT, 129, (FcCharLeaf **) leaves_ko, (FcChar16 *) numbers_ko } },
{ (FcChar8 *) "kok",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "ks", { (FcChar8 *) "ks",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "kum",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } },
{ (FcChar8 *) "ku", { (FcChar8 *) "ku",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ku, (FcChar16 *) numbers_ku } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ku, (FcChar16 *) numbers_ku } },
{ (FcChar8 *) "kum",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } },
{ (FcChar8 *) "kv", { (FcChar8 *) "kv",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kv, (FcChar16 *) numbers_kv } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kv, (FcChar16 *) numbers_kv } },
{ (FcChar8 *) "kw", { (FcChar8 *) "kw",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_kw, (FcChar16 *) numbers_kw } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_kw, (FcChar16 *) numbers_kw } },
{ (FcChar8 *) "ky", { (FcChar8 *) "ky",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } },
{ (FcChar8 *) "la", { (FcChar8 *) "la",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_la, (FcChar16 *) numbers_la } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_la, (FcChar16 *) numbers_la } },
{ (FcChar8 *) "lb", { (FcChar8 *) "lb",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_lb, (FcChar16 *) numbers_lb } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_lb, (FcChar16 *) numbers_lb } },
{ (FcChar8 *) "lez", { (FcChar8 *) "lez",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } },
{ (FcChar8 *) "lo", { (FcChar8 *) "lo",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_lo, (FcChar16 *) numbers_lo } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_lo, (FcChar16 *) numbers_lo } },
{ (FcChar8 *) "lt", { (FcChar8 *) "lt",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_lt, (FcChar16 *) numbers_lt } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_lt, (FcChar16 *) numbers_lt } },
{ (FcChar8 *) "lv", { (FcChar8 *) "lv",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_lv, (FcChar16 *) numbers_lv } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_lv, (FcChar16 *) numbers_lv } },
{ (FcChar8 *) "mg", { (FcChar8 *) "mg",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_mg, (FcChar16 *) numbers_mg } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mg, (FcChar16 *) numbers_mg } },
{ (FcChar8 *) "mh", { (FcChar8 *) "mh",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_mh, (FcChar16 *) numbers_mh } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_mh, (FcChar16 *) numbers_mh } },
{ (FcChar8 *) "mi", { (FcChar8 *) "mi",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_mi, (FcChar16 *) numbers_mi } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_mi, (FcChar16 *) numbers_mi } },
{ (FcChar8 *) "mk", { (FcChar8 *) "mk",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_mk, (FcChar16 *) numbers_mk } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mk, (FcChar16 *) numbers_mk } },
{ (FcChar8 *) "ml", { (FcChar8 *) "ml",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ml, (FcChar16 *) numbers_ml } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ml, (FcChar16 *) numbers_ml } },
{ (FcChar8 *) "mn", { (FcChar8 *) "mn",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_mn, (FcChar16 *) numbers_mn } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mn, (FcChar16 *) numbers_mn } },
{ (FcChar8 *) "mo", { (FcChar8 *) "mo",
{ 1, FcTrue, 4, (FcCharLeaf **) leaves_mo, (FcChar16 *) numbers_mo } }, { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_mo, (FcChar16 *) numbers_mo } },
{ (FcChar8 *) "mr", { (FcChar8 *) "mr",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "mt", { (FcChar8 *) "mt",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_mt, (FcChar16 *) numbers_mt } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_mt, (FcChar16 *) numbers_mt } },
{ (FcChar8 *) "my", { (FcChar8 *) "my",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_my, (FcChar16 *) numbers_my } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_my, (FcChar16 *) numbers_my } },
{ (FcChar8 *) "nb", { (FcChar8 *) "nb",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } },
{ (FcChar8 *) "ne", { (FcChar8 *) "ne",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "nl", { (FcChar8 *) "nl",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_nl, (FcChar16 *) numbers_nl } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nl, (FcChar16 *) numbers_nl } },
{ (FcChar8 *) "nn", { (FcChar8 *) "nn",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_nn, (FcChar16 *) numbers_nn } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nn, (FcChar16 *) numbers_nn } },
{ (FcChar8 *) "no", { (FcChar8 *) "no",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } },
{ (FcChar8 *) "ny", { (FcChar8 *) "ny",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ny, (FcChar16 *) numbers_ny } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ny, (FcChar16 *) numbers_ny } },
{ (FcChar8 *) "oc", { (FcChar8 *) "oc",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_oc, (FcChar16 *) numbers_oc } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_oc, (FcChar16 *) numbers_oc } },
{ (FcChar8 *) "om", { (FcChar8 *) "om",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "or", { (FcChar8 *) "or",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_or, (FcChar16 *) numbers_or } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_or, (FcChar16 *) numbers_or } },
{ (FcChar8 *) "os", { (FcChar8 *) "os",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } },
{ (FcChar8 *) "pl", { (FcChar8 *) "pl",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_pl, (FcChar16 *) numbers_pl } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_pl, (FcChar16 *) numbers_pl } },
{ (FcChar8 *) "pt", { (FcChar8 *) "pt",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_pt, (FcChar16 *) numbers_pt } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_pt, (FcChar16 *) numbers_pt } },
{ (FcChar8 *) "rm", { (FcChar8 *) "rm",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_rm, (FcChar16 *) numbers_rm } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_rm, (FcChar16 *) numbers_rm } },
{ (FcChar8 *) "ro", { (FcChar8 *) "ro",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_ro, (FcChar16 *) numbers_ro } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ro, (FcChar16 *) numbers_ro } },
{ (FcChar8 *) "ru", { (FcChar8 *) "ru",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ru, (FcChar16 *) numbers_ru } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ru, (FcChar16 *) numbers_ru } },
{ (FcChar8 *) "sah",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sah, (FcChar16 *) numbers_sah } },
{ (FcChar8 *) "sa", { (FcChar8 *) "sa",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_bho, (FcChar16 *) numbers_bho } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } },
{ (FcChar8 *) "sah",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sah, (FcChar16 *) numbers_sah } },
{ (FcChar8 *) "sco", { (FcChar8 *) "sco",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_sco, (FcChar16 *) numbers_sco } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_sco, (FcChar16 *) numbers_sco } },
{ (FcChar8 *) "sel",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } },
{ (FcChar8 *) "se", { (FcChar8 *) "se",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_se, (FcChar16 *) numbers_se } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_se, (FcChar16 *) numbers_se } },
{ (FcChar8 *) "sel",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } },
{ (FcChar8 *) "sh", { (FcChar8 *) "sh",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } },
{ (FcChar8 *) "si", { (FcChar8 *) "si",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_si, (FcChar16 *) numbers_si } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_si, (FcChar16 *) numbers_si } },
{ (FcChar8 *) "sk", { (FcChar8 *) "sk",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_sk, (FcChar16 *) numbers_sk } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sk, (FcChar16 *) numbers_sk } },
{ (FcChar8 *) "sl", { (FcChar8 *) "sl",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_sl, (FcChar16 *) numbers_sl } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_sl, (FcChar16 *) numbers_sl } },
{ (FcChar8 *) "sma",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sma, (FcChar16 *) numbers_sma } },
{ (FcChar8 *) "smj",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_smj, (FcChar16 *) numbers_smj } },
{ (FcChar8 *) "smn",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_smn, (FcChar16 *) numbers_smn } },
{ (FcChar8 *) "sm", { (FcChar8 *) "sm",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } },
{ (FcChar8 *) "sma",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sma, (FcChar16 *) numbers_sma } },
{ (FcChar8 *) "smj",
{ FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_smj, (FcChar16 *) numbers_smj } },
{ (FcChar8 *) "smn",
{ FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_smn, (FcChar16 *) numbers_smn } },
{ (FcChar8 *) "sms", { (FcChar8 *) "sms",
{ 1, FcTrue, 3, (FcCharLeaf **) leaves_sms, (FcChar16 *) numbers_sms } }, { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_sms, (FcChar16 *) numbers_sms } },
{ (FcChar8 *) "so", { (FcChar8 *) "so",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "sq", { (FcChar8 *) "sq",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sq, (FcChar16 *) numbers_sq } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sq, (FcChar16 *) numbers_sq } },
{ (FcChar8 *) "sr", { (FcChar8 *) "sr",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } },
{ (FcChar8 *) "sv", { (FcChar8 *) "sv",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_sv, (FcChar16 *) numbers_sv } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sv, (FcChar16 *) numbers_sv } },
{ (FcChar8 *) "sw", { (FcChar8 *) "sw",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "syr", { (FcChar8 *) "syr",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_syr, (FcChar16 *) numbers_syr } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_syr, (FcChar16 *) numbers_syr } },
{ (FcChar8 *) "ta", { (FcChar8 *) "ta",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ta, (FcChar16 *) numbers_ta } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ta, (FcChar16 *) numbers_ta } },
{ (FcChar8 *) "te", { (FcChar8 *) "te",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_te, (FcChar16 *) numbers_te } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_te, (FcChar16 *) numbers_te } },
{ (FcChar8 *) "tg", { (FcChar8 *) "tg",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_tg, (FcChar16 *) numbers_tg } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tg, (FcChar16 *) numbers_tg } },
{ (FcChar8 *) "th", { (FcChar8 *) "th",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_th, (FcChar16 *) numbers_th } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_th, (FcChar16 *) numbers_th } },
{ (FcChar8 *) "ti", { (FcChar8 *) "ti",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } },
{ (FcChar8 *) "tk", { (FcChar8 *) "tk",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_tk, (FcChar16 *) numbers_tk } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tk, (FcChar16 *) numbers_tk } },
{ (FcChar8 *) "tl", { (FcChar8 *) "tl",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_tl, (FcChar16 *) numbers_tl } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tl, (FcChar16 *) numbers_tl } },
{ (FcChar8 *) "tn", { (FcChar8 *) "tn",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_tn, (FcChar16 *) numbers_tn } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tn, (FcChar16 *) numbers_tn } },
{ (FcChar8 *) "to", { (FcChar8 *) "to",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } },
{ (FcChar8 *) "tr", { (FcChar8 *) "tr",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_tr, (FcChar16 *) numbers_tr } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_tr, (FcChar16 *) numbers_tr } },
{ (FcChar8 *) "ts", { (FcChar8 *) "ts",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "tt", { (FcChar8 *) "tt",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_tt, (FcChar16 *) numbers_tt } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tt, (FcChar16 *) numbers_tt } },
{ (FcChar8 *) "tw", { (FcChar8 *) "tw",
{ 1, FcTrue, 5, (FcCharLeaf **) leaves_tw, (FcChar16 *) numbers_tw } }, { FC_REF_CONSTANT, 5, (FcCharLeaf **) leaves_tw, (FcChar16 *) numbers_tw } },
{ (FcChar8 *) "tyv", { (FcChar8 *) "tyv",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } },
{ (FcChar8 *) "ug", { (FcChar8 *) "ug",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } },
{ (FcChar8 *) "uk", { (FcChar8 *) "uk",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_uk, (FcChar16 *) numbers_uk } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_uk, (FcChar16 *) numbers_uk } },
{ (FcChar8 *) "ur", { (FcChar8 *) "ur",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } },
{ (FcChar8 *) "uz", { (FcChar8 *) "uz",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_uz, (FcChar16 *) numbers_uz } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_uz, (FcChar16 *) numbers_uz } },
{ (FcChar8 *) "ven", { (FcChar8 *) "ven",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_ven, (FcChar16 *) numbers_ven } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ven, (FcChar16 *) numbers_ven } },
{ (FcChar8 *) "vi", { (FcChar8 *) "vi",
{ 1, FcTrue, 4, (FcCharLeaf **) leaves_vi, (FcChar16 *) numbers_vi } }, { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_vi, (FcChar16 *) numbers_vi } },
{ (FcChar8 *) "vo", { (FcChar8 *) "vo",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_vo, (FcChar16 *) numbers_vo } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_vo, (FcChar16 *) numbers_vo } },
{ (FcChar8 *) "vot", { (FcChar8 *) "vot",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_vot, (FcChar16 *) numbers_vot } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_vot, (FcChar16 *) numbers_vot } },
{ (FcChar8 *) "wa", { (FcChar8 *) "wa",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_wa, (FcChar16 *) numbers_wa } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_wa, (FcChar16 *) numbers_wa } },
{ (FcChar8 *) "wen", { (FcChar8 *) "wen",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_wen, (FcChar16 *) numbers_wen } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_wen, (FcChar16 *) numbers_wen } },
{ (FcChar8 *) "wo", { (FcChar8 *) "wo",
{ 1, FcTrue, 2, (FcCharLeaf **) leaves_wo, (FcChar16 *) numbers_wo } }, { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_wo, (FcChar16 *) numbers_wo } },
{ (FcChar8 *) "xh", { (FcChar8 *) "xh",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
{ (FcChar8 *) "yap", { (FcChar8 *) "yap",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_yap, (FcChar16 *) numbers_yap } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_yap, (FcChar16 *) numbers_yap } },
{ (FcChar8 *) "yi", { (FcChar8 *) "yi",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } },
{ (FcChar8 *) "yo", { (FcChar8 *) "yo",
{ 1, FcTrue, 4, (FcCharLeaf **) leaves_yo, (FcChar16 *) numbers_yo } }, { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_yo, (FcChar16 *) numbers_yo } },
{ (FcChar8 *) "zh-cn", { (FcChar8 *) "zh-cn",
{ 1, FcTrue, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } }, { FC_REF_CONSTANT, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } },
{ (FcChar8 *) "zh-hk", { (FcChar8 *) "zh-hk",
{ 1, FcTrue, 83, (FcCharLeaf **) leaves_zh_hk, (FcChar16 *) numbers_zh_hk } }, { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_hk, (FcChar16 *) numbers_zh_hk } },
{ (FcChar8 *) "zh-mo", { (FcChar8 *) "zh-mo",
{ 1, FcTrue, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } }, { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } },
{ (FcChar8 *) "zh-sg", { (FcChar8 *) "zh-sg",
{ 1, FcTrue, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } }, { FC_REF_CONSTANT, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } },
{ (FcChar8 *) "zh-tw", { (FcChar8 *) "zh-tw",
{ 1, FcTrue, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } }, { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } },
{ (FcChar8 *) "zu", { (FcChar8 *) "zu",
{ 1, FcTrue, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } },
}; };

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.4 2002/08/11 18:10:41 keithp Exp $ * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.5 2002/08/19 19:32:04 keithp Exp $
* *
* Copyright Š 2001 Keith Packard, member of The XFree86 Project, Inc. * Copyright Š 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -73,6 +73,9 @@
case FcTypeFTFace: \ case FcTypeFTFace: \
__v__.u.f = va_arg (va, FT_Face); \ __v__.u.f = va_arg (va, FT_Face); \
break; \ break; \
case FcTypeLangSet: \
__v__.u.l = va_arg (va, FcLangSet *); \
break; \
} \ } \
if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \ if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \
goto _FcPatternVapBuild_bail1; \ goto _FcPatternVapBuild_bail1; \

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.25 2002/08/11 18:10:41 keithp Exp $ * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.26 2002/08/19 19:32:04 keithp Exp $
* *
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -109,7 +109,8 @@ typedef enum _FcType {
FcTypeBool, FcTypeBool,
FcTypeMatrix, FcTypeMatrix,
FcTypeCharSet, FcTypeCharSet,
FcTypeFTFace FcTypeFTFace,
FcTypeLangSet
} FcType; } FcType;
typedef struct _FcMatrix { typedef struct _FcMatrix {
@ -143,6 +144,8 @@ typedef enum _FcResult {
typedef struct _FcPattern FcPattern; typedef struct _FcPattern FcPattern;
typedef struct _FcLangSet FcLangSet;
typedef struct _FcValue { typedef struct _FcValue {
FcType type; FcType type;
union { union {
@ -154,6 +157,7 @@ typedef struct _FcValue {
const FcCharSet *c; const FcCharSet *c;
void *f; void *f;
const FcPattern *p; const FcPattern *p;
const FcLangSet *l;
} u; } u;
} FcValue; } FcValue;
@ -173,6 +177,10 @@ typedef enum _FcMatchKind {
FcMatchPattern, FcMatchFont FcMatchPattern, FcMatchFont
} FcMatchKind; } FcMatchKind;
typedef enum _FcLangResult {
FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang
} FcLangResult;
typedef enum _FcSetName { typedef enum _FcSetName {
FcSetSystem = 0, FcSetSystem = 0,
FcSetApplication = 1 FcSetApplication = 1
@ -409,6 +417,31 @@ FcInitReinitialize (void);
FcBool FcBool
FcInitBringUptoDate (void); FcInitBringUptoDate (void);
/* fclang.c */
FcLangSet *
FcLangSetCreate (void);
void
FcLangSetDestroy (FcLangSet *ls);
FcLangSet *
FcLangSetCopy (const FcLangSet *ls);
FcBool
FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
FcLangResult
FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
FcLangResult
FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb);
FcBool
FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb);
FcChar32
FcLangSetHash (const FcLangSet *ls);
/* fclist.c */ /* fclist.c */
FcObjectSet * FcObjectSet *
FcObjectSetCreate (void); FcObjectSetCreate (void);
@ -609,6 +642,9 @@ FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);
FcBool FcBool
FcPatternAddBool (FcPattern *p, const char *object, FcBool b); FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
FcBool
FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
FcResult FcResult
FcPatternGetInteger (FcPattern *p, const char *object, int n, int *i); FcPatternGetInteger (FcPattern *p, const char *object, int n, int *i);
@ -627,6 +663,9 @@ FcPatternGetCharSet (FcPattern *p, const char *object, int n, FcCharSet **c);
FcResult FcResult
FcPatternGetBool (FcPattern *p, const char *object, int n, FcBool *b); FcPatternGetBool (FcPattern *p, const char *object, int n, FcBool *b);
FcResult
FcPatternGetLangSet (FcPattern *p, const char *object, int n, FcLangSet **ls);
FcPattern * FcPattern *
FcPatternVaBuild (FcPattern *orig, va_list va); FcPatternVaBuild (FcPattern *orig, va_list va);
@ -691,6 +730,9 @@ FcStrSetCreate (void);
FcBool FcBool
FcStrSetMember (FcStrSet *set, const FcChar8 *s); FcStrSetMember (FcStrSet *set, const FcChar8 *s);
FcBool
FcStrSetEqual (FcStrSet *sa, FcStrSet *sb);
FcBool FcBool
FcStrSetAdd (FcStrSet *set, const FcChar8 *s); FcStrSetAdd (FcStrSet *set, const FcChar8 *s);

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.10 2002/08/06 19:00:43 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.11 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -247,6 +247,7 @@ FcCacheFontSetAdd (FcFontSet *set,
int len; int len;
FcBool ret = FcFalse; FcBool ret = FcFalse;
FcPattern *font; FcPattern *font;
FcPattern *frozen;
path = path_buf; path = path_buf;
len = (dir_len + 1 + strlen ((const char *) file) + 1); len = (dir_len + 1 + strlen ((const char *) file) + 1);
@ -277,10 +278,15 @@ FcCacheFontSetAdd (FcFontSet *set,
{ {
if (FcDebug () & FC_DBG_CACHEV) if (FcDebug () & FC_DBG_CACHEV)
printf (" dir cache file \"%s\"\n", file); printf (" dir cache file \"%s\"\n", file);
ret = (FcPatternAddString (font, FC_FILE, path) && ret = FcPatternAddString (font, FC_FILE, path);
FcFontSetAdd (set, font)); if (ret)
if (!ret) {
FcPatternDestroy (font); frozen = FcPatternFreeze (font);
ret = (frozen != 0);
if (ret)
ret = FcFontSetAdd (set, frozen);
}
FcPatternDestroy (font);
} }
} }
if (path != path_buf) free (path); if (path != path_buf) free (path);

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.19 2002/08/11 18:10:42 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.20 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -473,6 +473,11 @@ FcConfigPromote (FcValue v, FcValue u)
v.u.m = &FcIdentityMatrix; v.u.m = &FcIdentityMatrix;
v.type = FcTypeMatrix; v.type = FcTypeMatrix;
} }
else if (v.type == FcTypeString && u.type == FcTypeLangSet)
{
v.u.l = FcLangSetPromote (v.u.s);
v.type = FcTypeLangSet;
}
return v; return v;
} }
@ -570,6 +575,21 @@ FcConfigCompareValue (FcValue m,
break; break;
} }
break; break;
case FcTypeLangSet:
switch (op) {
case FcOpContains:
ret = FcLangSetCompare (v.u.l, m.u.l) != FcLangDifferentLang;
break;
case FcOpEqual:
ret = FcLangSetEqual (v.u.l, m.u.l);
break;
case FcOpNotEqual:
ret = !FcLangSetEqual (v.u.l, m.u.l);
break;
default:
break;
}
break;
case FcTypeVoid: case FcTypeVoid:
switch (op) { switch (op) {
case FcOpEqual: case FcOpEqual:

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.16 2002/07/09 02:28:29 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.17 2002/07/13 05:43:25 keithp Exp $
* *
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -42,7 +42,6 @@ FcCharSetCreate (void)
fcs->num = 0; fcs->num = 0;
fcs->leaves = 0; fcs->leaves = 0;
fcs->numbers = 0; fcs->numbers = 0;
fcs->constant = FcFalse;
return fcs; return fcs;
} }
@ -59,28 +58,28 @@ FcCharSetNew (void)
void void
FcCharSetDestroy (FcCharSet *fcs) FcCharSetDestroy (FcCharSet *fcs)
{ {
if (!fcs->constant && --fcs->ref <= 0) int i;
if (fcs->ref == FC_REF_CONSTANT)
return;
if (--fcs->ref > 0)
return;
for (i = 0; i < fcs->num; i++)
{ {
int i; FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf));
free (fcs->leaves[i]);
for (i = 0; i < fcs->num; i++)
{
FcMemFree (FC_MEM_CHARNODE, sizeof (FcCharLeaf));
free (fcs->leaves[i]);
}
if (fcs->leaves)
{
FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcCharLeaf *));
free (fcs->leaves);
}
if (fcs->numbers)
{
FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16));
free (fcs->numbers);
}
FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
free (fcs);
} }
if (fcs->leaves)
{
FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcCharLeaf *));
free (fcs->leaves);
}
if (fcs->numbers)
{
FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16));
free (fcs->numbers);
}
FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
free (fcs);
} }
/* /*
@ -143,6 +142,7 @@ FcCharSetPutLeaf (FcCharSet *fcs,
leaves = realloc (fcs->leaves, (fcs->num + 1) * sizeof (FcCharLeaf *)); leaves = realloc (fcs->leaves, (fcs->num + 1) * sizeof (FcCharLeaf *));
if (!leaves) if (!leaves)
return FcFalse; return FcFalse;
FcMemAlloc (FC_MEM_CHARSET, sizeof (FcCharLeaf *));
fcs->leaves = leaves; fcs->leaves = leaves;
if (!fcs->numbers) if (!fcs->numbers)
numbers = malloc (sizeof (FcChar16)); numbers = malloc (sizeof (FcChar16));
@ -150,6 +150,7 @@ FcCharSetPutLeaf (FcCharSet *fcs,
numbers = realloc (fcs->numbers, (fcs->num + 1) * sizeof (FcChar16)); numbers = realloc (fcs->numbers, (fcs->num + 1) * sizeof (FcChar16));
if (!numbers) if (!numbers)
return FcFalse; return FcFalse;
FcMemAlloc (FC_MEM_CHARSET, sizeof (FcChar16));
fcs->numbers = numbers; fcs->numbers = numbers;
memmove (fcs->leaves + pos + 1, fcs->leaves + pos, memmove (fcs->leaves + pos + 1, fcs->leaves + pos,
@ -187,6 +188,7 @@ FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4)
free (leaf); free (leaf);
return 0; return 0;
} }
FcMemAlloc (FC_MEM_CHARLEAF, sizeof (FcCharLeaf));
return leaf; return leaf;
} }
@ -198,7 +200,7 @@ FcCharSetInsertLeaf (FcCharSet *fcs, FcChar32 ucs4, FcCharLeaf *leaf)
pos = FcCharSetFindLeafPos (fcs, ucs4); pos = FcCharSetFindLeafPos (fcs, ucs4);
if (pos >= 0) if (pos >= 0)
{ {
FcMemAlloc (FC_MEM_CHARNODE, sizeof (FcCharLeaf)); FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf));
free (fcs->leaves[pos]); free (fcs->leaves[pos]);
fcs->leaves[pos] = leaf; fcs->leaves[pos] = leaf;
return FcTrue; return FcTrue;
@ -213,7 +215,7 @@ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4)
FcCharLeaf *leaf; FcCharLeaf *leaf;
FcChar32 *b; FcChar32 *b;
if (fcs->constant) if (fcs->ref == FC_REF_CONSTANT)
return FcFalse; return FcFalse;
leaf = FcCharSetFindLeafCreate (fcs, ucs4); leaf = FcCharSetFindLeafCreate (fcs, ucs4);
if (!leaf) if (!leaf)
@ -307,7 +309,8 @@ FcCharSetIterStart (const FcCharSet *fcs, FcCharSetIter *iter)
FcCharSet * FcCharSet *
FcCharSetCopy (FcCharSet *src) FcCharSetCopy (FcCharSet *src)
{ {
src->ref++; if (src->ref != FC_REF_CONSTANT)
src->ref++;
return src; return src;
} }
@ -835,6 +838,7 @@ FcCharLeafEntCreate (void)
block = malloc (FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt)); block = malloc (FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt));
if (!block) if (!block)
return 0; return 0;
FcMemAlloc (FC_MEM_CHARLEAF, FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt));
remain = FC_CHAR_LEAF_BLOCK; remain = FC_CHAR_LEAF_BLOCK;
} }
remain--; remain--;
@ -921,6 +925,7 @@ FcCharSetFreezeBase (FcCharSet *fcs)
FcChar32 hash = FcCharSetHash (fcs); FcChar32 hash = FcCharSetHash (fcs);
FcCharSetEnt **bucket = &hashTable[hash % FC_CHAR_SET_HASH_SIZE]; FcCharSetEnt **bucket = &hashTable[hash % FC_CHAR_SET_HASH_SIZE];
FcCharSetEnt *ent; FcCharSetEnt *ent;
int size;
FcCharSetTotal++; FcCharSetTotal++;
FcCharSetTotalEnts += fcs->num; FcCharSetTotalEnts += fcs->num;
@ -937,16 +942,17 @@ FcCharSetFreezeBase (FcCharSet *fcs)
} }
} }
ent = malloc (sizeof (FcCharSetEnt) + size = (sizeof (FcCharSetEnt) +
fcs->num * sizeof (FcCharLeaf *) + fcs->num * sizeof (FcCharLeaf *) +
fcs->num * sizeof (FcChar16)); fcs->num * sizeof (FcChar16));
ent = malloc (size);
if (!ent) if (!ent)
return 0; return 0;
FcMemAlloc (FC_MEM_CHARSET, size);
FcCharSetUsed++; FcCharSetUsed++;
FcCharSetUsedEnts += fcs->num; FcCharSetUsedEnts += fcs->num;
ent->set.ref = 0; ent->set.ref = FC_REF_CONSTANT;
ent->set.constant = FcTrue;
ent->set.num = fcs->num; ent->set.num = fcs->num;
if (fcs->num) if (fcs->num)
{ {
@ -989,9 +995,16 @@ FcCharSetFreeze (FcCharSet *fcs)
n = FcCharSetFreezeBase (b); n = FcCharSetFreezeBase (b);
bail1: bail1:
if (b->leaves) if (b->leaves)
{
FcMemFree (FC_MEM_CHARSET, b->num * sizeof (FcCharLeaf *));
free (b->leaves); free (b->leaves);
}
if (b->numbers) if (b->numbers)
{
FcMemFree (FC_MEM_CHARSET, b->num * sizeof (FcChar16));
free (b->numbers); free (b->numbers);
}
FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
free (b); free (b);
bail0: bail0:
return n; return n;
@ -1056,9 +1069,16 @@ FcNameParseCharSet (FcChar8 *string)
n = FcCharSetFreezeBase (c); n = FcCharSetFreezeBase (c);
bail1: bail1:
if (c->leaves) if (c->leaves)
{
FcMemFree (FC_MEM_CHARSET, c->num * sizeof (FcCharLeaf *));
free (c->leaves); free (c->leaves);
}
if (c->numbers) if (c->numbers)
{
FcMemFree (FC_MEM_CHARSET, c->num * sizeof (FcChar16));
free (c->numbers); free (c->numbers);
}
FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
free (c); free (c);
bail0: bail0:
return n; return n;

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.7 2002/08/11 18:10:42 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.8 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -51,6 +51,9 @@ FcValuePrint (const FcValue v)
case FcTypeCharSet: /* XXX */ case FcTypeCharSet: /* XXX */
printf (" set"); printf (" set");
break; break;
case FcTypeLangSet:
printf (" langset");
break;
case FcTypeFTFace: case FcTypeFTFace:
printf (" face"); printf (" face");
break; break;

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcfreetype.c,v 1.8 2002/07/09 02:28:29 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcfreetype.c,v 1.9 2002/07/13 05:43:25 keithp Exp $
* *
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -123,6 +123,7 @@ FcFreeTypeQuery (const FcChar8 *file,
int weight; int weight;
int i; int i;
FcCharSet *cs; FcCharSet *cs;
FcLangSet *ls;
FT_Library ftLibrary; FT_Library ftLibrary;
FcChar8 *family; FcChar8 *family;
FcChar8 *style; FcChar8 *style;
@ -526,8 +527,12 @@ FcFreeTypeQuery (const FcChar8 *file,
if (!FcPatternAddCharSet (pat, FC_CHARSET, cs)) if (!FcPatternAddCharSet (pat, FC_CHARSET, cs))
goto bail2; goto bail2;
if (!FcFreeTypeSetLang (pat, cs, exclusiveLang)) ls = FcFreeTypeLangSet (cs, exclusiveLang);
goto bail2; if (!ls)
goto bail2;
if (!FcPatternAddLangSet (pat, FC_LANG, ls))
goto bail2;
/* /*
* Drop our reference to the charset * Drop our reference to the charset

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.5 2002/05/21 17:48:15 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.6 2002/05/23 23:00:46 keithp Exp $
* *
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -102,6 +102,8 @@ FcInit (void)
if (!config) if (!config)
return FcTrue; return FcTrue;
FcConfigSetCurrent (config); FcConfigSetCurrent (config);
if (FcDebug() & FC_DBG_MEMORY)
FcMemReport ();
return FcTrue; return FcTrue;
} }
@ -153,7 +155,7 @@ static struct {
int free_mem; int free_mem;
} FcInUse[FC_MEM_NUM] = { } FcInUse[FC_MEM_NUM] = {
{ "charset", 0, 0 }, { "charset", 0, 0 },
{ "charnode", 0 ,0 }, { "charleaf", 0 ,0 },
{ "fontset", 0, 0 }, { "fontset", 0, 0 },
{ "fontptr", 0, 0 }, { "fontptr", 0, 0 },
{ "objectset", 0, 0 }, { "objectset", 0, 0 },
@ -165,6 +167,10 @@ static struct {
{ "substate", 0, 0 }, { "substate", 0, 0 },
{ "string", 0, 0 }, { "string", 0, 0 },
{ "listbuck", 0, 0 }, { "listbuck", 0, 0 },
{ "strset", 0, 0 },
{ "strlist", 0, 0 },
{ "config", 0, 0 },
{ "langset", 0, 0 },
}; };
static int FcAllocCount, FcAllocMem; static int FcAllocCount, FcAllocMem;
@ -174,6 +180,9 @@ static int FcMemNotice = 1*1024*1024;
static int FcAllocNotify, FcFreeNotify; static int FcAllocNotify, FcFreeNotify;
void
FcValueListReport (void);
void void
FcMemReport (void) FcMemReport (void)
{ {
@ -196,6 +205,7 @@ FcMemReport (void)
FcAllocMem - FcFreeMem); FcAllocMem - FcFreeMem);
FcAllocNotify = 0; FcAllocNotify = 0;
FcFreeNotify = 0; FcFreeNotify = 0;
FcValueListReport ();
} }
void void

View File

@ -65,7 +65,7 @@ typedef struct _FcSymbolic {
#define FC_DBG_MEMORY 512 #define FC_DBG_MEMORY 512
#define FC_MEM_CHARSET 0 #define FC_MEM_CHARSET 0
#define FC_MEM_CHARNODE 1 #define FC_MEM_CHARLEAF 1
#define FC_MEM_FONTSET 2 #define FC_MEM_FONTSET 2
#define FC_MEM_FONTPTR 3 #define FC_MEM_FONTPTR 3
#define FC_MEM_OBJECTSET 4 #define FC_MEM_OBJECTSET 4
@ -77,10 +77,12 @@ typedef struct _FcSymbolic {
#define FC_MEM_SUBSTATE 10 #define FC_MEM_SUBSTATE 10
#define FC_MEM_STRING 11 #define FC_MEM_STRING 11
#define FC_MEM_LISTBUCK 12 #define FC_MEM_LISTBUCK 12
#define FC_MEM_NUM 13 #define FC_MEM_STRSET 13
#define FC_MEM_STRSET 14 #define FC_MEM_STRLIST 14
#define FC_MEM_STRLIST 15 #define FC_MEM_CONFIG 15
#define FC_MEM_CONFIG 16 #define FC_MEM_LANGSET 16
#define FC_MEM_NUM 17
typedef enum _FcValueBinding { typedef enum _FcValueBinding {
FcValueBindingWeak, FcValueBindingStrong FcValueBindingWeak, FcValueBindingStrong
@ -97,6 +99,7 @@ typedef struct _FcPatternElt {
FcValueList *values; FcValueList *values;
} FcPatternElt; } FcPatternElt;
struct _FcPattern { struct _FcPattern {
int num; int num;
int size; int size;
@ -167,13 +170,10 @@ typedef struct _FcCharLeaf {
FcChar32 map[256/32]; FcChar32 map[256/32];
} FcCharLeaf; } FcCharLeaf;
typedef enum _FcLangResult { #define FC_REF_CONSTANT -1
FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang
} FcLangResult;
struct _FcCharSet { struct _FcCharSet {
int ref; /* reference count */ int ref; /* reference count */
FcBool constant; /* in hash table constant */
int num; /* size of leaves and numbers arrays */ int num; /* size of leaves and numbers arrays */
FcCharLeaf **leaves; FcCharLeaf **leaves;
FcChar16 *numbers; FcChar16 *numbers;
@ -537,9 +537,8 @@ void
FcMemFree (int kind, int size); FcMemFree (int kind, int size);
/* fclang.c */ /* fclang.c */
FcBool FcLangSet *
FcFreeTypeSetLang (FcPattern *pattern, FcFreeTypeLangSet (const FcCharSet *charset,
FcCharSet *charset,
const FcChar8 *exclusiveLang); const FcChar8 *exclusiveLang);
FcLangResult FcLangResult
@ -548,6 +547,15 @@ FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
const FcCharSet * const FcCharSet *
FcCharSetForLang (const FcChar8 *lang); FcCharSetForLang (const FcChar8 *lang);
FcLangSet *
FcLangSetPromote (const FcChar8 *lang);
FcLangSet *
FcNameParseLangSet (const FcChar8 *string);
FcBool
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
/* fclist.c */ /* fclist.c */
/* fcmatch.c */ /* fcmatch.c */
@ -574,6 +582,9 @@ FcPatternAddWithBinding (FcPattern *p,
FcValueBinding binding, FcValueBinding binding,
FcBool append); FcBool append);
FcPattern *
FcPatternFreeze (FcPattern *p);
/* fcrender.c */ /* fcrender.c */
/* fcmatrix.c */ /* fcmatrix.c */

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.3 2002/07/08 07:31:53 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.4 2002/07/12 21:06:03 keithp Exp $
* *
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -31,20 +31,32 @@ typedef struct {
#include "../fc-lang/fclang.h" #include "../fc-lang/fclang.h"
#define NUM_LANG_CHAR_SET (sizeof (fcLangCharSets) / sizeof (fcLangCharSets[0])) #define NUM_LANG_CHAR_SET (sizeof (fcLangCharSets) / sizeof (fcLangCharSets[0]))
#define NUM_LANG_SET_MAP ((NUM_LANG_CHAR_SET + 31) / 32)
FcBool struct _FcLangSet {
FcFreeTypeSetLang (FcPattern *pattern, FcChar32 map[NUM_LANG_SET_MAP];
FcCharSet *charset, FcStrSet *extra;
};
#define FcLangSetBitSet(ls, id) ((ls)->map[(id)>>5] |= ((FcChar32) 1 << ((id) & 0x1f)))
#define FcLangSetBitGet(ls, id) (((ls)->map[(id)>>5] >> ((id) & 0x1f)) & 1)
FcLangSet *
FcFreeTypeLangSet (const FcCharSet *charset,
const FcChar8 *exclusiveLang) const FcChar8 *exclusiveLang)
{ {
int i; int i;
FcChar32 missing; FcChar32 missing;
FcBool hasLang = FcFalse;
const FcCharSet *exclusiveCharset = 0; const FcCharSet *exclusiveCharset = 0;
FcLangSet *ls;
if (exclusiveLang) if (exclusiveLang)
exclusiveCharset = FcCharSetForLang (exclusiveLang); exclusiveCharset = FcCharSetForLang (exclusiveLang);
ls = FcLangSetCreate ();
if (!ls)
return 0;
for (i = 0; i < NUM_LANG_CHAR_SET; i++) for (i = 0; i < NUM_LANG_CHAR_SET; i++)
{ {
/* /*
@ -91,76 +103,42 @@ FcFreeTypeSetLang (FcPattern *pattern,
printf ("%s(%d) ", fcLangCharSets[i].lang, missing); printf ("%s(%d) ", fcLangCharSets[i].lang, missing);
} }
if (!missing) if (!missing)
{ FcLangSetBitSet (ls, i);
if (!FcPatternAddString (pattern, FC_LANG, fcLangCharSets[i].lang))
return FcFalse;
hasLang = FcTrue;
}
} }
/*
* Make sure it has a lang entry
*/
if (!hasLang)
if (!FcPatternAddString (pattern, FC_LANG, (FcChar8 *) "x-unknown"))
return FcFalse;
if (FcDebug() & FC_DBG_SCANV) if (FcDebug() & FC_DBG_SCANV)
printf ("\n"); printf ("\n");
return FcTrue;
return ls;
} }
#define FcLangEnd(c) ((c) == '-' || (c) == '\0')
FcLangResult FcLangResult
FcLangCompare (const FcChar8 *s1, const FcChar8 *s2) FcLangCompare (const FcChar8 *s1, const FcChar8 *s2)
{ {
const FcChar8 *orig_s1 = s1;
FcChar8 c1, c2; FcChar8 c1, c2;
FcLangResult result; FcLangResult result = FcLangDifferentLang;
/*
* Compare ISO 639 language codes
*/
for (;;)
{
c1 = *s1++;
c2 = *s2++;
if (c1 == '\0' || c1 == '-')
break;
if (c2 == '\0' || c2 == '-')
break;
c1 = FcToLower (c1);
c2 = FcToLower (c2);
if (c1 != c2)
return FcLangDifferentLang; /* mismatching lang code */
}
if (!c1 && !c2)
return FcLangEqual;
/*
* Make x-* mismatch as if the lang part didn't match
*/
result = FcLangDifferentCountry;
if (orig_s1[0] == 'x' && (orig_s1[1] == '\0' || orig_s1[1] == '-'))
result = FcLangDifferentLang;
if (c1 == '\0' || c2 == '\0')
return result;
/*
* Compare ISO 3166 country codes
*/
for (;;) for (;;)
{ {
c1 = *s1++; c1 = *s1++;
c2 = *s2++; c2 = *s2++;
if (!c1 || !c2)
break;
c1 = FcToLower (c1); c1 = FcToLower (c1);
c2 = FcToLower (c2); c2 = FcToLower (c2);
if (c1 != c2) if (c1 != c2)
break; {
if (FcLangEnd (c1) && FcLangEnd (c2))
result = FcLangDifferentCountry;
return result;
}
else if (!c1)
return FcLangEqual;
else if (c1 == '-')
result = FcLangDifferentCountry;
} }
if (c1 == c2)
return FcLangEqual;
else
return result;
} }
const FcCharSet * const FcCharSet *
@ -184,3 +162,340 @@ FcCharSetForLang (const FcChar8 *lang)
return 0; return 0;
return &fcLangCharSets[i].charset; return &fcLangCharSets[i].charset;
} }
FcLangSet *
FcLangSetCreate (void)
{
FcLangSet *ls;
ls = malloc (sizeof (FcLangSet));
if (!ls)
return 0;
FcMemAlloc (FC_MEM_LANGSET, sizeof (FcLangSet));
memset (ls->map, '\0', sizeof (ls->map));
ls->extra = 0;
return ls;
}
void
FcLangSetDestroy (FcLangSet *ls)
{
if (ls->extra)
FcStrSetDestroy (ls->extra);
FcMemFree (FC_MEM_LANGSET, sizeof (FcLangSet));
free (ls);
}
FcLangSet *
FcLangSetCopy (const FcLangSet *ls)
{
FcLangSet *new;
new = FcLangSetCreate ();
if (!new)
goto bail0;
memcpy (new->map, ls->map, sizeof (new->map));
if (ls->extra)
{
FcStrList *list;
FcChar8 *extra;
new->extra = FcStrSetCreate ();
if (!new->extra)
goto bail1;
list = FcStrListCreate (ls->extra);
if (!list)
goto bail1;
while ((extra = FcStrListNext (list)))
if (!FcStrSetAdd (new->extra, extra))
{
FcStrListDone (list);
goto bail1;
}
FcStrListDone (list);
}
return new;
bail1:
FcLangSetDestroy (new);
bail0:
return 0;
}
static int
FcLangSetIndex (const FcChar8 *lang)
{
int low, high, mid;
int cmp;
low = 0;
high = NUM_LANG_CHAR_SET - 1;
while (low <= high)
{
mid = (high + low) >> 1;
cmp = FcStrCmpIgnoreCase (fcLangCharSets[mid].lang, lang);
if (cmp == 0)
return mid;
if (cmp < 0)
low = mid + 1;
else
high = mid - 1;
}
if (cmp < 0)
mid++;
return -(mid + 1);
}
FcBool
FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang)
{
int id;
id = FcLangSetIndex (lang);
if (id >= 0)
{
FcLangSetBitSet (ls, id);
return FcTrue;
}
if (!ls->extra)
{
ls->extra = FcStrSetCreate ();
if (!ls->extra)
return FcFalse;
}
return FcStrSetAdd (ls->extra, lang);
}
FcLangResult
FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang)
{
int id;
FcLangResult best, r;
int i;
id = FcLangSetIndex (lang);
if (id >= 0)
return FcLangEqual;
id = -id - 1;
best = FcLangDifferentLang;
for (i = id - 1; i >= 0; i--)
{
r = FcLangCompare (lang, fcLangCharSets[i].lang);
if (r == FcLangDifferentLang)
break;
if (FcLangSetBitGet (ls, i) && r < best)
best = r;
}
for (i = id; i < NUM_LANG_CHAR_SET; i++)
{
r = FcLangCompare (lang, fcLangCharSets[i].lang);
if (r == FcLangDifferentLang)
break;
if (FcLangSetBitGet (ls, i) && r < best)
best = r;
}
if (ls->extra)
{
FcStrList *list = FcStrListCreate (ls->extra);
FcChar8 *extra;
FcLangResult r;
if (list)
{
while (best > FcLangEqual && (extra = FcStrListNext (list)))
{
r = FcLangCompare (lang, extra);
if (r < best)
best = r;
}
FcStrListDone (list);
}
}
return best;
}
static FcLangResult
FcLangSetCompareStrSet (const FcLangSet *ls, FcStrSet *set)
{
FcStrList *list = FcStrListCreate (set);
FcLangResult r, best = FcLangDifferentLang;
FcChar8 *extra;
if (list)
{
while (best > FcLangEqual && (extra = FcStrListNext (list)))
{
r = FcLangSetHasLang (ls, extra);
if (r < best)
best = r;
}
FcStrListDone (list);
}
return best;
}
FcLangResult
FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb)
{
int i;
FcLangResult best, r;
for (i = 0; i < NUM_LANG_SET_MAP; i++)
if (lsa->map[i] & lsb->map[i])
return FcLangEqual;
best = FcLangDifferentLang;
if (lsa->extra)
{
r = FcLangSetCompareStrSet (lsb, lsa->extra);
if (r < best)
best = r;
}
if (best > FcLangEqual && lsb->extra)
{
r = FcLangSetCompareStrSet (lsa, lsb->extra);
if (r < best)
best = r;
}
return best;
}
/*
* Used in computing values -- mustn't allocate any storage
*/
FcLangSet *
FcLangSetPromote (const FcChar8 *lang)
{
static FcLangSet ls;
static FcStrSet strs;
static FcChar8 *str;
int id;
memset (ls.map, '\0', sizeof (ls.map));
ls.extra = 0;
id = FcLangSetIndex (lang);
if (id > 0)
{
FcLangSetBitSet (&ls, id);
}
else
{
ls.extra = &strs;
strs.num = 1;
strs.size = 1;
strs.strs = &str;
str = (FcChar8 *) lang;
}
return &ls;
}
FcChar32
FcLangSetHash (const FcLangSet *ls)
{
FcChar32 h = 0;
int i;
for (i = 0; i < NUM_LANG_SET_MAP; i++)
h ^= ls->map[i];
if (ls->extra)
h ^= ls->extra->num;
return h;
}
FcLangSet *
FcNameParseLangSet (const FcChar8 *string)
{
FcChar8 lang[32];
const FcChar8 *end, *next;
FcLangSet *ls;
ls = FcLangSetCreate ();
if (!ls)
goto bail0;
while (string && *string)
{
end = (FcChar8 *) strchr ((char *) string, '|');
if (!end)
{
end = string + strlen ((char *) string);
next = end;
}
else
next = end + 1;
if (end - string < sizeof (lang) - 1)
{
strncpy ((char *) lang, (char *) string, end - string);
lang[end-string] = '\0';
if (!FcLangSetAdd (ls, lang))
goto bail1;
}
string = next;
}
return ls;
bail1:
FcLangSetDestroy (ls);
bail0:
return 0;
}
FcBool
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls)
{
int i, bit;
FcChar32 bits;
FcBool first = FcTrue;
for (i = 0; i < NUM_LANG_SET_MAP; i++)
{
if ((bits = ls->map[i]))
{
for (bit = 0; bit <= 31; bit++)
if (bits & (1 << bit))
{
int id = (i << 5) | bit;
if (!first)
if (!FcStrBufChar (buf, '|'))
return FcFalse;
if (!FcStrBufString (buf, fcLangCharSets[id].lang))
return FcFalse;
first = FcFalse;
}
}
}
if (ls->extra)
{
FcStrList *list = FcStrListCreate (ls->extra);
FcChar8 *extra;
if (!list)
return FcFalse;
while ((extra = FcStrListNext (list)))
{
if (!first)
if (!FcStrBufChar (buf, '|'))
return FcFalse;
if (!FcStrBufString (buf, extra));
return FcFalse;
first = FcFalse;
}
}
return FcTrue;
}
FcBool
FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb)
{
int i;
for (i = 0; i < NUM_LANG_SET_MAP; i++)
{
if (lsa->map[i] != lsb->map[i])
return FcFalse;
}
if (!lsa->extra && !lsb->extra)
return FcTrue;
if (lsa->extra && lsb->extra)
return FcStrSetEqual (lsa->extra, lsb->extra);
return FcFalse;
}

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.8 2002/08/11 18:10:42 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.9 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -247,6 +247,8 @@ FcListValueHash (FcValue v)
return FcCharSetCount (v.u.c); return FcCharSetCount (v.u.c);
case FcTypeFTFace: case FcTypeFTFace:
return (FcChar32) v.u.f; return (FcChar32) v.u.f;
case FcTypeLangSet:
return FcLangSetHash (v.u.l);
} }
return 0; return 0;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.17 2002/08/11 18:10:42 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.18 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -61,9 +61,34 @@ FcCompareLang (char *object, FcValue value1, FcValue value2)
{ {
FcLangResult result; FcLangResult result;
if (value2.type != FcTypeString || value1.type != FcTypeString) switch (value1.type) {
case FcTypeLangSet:
switch (value2.type) {
case FcTypeLangSet:
result = FcLangSetCompare (value1.u.l, value2.u.l);
break;
case FcTypeString:
result = FcLangSetHasLang (value1.u.l, value2.u.s);
break;
default:
return -1.0;
}
break;
case FcTypeString:
switch (value2.type) {
case FcTypeLangSet:
result = FcLangSetHasLang (value2.u.l, value1.u.s);
break;
case FcTypeString:
result = FcLangCompare (value1.u.s, value2.u.s);
break;
default:
return -1.0;
}
break;
default:
return -1.0; return -1.0;
result = FcLangCompare (value1.u.s, value2.u.s); }
switch (result) { switch (result) {
case FcLangEqual: case FcLangEqual:
return 0; return 0;

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.11 2002/08/11 18:10:42 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.12 2002/08/19 19:32:05 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -59,7 +59,7 @@ static const FcObjectType _FcBaseObjectTypes[] = {
{ FC_CHAR_HEIGHT, FcTypeInteger }, { FC_CHAR_HEIGHT, FcTypeInteger },
{ FC_MATRIX, FcTypeMatrix }, { FC_MATRIX, FcTypeMatrix },
{ FC_CHARSET, FcTypeCharSet }, { FC_CHARSET, FcTypeCharSet },
{ FC_LANG, FcTypeString }, { FC_LANG, FcTypeLangSet },
}; };
#define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0]) #define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])
@ -300,6 +300,9 @@ FcNameConvert (FcType type, FcChar8 *string, FcMatrix *m)
case FcTypeCharSet: case FcTypeCharSet:
v.u.c = FcNameParseCharSet (string); v.u.c = FcNameParseCharSet (string);
break; break;
case FcTypeLangSet:
v.u.l = FcNameParseLangSet (string);
break;
default: default:
break; break;
} }
@ -393,12 +396,28 @@ FcNameParse (const FcChar8 *name)
v = FcNameConvert (t->type, save, &m); v = FcNameConvert (t->type, save, &m);
if (!FcPatternAdd (pat, t->object, v, FcTrue)) if (!FcPatternAdd (pat, t->object, v, FcTrue))
{ {
if (v.type == FcTypeCharSet) switch (v.type) {
case FcTypeCharSet:
FcCharSetDestroy ((FcCharSet *) v.u.c); FcCharSetDestroy ((FcCharSet *) v.u.c);
break;
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) v.u.l);
break;
default:
break;
}
goto bail2; goto bail2;
} }
if (v.type == FcTypeCharSet) switch (v.type) {
case FcTypeCharSet:
FcCharSetDestroy ((FcCharSet *) v.u.c); FcCharSetDestroy ((FcCharSet *) v.u.c);
break;
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) v.u.l);
break;
default:
break;
}
} }
if (delim != ',') if (delim != ',')
break; break;
@ -470,6 +489,8 @@ FcNameUnparseValue (FcStrBuf *buf,
return FcNameUnparseString (buf, temp, 0); return FcNameUnparseString (buf, temp, 0);
case FcTypeCharSet: case FcTypeCharSet:
return FcNameUnparseCharSet (buf, v.u.c); return FcNameUnparseCharSet (buf, v.u.c);
case FcTypeLangSet:
return FcNameUnparseLangSet (buf, v.u.l);
case FcTypeFTFace: case FcTypeFTFace:
return FcTrue; return FcTrue;
} }

View File

@ -24,6 +24,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <assert.h>
#include "fcint.h" #include "fcint.h"
FcPattern * FcPattern *
@ -55,6 +56,9 @@ FcValueDestroy (FcValue v)
case FcTypeCharSet: case FcTypeCharSet:
FcCharSetDestroy ((FcCharSet *) v.u.c); FcCharSetDestroy ((FcCharSet *) v.u.c);
break; break;
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) v.u.l);
break;
default: default:
break; break;
} }
@ -79,6 +83,11 @@ FcValueSave (FcValue v)
if (!v.u.c) if (!v.u.c)
v.type = FcTypeVoid; v.type = FcTypeVoid;
break; break;
case FcTypeLangSet:
v.u.l = FcLangSetCopy (v.u.l);
if (!v.u.l)
v.type = FcTypeVoid;
break;
default: default:
break; break;
} }
@ -101,6 +110,9 @@ FcValueListDestroy (FcValueList *l)
case FcTypeCharSet: case FcTypeCharSet:
FcCharSetDestroy ((FcCharSet *) l->value.u.c); FcCharSetDestroy ((FcCharSet *) l->value.u.c);
break; break;
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) l->value.u.l);
break;
default: default:
break; break;
} }
@ -145,6 +157,8 @@ FcValueEqual (FcValue va, FcValue vb)
return FcCharSetEqual (va.u.c, vb.u.c); return FcCharSetEqual (va.u.c, vb.u.c);
case FcTypeFTFace: case FcTypeFTFace:
return va.u.f == vb.u.f; return va.u.f == vb.u.f;
case FcTypeLangSet:
return FcLangSetEqual (va.u.l, vb.u.l);
} }
return FcFalse; return FcFalse;
} }
@ -195,6 +209,8 @@ FcValueHash (FcValue v)
case FcTypeFTFace: case FcTypeFTFace:
return FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->family_name) ^ return FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->family_name) ^
FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->style_name); FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->style_name);
case FcTypeLangSet:
return FcLangSetHash (v.u.l);
} }
return FcFalse; return FcFalse;
} }
@ -202,6 +218,9 @@ FcValueHash (FcValue v)
static FcBool static FcBool
FcValueListEqual (FcValueList *la, FcValueList *lb) FcValueListEqual (FcValueList *la, FcValueList *lb)
{ {
if (la == lb)
return FcTrue;
while (la && lb) while (la && lb)
{ {
if (!FcValueEqual (la->value, lb->value)) if (!FcValueEqual (la->value, lb->value))
@ -232,7 +251,7 @@ FcPatternDestroy (FcPattern *p)
{ {
int i; int i;
if (--p->ref > 0) if (p->ref == FC_REF_CONSTANT || --p->ref > 0)
return; return;
for (i = 0; i < p->num; i++) for (i = 0; i < p->num; i++)
@ -250,6 +269,252 @@ FcPatternDestroy (FcPattern *p)
free (p); free (p);
} }
#define FC_VALUE_LIST_HASH_SIZE 257
#define FC_PATTERN_HASH_SIZE 67
typedef struct _FcValueListEnt FcValueListEnt;
struct _FcValueListEnt {
FcValueListEnt *next;
FcChar32 hash;
FcValueList *list;
};
static int FcValueListFrozenCount[FcTypeLangSet + 1];
static int FcValueListFrozenBytes[FcTypeLangSet + 1];
static char *FcValueListFrozenName[] = {
"Void",
"Integer",
"Double",
"String",
"Bool",
"Matrix",
"CharSet",
"FTFace",
"LangSet"
};
void
FcValueListReport (void);
void
FcValueListReport (void)
{
FcType t;
printf ("Fc Frozen Values:\n");
printf ("\t%8s %9s %9s\n", "Type", "Count", "Bytes");
for (t = FcTypeVoid; t <= FcTypeLangSet; t++)
printf ("\t%8s %9d %9d\n", FcValueListFrozenName[t],
FcValueListFrozenCount[t], FcValueListFrozenBytes[t]);
}
static FcValueListEnt *
FcValueListEntCreate (FcValueList *h)
{
FcValueListEnt *e;
FcValueList *l, *new;
int n;
int string_size = 0;
FcChar8 *strs;
int size;
n = 0;
for (l = h; l; l = l->next)
{
if (l->value.type == FcTypeString)
string_size += strlen ((char *) l->value.u.s) + 1;
n++;
}
size = sizeof (FcValueListEnt) + n * sizeof (FcValueList) + string_size;
FcValueListFrozenCount[h->value.type]++;
FcValueListFrozenBytes[h->value.type] += size;
e = malloc (size);
if (!e)
return 0;
FcMemAlloc (FC_MEM_VALLIST, size);
e->list = (FcValueList *) (e + 1);
strs = (FcChar8 *) (e->list + n);
new = e->list;
for (l = h; l; l = l->next)
{
if (l->value.type == FcTypeString)
{
new->value.type = FcTypeString;
new->value.u.s = strs;
strcpy ((char *) strs, (char *) l->value.u.s);
strs += strlen ((char *) strs) + 1;
}
else
new->value = FcValueSave (l->value);
new->binding = l->binding;
if (l->next)
new->next = new + 1;
else
new->next = 0;
}
return e;
}
static int FcValueListTotal;
static int FcValueListUsed;
static FcValueList *
FcValueListFreeze (FcValueList *l)
{
static FcValueListEnt *hashTable[FC_VALUE_LIST_HASH_SIZE];
FcChar32 hash = FcValueListHash (l);
FcValueListEnt **bucket = &hashTable[hash % FC_VALUE_LIST_HASH_SIZE];
FcValueListEnt *ent;
FcValueListTotal++;
for (ent = *bucket; ent; ent = ent->next)
{
if (ent->hash == hash && FcValueListEqual (ent->list, l))
return ent->list;
}
ent = FcValueListEntCreate (l);
if (!ent)
return 0;
FcValueListUsed++;
ent->hash = hash;
ent->next = *bucket;
*bucket = ent;
return ent->list;
}
static FcChar32
FcPatternBaseHash (FcPattern *b)
{
FcChar32 hash = b->num;
int i;
for (i = 0; i < b->num; i++)
hash = ((hash << 1) | (hash >> 31)) ^ ((FcChar32) b->elts[i].values);
return hash;
}
typedef struct _FcPatternEnt FcPatternEnt;
struct _FcPatternEnt {
FcPatternEnt *next;
FcChar32 hash;
FcPattern pattern;
};
static int FcPatternTotal;
static int FcPatternUsed;
static FcPattern *
FcPatternBaseFreeze (FcPattern *b)
{
static FcPatternEnt *hashTable[FC_VALUE_LIST_HASH_SIZE];
FcChar32 hash = FcPatternBaseHash (b);
FcPatternEnt **bucket = &hashTable[hash % FC_VALUE_LIST_HASH_SIZE];
FcPatternEnt *ent;
int i;
char *objects;
int size_objects;
int size;
FcPatternTotal++;
for (ent = *bucket; ent; ent = ent->next)
{
if (ent->hash == hash && b->num == ent->pattern.num)
{
for (i = 0; i < b->num; i++)
{
if (strcmp (b->elts[i].object, ent->pattern.elts[i].object))
break;
if (b->elts[i].values != ent->pattern.elts[i].values)
break;
}
if (i == b->num)
return &ent->pattern;
}
}
/*
* Compute size of pattern + elts + object names
*/
size_objects = 0;
for (i = 0; i < b->num; i++)
size_objects += strlen (b->elts[i].object) + 1;
size = sizeof (FcPatternEnt) + b->num*sizeof (FcPatternElt) + size_objects;
ent = malloc (size);
if (!ent)
return 0;
FcMemAlloc (FC_MEM_PATTERN, size);
FcPatternUsed++;
ent->pattern.elts = (FcPatternElt *) (ent + 1);
ent->pattern.num = b->num;
ent->pattern.size = b->num;
ent->pattern.ref = FC_REF_CONSTANT;
objects = (char *) (ent->pattern.elts + b->num);
for (i = 0; i < b->num; i++)
{
ent->pattern.elts[i].values = b->elts[i].values;
strcpy (objects, b->elts[i].object);
ent->pattern.elts[i].object = objects;
objects += strlen (objects) + 1;
}
ent->hash = hash;
ent->next = *bucket;
*bucket = ent;
return &ent->pattern;
}
FcPattern *
FcPatternFreeze (FcPattern *p)
{
FcPattern *b, *n = 0;
int size;
int i;
size = sizeof (FcPattern) + p->num * sizeof (FcPatternElt);
b = (FcPattern *) malloc (size);
if (!b)
return 0;
b->num = p->num;
b->size = b->num;
b->ref = 1;
b->elts = (FcPatternElt *) (b + 1);
/*
* Freeze object lists
*/
for (i = 0; i < p->num; i++)
{
b->elts[i].object = p->elts[i].object;
b->elts[i].values = FcValueListFreeze (p->elts[i].values);
if (!b->elts[i].values)
goto bail;
}
/*
* Freeze base
*/
n = FcPatternBaseFreeze (b);
#ifdef CHATTY
if (FcDebug() & FC_DBG_MEMORY)
{
printf ("ValueLists: total %9d used %9d\n", FcValueListTotal, FcValueListUsed);
printf ("Patterns: total %9d used %9d\n", FcPatternTotal, FcPatternUsed);
}
#endif
bail:
free (b);
#ifdef DEBUG
assert (FcPatternEqual (n, p));
#endif
return n;
}
static int static int
FcPatternPosition (const FcPattern *p, const char *object) FcPatternPosition (const FcPattern *p, const char *object)
{ {
@ -404,6 +669,9 @@ FcPatternAddWithBinding (FcPattern *p,
FcPatternElt *e; FcPatternElt *e;
FcValueList *new, **prev; FcValueList *new, **prev;
if (p->ref == FC_REF_CONSTANT)
goto bail0;
new = (FcValueList *) malloc (sizeof (FcValueList)); new = (FcValueList *) malloc (sizeof (FcValueList));
if (!new) if (!new)
goto bail0; goto bail0;
@ -446,6 +714,9 @@ bail2:
case FcTypeCharSet: case FcTypeCharSet:
FcCharSetDestroy ((FcCharSet *) value.u.c); FcCharSetDestroy ((FcCharSet *) value.u.c);
break; break;
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) value.u.l);
break;
default: default:
break; break;
} }
@ -563,6 +834,16 @@ FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f)
return FcPatternAdd (p, object, v, FcTrue); return FcPatternAdd (p, object, v, FcTrue);
} }
FcBool
FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls)
{
FcValue v;
v.type = FcTypeLangSet;
v.u.l = (FcLangSet *) ls;
return FcPatternAdd (p, object, v, FcTrue);
}
FcResult FcResult
FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v) FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v)
{ {
@ -704,6 +985,21 @@ FcPatternGetFTFace (FcPattern *p, const char *object, int id, FT_Face *f)
return FcResultMatch; return FcResultMatch;
} }
FcResult
FcPatternGetLangSet (FcPattern *p, const char *object, int id, FcLangSet **ls)
{
FcValue v;
FcResult r;
r = FcPatternGet (p, object, id, &v);
if (r != FcResultMatch)
return r;
if (v.type != FcTypeLangSet)
return FcResultTypeMismatch;
*ls = (FcLangSet *) v.u.l;
return FcResultMatch;
}
FcPattern * FcPattern *
FcPatternDuplicate (FcPattern *orig) FcPatternDuplicate (FcPattern *orig)
{ {
@ -733,7 +1029,8 @@ bail0:
void void
FcPatternReference (FcPattern *p) FcPatternReference (FcPattern *p)
{ {
p->ref++; if (p->ref != FC_REF_CONSTANT)
p->ref++;
} }
FcPattern * FcPattern *

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: xc/lib/fontconfig/src/fcstr.c,v 1.6 2002/07/06 23:47:44 keithp Exp $ * $XFree86: xc/lib/fontconfig/src/fcstr.c,v 1.7 2002/07/13 05:43:25 keithp Exp $
* *
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -526,6 +526,18 @@ FcStrSetMember (FcStrSet *set, const FcChar8 *s)
return FcFalse; return FcFalse;
} }
FcBool
FcStrSetEqual (FcStrSet *sa, FcStrSet *sb)
{
int i;
if (sa->num != sb->num)
return FcFalse;
for (i = 0; i < sa->num; i++)
if (!FcStrSetMember (sb, sa->strs[i]))
return FcFalse;
return FcTrue;
}
FcBool FcBool
FcStrSetAdd (FcStrSet *set, const FcChar8 *s) FcStrSetAdd (FcStrSet *set, const FcChar8 *s)
{ {