(mflt_enable_new_feature): Document it.
[m17n/m17n-lib.git] / src / font.h
index 918fff8..592fa2a 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
 
@@ -140,6 +140,9 @@ struct MRealizedFont
      so that this object can be distingushed from MFont.  */
   MFont spec;
 
+  /* Font identifier. */
+  MSymbol id;
+
   /* Frame on which the font is realized.  */
   MFrame *frame;
 
@@ -240,6 +243,12 @@ struct MFontDriver
   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.  */
@@ -257,6 +266,7 @@ extern void mfont__flt_fini ();
 #ifdef HAVE_FREETYPE
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#endif
 
 #ifdef HAVE_FONTCONFIG
 #include <fontconfig/fontconfig.h>
@@ -268,27 +278,6 @@ extern void mfont__flt_fini ();
 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 */
-
-#endif /* HAVE_FREETYPE */
-
 enum MFontOpenTypeTable
   {
     MFONT_OTT_GSUB,
@@ -311,6 +300,28 @@ typedef struct
   } 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);