font->type = MFONT_TYPE_FAILURE;
return NULL;
}
- MDEBUG_PRINT1 (" [XFONT] o %s\n", name);
- free (name);
M17N_OBJECT (x_rfont, close_xfont, MERROR_FONT_X);
x_rfont->display = display;
x_rfont->xfont = xfont;
MSTRUCT_CALLOC (rfont, MERROR_FONT_X);
+ rfont->id = msymbol (name);
rfont->spec = this;
rfont->spec.type = MFONT_TYPE_REALIZED;
rfont->spec.source = MFONT_SOURCE_X;
rfont->fontp = xfont;
rfont->next = MPLIST_VAL (frame->realized_font_list);
MPLIST_VAL (frame->realized_font_list) = rfont;
+ MDEBUG_PRINT1 (" [XFONT] o %s\n", name);
+ free (name);
return rfont;
}
MFLTGlyphString *in, int from, int to,
MFLTGlyphString *out,
MFLTGlyphAdjustment *adjustment);
+static int xft_iterate_otf_feature (struct _MFLTFont *font, MFLTOtfSpec *spec,
+ int from, int to, unsigned char *table);
+
static MFontDriver xft_driver =
{ NULL, xft_open,
xft_find_metric, xft_has_char, xft_encode_char, xft_render, NULL, NULL,
- xft_check_capability, NULL, NULL, xft_check_otf, xft_drive_otf
+ xft_check_capability, NULL, NULL, xft_check_otf, xft_drive_otf,
+#ifdef HAVE_OTF
+ xft_iterate_otf_feature
+#endif /* HAVE_OTF */
};
static void
rfont_xft->info = rfont->info;
M17N_OBJECT_REF (rfont->info);
MSTRUCT_CALLOC (rfont, MERROR_FONT_X);
+ rfont->id = font->file;
rfont->spec = *spec;
rfont->spec.size = size;
rfont->frame = frame;
g->g.descent = (extents.height - extents.y) << 6;
}
g->g.yadv = 0;
- g->g.measured = 0;
+ g->g.measured = 1;
}
}
glyphs = alloca (sizeof (FT_UInt) * (to - from));
for (last_x = x, nglyphs = 0, g = from; g < to; x += g++->g.xadv)
{
- if (g->g.xoff == 0 && g->g.yoff == 0 && !g->left_padding && !g->right_padding)
+ if (! g->g.adjusted && !g->left_padding && !g->right_padding)
glyphs[nglyphs++] = g->g.code;
else
{
return result;
}
+#ifdef HAVE_OTF
+
+static int
+xft_iterate_otf_feature (struct _MFLTFont *font, MFLTOtfSpec *spec,
+ int from, int to, unsigned char *table)
+{
+ MRealizedFont *rfont = ((MFLTFontForRealized *) font)->rfont;
+ MRealizedFontXft *rfont_xft = rfont->info;
+ int result;
+
+ rfont->info = rfont_xft->info;
+ result = mfont__ft_driver.iterate_otf_feature (font, spec, from, to, table);
+ rfont->info = rfont_xft;
+ return result;
+}
+#endif /* HAVE_OTF */
+
#endif /* HAVE_XFT2 */
\f
/*** @addtogroup m17nInputMethodWin */
/*** @{ */
-
+/*=*/
/***en
@brief Input method driver for XIM.
MInputDriver minput_xim_driver =
{ xim_open_im, xim_close_im, xim_create_ic, xim_destroy_ic,
xim_filter, xim_lookup, NULL };
-
+/*=*/
/*** @} */
-
+/*=*/
#else /* not HAVE_X11 */
int device_open () { return -1; }