2005-03-22 09:53:51 -05:00
|
|
|
#ifndef _HAVE_FONTS_H
|
|
|
|
#define _HAVE_FONTS_H
|
|
|
|
|
|
|
|
#include <pango/pangoft2.h>
|
|
|
|
|
|
|
|
#include "pixbuf.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
/* Code based on stuff found in luminocity */
|
|
|
|
|
|
|
|
typedef struct ClutterFont ClutterFont;
|
|
|
|
|
|
|
|
struct ClutterFont
|
|
|
|
{
|
|
|
|
PangoFontMap *font_map;
|
|
|
|
PangoContext *context;
|
2005-04-27 18:17:45 -04:00
|
|
|
int refcnt;
|
2005-03-22 09:53:51 -05:00
|
|
|
};
|
|
|
|
|
2005-04-27 18:17:45 -04:00
|
|
|
typedef ClutterFont CltrFont ; /* Tsk Tsk .. */
|
|
|
|
|
2005-03-22 09:53:51 -05:00
|
|
|
ClutterFont*
|
|
|
|
font_new (const char *face);
|
|
|
|
|
2005-04-27 18:17:45 -04:00
|
|
|
void
|
|
|
|
cltr_font_ref(CltrFont *font);
|
|
|
|
|
|
|
|
void
|
|
|
|
cltr_font_unref(CltrFont *font);
|
2005-03-22 09:53:51 -05:00
|
|
|
|
|
|
|
void
|
|
|
|
font_draw(ClutterFont *font,
|
|
|
|
Pixbuf *pixb,
|
|
|
|
const char *text,
|
|
|
|
int x,
|
2005-04-13 13:36:17 -04:00
|
|
|
int y,
|
|
|
|
PixbufPixel *p);
|
2005-03-22 09:53:51 -05:00
|
|
|
|
2005-04-27 18:17:45 -04:00
|
|
|
void
|
|
|
|
font_get_pixel_size (ClutterFont *font,
|
|
|
|
const char *text,
|
|
|
|
int *width,
|
|
|
|
int *height);
|
2005-03-22 09:53:51 -05:00
|
|
|
|
|
|
|
#endif
|