return (i < 4 ? 0 : tag);
}
-
-
int
main (int argc, char **argv)
{
- MFLTGlyphString gstring;
- MFLTGlyph g;
+ int c;
MFLT *flt;
M17N_INIT ();
- gstring.glyph_size = sizeof (MFLTGlyph);
- gstring.glyphs = &g;
- gstring.allocated = gstring.used = 1;
- gstring.script = otf_tag ("deva");
- gstring.langsys = 0;
-
- g.c = 0x915;
- flt = mflt_find (&gstring, 0, NULL, NULL);
+ c = 0x915;
+ flt = mflt_find (c, NULL);
if (! flt)
exit (1);
+ printf ("%s\n", mflt_name (flt));
M17N_FINI ();
exit (0);
}
{
int x_ppem, y_ppem;
void (*get_glyph_id) (void);
- void (*get_metric) (void);
+ void (*get_metrics) (void);
void (*suitable_p) (void);
void (*drive_otf) (void);
MFont *font;
};
void get_glyph_id (void) {}
-void get_metric (void) {}
+void get_metrics (void) {}
void suitable_p (void) {}
void drive_otf (void) {}
}
int
-get_metric (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
+get_metrics (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
{
FT_Face face = ((FontInfo *) font)->face;
g->c = in->glyphs[j].c;
break;
}
- g->code = otfg->glyph_id;
+ if (g->code != otfg->glyph_id)
+ {
+ g->code = otfg->glyph_id;
+ g->measured = 0;
+ }
out->used++;
}
}
out->glyphs[out->used++] = in->glyphs[from + i];
}
- font->get_metric (font, out, gidx, out->used);
-
if (gpos_features)
{
FT_Face face;
return to;
simple_copy:
- font->get_metric (font, in, from, to);
+ font->get_metrics (font, in, from, to);
for (i = 0; i < len; i++)
{
MFLTGlyph *g = in->glyphs + (from + i);
out->glyphs[out->used] = in->glyphs[hg->cluster];
g = out->glyphs + out->used++;
if (g->code != hg->gindex)
- g->c = 0, g->code = hg->gindex;
+ {
+ g->c = 0;
+ g->code = hg->gindex;
+ g->measured = 0;
+ }
adjustment[i].set = gpos_applied;
if (gpos_applied)
{
#define PANGO_SCALE_TO_26_6 (PANGO_SCALE / (1<<6))
int
-get_metric (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
+get_metrics (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
{
FontInfoPango *font_info = (FontInfoPango *) font;
int i;
out->glyphs[out->used] = in->glyphs[glyphs->log_clusters[i]];
g = out->glyphs + out->used++;
if (g->code != glyph_info->glyph)
- g->c = 0, g->code = glyph_info->glyph;
+ {
+ g->c = 0;
+ g->code = glyph_info->glyph;
+ g->measured = 0;
+ }
g->xoff = glyph_info->geometry.x_offset / PANGO_SCALE_TO_26_6;
g->yoff = glyph_info->geometry.y_offset / PANGO_SCALE_TO_26_6;
g->xadv = glyph_info->geometry.width / PANGO_SCALE_TO_26_6;
exit (1);
}
font->get_glyph_id = get_glyph_id;
- font->get_metric = get_metric;
+ font->get_metrics = get_metrics;
font->drive_otf = drive_otf;
mt = mconv_decode_stream (msymbol ("utf-8"), stdin);