short ascent, descent;
MFontEncoding *encoding;
+
+ /* Type of the font: Mx, Mfreetype, or Mxft. */
+ MSymbol type;
+
+ /* Pointer to the font structure. */
+ void *fontp;
};
/** Structure to hold a list of fonts of each registry. */
void (*find_metric) (MRealizedFont *rfont, MGlyphString *gstring,
int from, int to);
- /** Encode C into the glyph code the font. CODE is a code point of
- C in rfont->encoder->encoding_charset. If the font has no glyph
- for C, return MCHAR_INVALID_CODE. */
- unsigned (*encode_char) (MRealizedFont *rfont, int c, unsigned code);
+ /** Encode CODE into a glyph code the font. CODE is a code point of
+ a character in rfont->encoder->encoding_charset. If the font
+ has no glyph for CODE, return MCHAR_INVALID_CODE. */
+ unsigned (*encode_char) (MRealizedFont *rfont, unsigned code);
/** Draw glyphs from FROM to TO (exclusive) on window WIN of FRAME
at coordinate (X, Y) relative to WIN. */
void (*render) (MDrawWindow win, int x, int y,
MGlyphString *gstring, MGlyph *from, MGlyph *to,
int reverse, MDrawRegion region);
+
+ /** Push to PLIST fonts matching with FONT. LANGUAGE, if not Mnil,
+ limits fonts to ones that support LANGUAGE. MAXNUM if greater
+ than 0 limits the number of listed fonts. Return how many fonts
+ a listed. */
+ int (*list) (MFrame *frame, MPlist *plist, MFont *font, MSymbol language,
+ int maxnum);
};
/** Initialize the members of FONT. */
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef HAVE_FONTCONFIG
+#include <fontconfig/fontconfig.h>
+#endif
+
#ifdef HAVE_OTF
#include <otf.h>
#endif /* HAVE_OTF */
MPlist *charmap_list;
int charmap_index;
FT_Face ft_face;
+ char *languages;
#ifdef HAVE_OTF
OTF *otf;
#endif /* HAVE_OTF */
+#ifdef HAVE_FONTCONFIG
+ FcLangSet *langset;
+#else
+ void *langset;
+#endif
void *extra_info; /* Xft uses this member. */
} MFTInfo;
extern char *mfont__ft_unparse_name (MFont *font);
+#ifdef HAVE_OTF
+
extern int mfont__ft_drive_otf (MGlyphString *gstring, int from, int to,
- MRealizedFont *rfont,
MSymbol script, MSymbol langsys,
MSymbol gsub_features, MSymbol gpos_features);
+
extern int mfont__ft_decode_otf (MGlyph *g);
+#endif /* HAVE_OTF */
+
#endif /* HAVE_FREETYPE */
extern void mfont__free_realized (MRealizedFont *rfont);
extern void mfont__resize (MFont *spec, MFont *request);
-extern int mfont__encodable_p (MRealizedFont *rfont, MSymbol layouter_name,
- int c);
-
extern unsigned mfont__encode_char (MRealizedFont *rfont, int c);
extern MRealizedFont *mfont__select (MFrame *frame, MFont *spec,
extern int mfont__parse_name_into_font (char *name, MSymbol format,
MFont *font);
+extern MPlist *mfont__encoding_list (void);
+
extern unsigned mfont__flt_encode_char (MSymbol layouter_name, int c);
extern int mfont__flt_run (MGlyphString *gstring, int from, int to,