-#ifdef HAVE_FT2
-
-extern int i_ft2_init(void);
-extern FT2_Fonthandle * i_ft2_new(const char *name, int index);
-extern void i_ft2_destroy(FT2_Fonthandle *handle);
-extern int i_ft2_setdpi(FT2_Fonthandle *handle, int xdpi, int ydpi);
-extern int i_ft2_getdpi(FT2_Fonthandle *handle, int *xdpi, int *ydpi);
-extern int i_ft2_settransform(FT2_Fonthandle *handle, const double *matrix);
-extern int i_ft2_sethinting(FT2_Fonthandle *handle, int hinting);
-extern int i_ft2_bbox(FT2_Fonthandle *handle, double cheight, double cwidth,
- char const *text, int len, int *bbox, int utf8);
-extern int i_ft2_bbox_r(FT2_Fonthandle *handle, double cheight, double cwidth,
- char const *text, int len, int vlayout, int utf8, int *bbox);
-extern int i_ft2_text(FT2_Fonthandle *handle, i_img *im, int tx, int ty,
- const i_color *cl, double cheight, double cwidth,
- char const *text, int len, int align, int aa,
- int vlayout, int utf8);
-extern int i_ft2_cp(FT2_Fonthandle *handle, i_img *im, int tx, int ty,
- int channel, double cheight, double cwidth,
- char const *text, int len, int align, int aa, int vlayout,
- int utf8);
-extern int i_ft2_has_chars(FT2_Fonthandle *handle, char const *text, int len,
- int utf8, char *work);
-extern int i_ft2_face_name(FT2_Fonthandle *handle, char *name_buf,
- size_t name_buf_size);
-extern int i_ft2_can_face_name(void);
-extern int i_ft2_glyph_name(FT2_Fonthandle *handle, unsigned long ch,
- char *name_buf, size_t name_buf_size,
- int reliable_only);
-extern int i_ft2_can_do_glyph_names(void);
-extern int i_ft2_face_has_glyph_names(FT2_Fonthandle *handle);
-
-extern int i_ft2_get_multiple_masters(FT2_Fonthandle *handle,
- i_font_mm *mm);
-extern int
-i_ft2_is_multiple_master(FT2_Fonthandle *handle);
-extern int
-i_ft2_set_mm_coords(FT2_Fonthandle *handle, int coord_count, const long *coords);
-#endif
-
-#ifdef WIN32
-
-extern int i_wf_bbox(const char *face, int size, const char *text, int length, int *bbox, int utf8);
-extern int i_wf_text(const char *face, i_img *im, int tx, int ty, const i_color *cl,
- int size, const char *text, int len, int align, int aa, int utf8);
-extern int i_wf_cp(const char *face, i_img *im, int tx, int ty, int channel,
- int size, const char *text, int len, int align, int aa, int utf8);
-extern int i_wf_addfont(char const *file);
-extern int i_wf_delfont(char const *file);
-
-#endif
-
-/* functions for reading and writing formats */
-
-/* general reader callback
- userdata - data the user passed into the reader
- buffer - the buffer to fill with data
- need - the amount of data needed
- want - the amount of space we have to store data
- fill buffer and return the number of bytes read, 0 for eof, -1 for error
-*/
-
-typedef int (*i_read_callback_t)(char *userdata, char *buffer, int need,
- int want);
-
-/* i_gen_reader() translates the low-level requests from whatever library
- into buffered requests.
- but the called function can always bypass buffering by only ever
- reading I<need> bytes.
-*/
-#define CBBUFSIZ 4096
-
-typedef struct {
- i_read_callback_t cb;
- char *userdata;
- char buffer[CBBUFSIZ];
- int length;
- int cpos;
-} i_gen_read_data;
-
-extern int i_gen_reader(i_gen_read_data *info, char *buffer, int need);
-extern i_gen_read_data *i_gen_read_data_new(i_read_callback_t cb, char *userdata);
-extern void i_free_gen_read_data(i_gen_read_data *);
-
-/* general writer callback
- userdata - the data the user passed into the writer
- data - the data to write
- data_size - the number of bytes to write
- write the data, return non-zero on success, zero on failure.
-*/
-typedef int (*i_write_callback_t)(char *userdata, char const *data, int size);
-
-typedef struct {
- i_write_callback_t cb;
- char *userdata;
- char buffer[CBBUFSIZ];
- int maxlength;
- int filledto;
-} i_gen_write_data;
-
-extern int i_gen_writer(i_gen_write_data *info, char const *data, int size);
-extern i_gen_write_data *i_gen_write_data_new(i_write_callback_t cb, char *userdata, int maxlength);
-extern int i_free_gen_write_data(i_gen_write_data *, int flush);
-