if (ctx->out->used > 0)
{
int *g_indices;
- int x_ppem = ctx->font->x_ppem, y_ppem = ctx->font->y_ppem;
+ int x_ppem = ctx->font->x_ppem << 6, y_ppem = ctx->font->y_ppem << 6;
/* Remove separator glyphs. */
for (i = 0; i < ctx->out->used;)
return code;
}
+static void
+setup_combining_coverage (int from, int to, void *val, void *arg)
+{
+ int combining_class = (int) val;
+ int category = 0;
+
+ if (combining_class < 200)
+ category = 'a';
+ else if (combining_class <= 204)
+ {
+ if ((combining_class % 2) == 0)
+ category = "bcd"[(combining_class - 200) / 2];
+ }
+ else if (combining_class <= 232)
+ {
+ if ((combining_class % 2) == 0)
+ category = "efghijklmnopq"[(combining_class - 208) / 2];
+ }
+ else if (combining_class == 233)
+ category = 'r';
+ else if (combining_class == 234)
+ category = 's';
+ else if (combining_class == 240)
+ category = 't';
+ mchartable_set_range ((MCharTable *) arg, from, to, (void *) category);
+}
+
+static void
+setup_combining_flt (MFLT *flt)
+{
+ MSymbol type;
+ MCharTable *combininig_class_table
+ = mchar_get_prop_table (Mcombining_class, &type);
+
+ mchartable_set_range (flt->coverage, 0, 0x10FFFF, (void *) 'u');
+ if (combininig_class_table)
+ mchartable_map (combininig_class_table, (void *) 0,
+ setup_combining_coverage, flt->coverage);
+}
+
#define CHECK_FLT_STAGES(flt) ((flt)->stages || load_flt (flt, NULL) == 0)
\f
if (! flt_list && list_flt () < 0)
return NULL;
flt = mplist_get (flt_list, name);
- if (flt && ! CHECK_FLT_STAGES (flt))
+ if (! flt || ! CHECK_FLT_STAGES (flt))
return NULL;
+ if (flt->name == Mt
+ && ! mchartable_lookup (flt->coverage, 0))
+ setup_combining_flt (flt);
+
return flt;
}
if (MDEBUG_FLAG ())
{
+ if (font->family)
+ MDEBUG_PRINT1 (" (%s)", MSYMBOL_NAME (font->family));
MDEBUG_PRINT ("\n [FLT] (SOURCE");
for (i = this_from, j = 0; i < this_to; i++, j++)
{