1 #ifndef _GNM_STYLE_FONT_H_ 2 # define _GNM_STYLE_FONT_H_ 3 4 #include <gnumeric.h> 5 #include <libgnumeric.h> 6 #include <pango/pango.h> 7 8 G_BEGIN_DECLS 9 10 struct _GnmFont { 11 int ref_count; 12 char *font_name; 13 double size_pts; 14 struct _GnmGOFont { 15 GOFont const *font; 16 GOFontMetrics *metrics; 17 } go; 18 PangoContext *context; 19 20 unsigned int is_bold : 1; 21 unsigned int is_italic : 1; 22 }; 23 24 GType gnm_font_get_type (void); 25 GnmFont *gnm_font_new (PangoContext *context, 26 char const *font_name, 27 double size_pts, gboolean bold, gboolean italic); 28 GnmFont *gnm_font_ref (GnmFont *gfont); 29 void gnm_font_unref (GnmFont *gfont); 30 guint gnm_font_hash (gconstpointer v); 31 gint gnm_font_equal (gconstpointer v, gconstpointer v2); 32 33 GNM_VAR_DECL double gnm_font_default_width; 34 35 int gnm_font_override_codepage (gchar const *font_name); 36 37 /****************************************************************/ 38 /* Internal */ 39 void gnm_font_init (void); 40 void gnm_font_shutdown (void); 41 42 /****************************************************************/ 43 /* Internal : Deprecated : Wrong place */ 44 PangoContext *gnm_pango_context_get (void); 45 46 G_END_DECLS 47 48 #endif /* _GNM_STYLE_FONT_H_ */ 49