struct MFontDriver
{
- /** Return a font best matching with SPEC. */
+ /** Return a font satisfying REQUEST and best matching with SPEC.
+ For the moment, LIMITTED_SIZE is ignored. */
MRealizedFont *(*select) (MFrame *frame, MFont *spec, MFont *request,
int limitted_size);
/** Open a font specified by RFONT. */
int (*open) (MRealizedFont *rfont);
- /** Close a font specified by RFONT. */
- void (*close) (MRealizedFont *rfont);
-
/** Set metrics of glyphs in GSTRING from FROM to TO. */
void (*find_metric) (MRealizedFont *rfont, MGlyphString *gstring,
int from, int to);
void (*render) (MDrawWindow win, int x, int y,
MGlyphString *gstring, MGlyph *from, MGlyph *to,
int reverse, MDrawRegion region);
+
+ MFont *(*parse_name) (char *name, MFont *font);
+ char *(*build_name) (MFont *font);
};
/** Initialize the members of FONT. */
#define MFONT_INIT(font) memset ((font), 0, sizeof (MFont))
-extern MPlist *mfont__driver_list;
-
extern MSymbol Mlayouter;
extern int mfont__flt_init ();
M17NObject control;
MFont font;
char *filename;
- int otf_flag; /* This font 1: is OTF, 0: may be OTF, -1: is not OTF. */
+ int otf_flag; /* This font is OTF (1), may be OTF (0), is not OTF (-1). */
MPlist *charmap_list;
int charmap_index;
FT_Face ft_face;
extern int mfont__open (MRealizedFont *rfont);
-extern void mfont__close (MRealizedFont *rfont);
-
extern void mfont__get_metric (MGlyphString *gstring, int from, int to);
extern void mfont__set_property (MFont *font, enum MFontProperty key,