projects
/
m17n
/
m17n-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[m17n/m17n-test.git]
/
flt.c
diff --git
a/flt.c
b/flt.c
index
4b4a4f0
..
dbf6c88
100644
(file)
--- a/
flt.c
+++ b/
flt.c
@@
-531,9
+531,6
@@
open_font (char *fontname, char **err)
if (! face)
return NULL;
font_info = malloc (sizeof (FontInfoOTF));
if (! face)
return NULL;
font_info = malloc (sizeof (FontInfoOTF));
- font_info->font.get_glyph_id = get_glyph_id;
- font_info->font.get_metric = get_metric;
- font_info->font.drive_otf = drive_otf;
font_info->face = face;
font_info->otf = OTF_open_ft_face (face);
return ((MFLTFont *) font_info);
font_info->face = face;
font_info->otf = OTF_open_ft_face (face);
return ((MFLTFont *) font_info);
@@
-955,9
+952,6
@@
open_font (char *fontname, char **err)
if (! face)
return NULL;
font_info = calloc (1, sizeof (FontInfoHB));
if (! face)
return NULL;
font_info = calloc (1, sizeof (FontInfoHB));
- font_info->font.get_glyph_id = get_glyph_id;
- font_info->font.get_metric = get_metric;
- font_info->font.drive_otf = drive_otf;
font_info->face = face;
font_info->hb_font.klass = &hb_fontClass;
font_info->hb_font.faceData = face;
font_info->face = face;
font_info->hb_font.klass = &hb_fontClass;
font_info->hb_font.faceData = face;
@@
-1027,9
+1021,9
@@
int
get_glyph_id (MFLTFont *font, MFLTGlyph *g)
{
FontInfoPango *font_info = (FontInfoPango *) font;
get_glyph_id (MFLTFont *font, MFLTGlyph *g)
{
FontInfoPango *font_info = (FontInfoPango *) font;
- PangoGlyph glyph = pango_fc_font_get_glyph (font_info->pango_font, g->c);
- return (glyph ? (int) glyph : -1);
+ g->code = pango_fc_font_get_glyph (font_info->pango_font, g->c);
+ return (g->code ? 0 : -1);
}
int
}
int
@@
-1054,6
+1048,13
@@
get_metric (MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
}
}
}
}
+#ifndef PANGO_OT_DEFAULT_LANGUAGE
+#define PANGO_OT_DEFAULT_LANGUAGE ((guint) 0xFFFF)
+#endif
+#ifndef PANGO_OT_ALL_GLYPHS
+#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF)
+#endif
+
void
setup_features (PangoOTTableType type, FontInfoPango *font_info,
MFLTOtfSpec *spec, FeatureInfo *info)
void
setup_features (PangoOTTableType type, FontInfoPango *font_info,
MFLTOtfSpec *spec, FeatureInfo *info)
@@
-1234,6
+1235,7
@@
open_font (char *fontname, char **err)
font_info->fontmap = fontmap;
font_info->context = context;
font_info->pango_font = PANGO_FC_FONT (pango_font);
font_info->fontmap = fontmap;
font_info->context = context;
font_info->pango_font = PANGO_FC_FONT (pango_font);
+ font_info->otf_spec_cache = mplist ();
}
else
{
}
else
{
@@
-1297,6
+1299,9
@@
main (int argc, char **argv)
fprintf (stderr, "Font error: %s: %s\n", argv[1], err);
exit (1);
}
fprintf (stderr, "Font error: %s: %s\n", argv[1], err);
exit (1);
}
+ font->get_glyph_id = get_glyph_id;
+ font->get_metric = get_metric;
+ font->drive_otf = drive_otf;
mt = mconv_decode_stream (msymbol ("utf-8"), stdin);
len = mtext_len (mt);
mt = mconv_decode_stream (msymbol ("utf-8"), stdin);
len = mtext_len (mt);