/* font.h -- header file for the font module.
- Copyright (C) 2003, 2004
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
so that this object can be distingushed from MFont. */
MFont spec;
+ /* Font identifier. */
+ MSymbol id;
+
/* Frame on which the font is realized. */
MFrame *frame;
int (*drive_otf) (MFLTFont *font, MFLTOtfSpec *spec,
MFLTGlyphString *in, int from, int to,
MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment);
+
+ int (*try_otf) (MFLTFont *font, MFLTOtfSpec *spec,
+ MFLTGlyphString *in, int from, int to);
+
+ int (*iterate_otf_feature) (struct _MFLTFont *font, MFLTOtfSpec *spec,
+ int from, int to, unsigned char *table);
};
/** Initialize the members of FONT. */
#ifdef HAVE_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
+#endif
#ifdef HAVE_FONTCONFIG
#include <fontconfig/fontconfig.h>
typedef unsigned OTF_Tag;
#endif /* not HAVE_OTF */
-extern MFontDriver mfont__ft_driver;
-
-extern int mfont__ft_init ();
-
-extern void mfont__ft_fini ();
-
-extern int mfont__ft_parse_name (const char *name, MFont *font);
-
-extern char *mfont__ft_unparse_name (MFont *font);
-
-#ifdef HAVE_OTF
-
-extern int mfont__ft_drive_otf (MGlyphString *gstring, int from, int to,
- MFontCapability *capability);
-
-extern int mfont__ft_decode_otf (MGlyph *g);
-
-#endif /* HAVE_OTF */
-
-#else /* not HAVE_FREETYPE */
-
-typedef unsigned OTF_Tag;
-
-#endif /* not HAVE_FREETYPE */
-
enum MFontOpenTypeTable
{
MFONT_OTT_GSUB,
} features[MFONT_OTT_MAX];
} MFontCapability;
+#ifdef HAVE_FREETYPE
+extern MFontDriver mfont__ft_driver;
+
+extern int mfont__ft_init ();
+
+extern void mfont__ft_fini ();
+
+extern int mfont__ft_parse_name (const char *name, MFont *font);
+
+extern char *mfont__ft_unparse_name (MFont *font);
+
+#ifdef HAVE_OTF
+
+extern int mfont__ft_drive_otf (MGlyphString *gstring, int from, int to,
+ MFontCapability *capability);
+
+extern int mfont__ft_decode_otf (MGlyph *g);
+
+#endif /* HAVE_OTF */
+
+#endif /* HAVE_FREETYPE */
+
extern void mfont__free_realized (MRealizedFont *rfont);
extern int mfont__match_p (MFont *font, MFont *spec, int prop);