noinst_PROGRAMS = \
linebreak replace mimdemo mimdaemon fifotest1 fifotest2 \
imtest findfont gdkdraw finddb imsim langname viewfile pangotest \
- flt-gui flt-otf flt-hb flt-pango
+ flt-gui flt-otf flt-hb flt-pango find-flt
mimdemo_LDADD = -lgd
mimdaemon_LDADD = -lgd
flt_pango_CFLAGS = ${baseCFLAGS} @M17NFLT_CFLAGS@ @PANGO_CFLAGS@ -DFLT_PANGO
flt_pango_LDFLAGS = ${baseLIBS} @M17NFLT_LIBS@ @PANGO_LIBS@
+find_flt_SOURCES = find-flt.c
+find_flt_CFLAGS = ${baseCFLAGS} @M17NFLT_CFLAGS@
+find_flt_LDFLAGS = ${baseLIBS} @M17NFLT_LIBS@
+
verify: linebreak
@echo "checking line breaking..."
@for arg in "" --sp-cm --korean-sp --ai-as-id; do \
FT_UShort req_feature, index;
FT_UInt *feature_list;
int i, j, k;
- HB_Error err;
if (gsubp)
{
return (g->code ? 0 : -1);
}
+#define PANGO_SCALE_TO_26_6 (PANGO_SCALE / (1<<6))
+
int
get_metric (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
{
pango_font_get_glyph_extents (PANGO_FONT (font_info->pango_font),
gstring->glyphs[i].code, &inc, &logical);
- g->lbearing = inc.x;
- g->rbearing = inc.x + inc.width;
- g->xadv = logical.width;
+ g->lbearing = inc.x / PANGO_SCALE_TO_26_6;
+ g->rbearing = (inc.x + inc.width) / PANGO_SCALE_TO_26_6;
+ g->xadv = logical.width / PANGO_SCALE_TO_26_6;
g->yadv = 0;
- g->ascent = - inc.y;
- g->descent = inc.height + inc.y;
+ g->ascent = - inc.y / PANGO_SCALE_TO_26_6;
+ g->descent = (inc.height + inc.y) / PANGO_SCALE_TO_26_6;
}
+ return 0;
}
#ifndef PANGO_OT_DEFAULT_LANGUAGE
guint req_feature, index;
guint *feature_list;
int i, j, k;
- int err;
FT_Face face;
PangoOTInfo *ot_info;
g = out->glyphs + out->used++;
if (g->code != glyph_info->glyph)
g->c = 0, g->code = glyph_info->glyph;
- g->xoff = glyph_info->geometry.x_offset;
- g->yoff = glyph_info->geometry.y_offset;
- g->xadv = glyph_info->geometry.width;
+ 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;
g->yadv = 0;
adjustment[i].set = 0;
}
for (i = 0, j = mtext_character (mt, i, len, '\n'); i < len;
i = j + 1, j = mtext_character (mt, i, len, '\n'))
{
+ int to;
+
if (j < 0)
j = len;
- if (flt (mt, i, j, font, flt_name) < 0)
+ to = flt (mt, i, j, font, flt_name);
+ if (to < 0)
{
fprintf (stderr, "Error in FLT processing.\n");
exit (1);
}
+ while (to < j
+
}
m17n_object_unref (mt);
close_font (font);