diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-04-05 00:31:59 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-04-05 00:31:59 +0000 |
commit | 613302136667231bcefd772b419369516eb3bf45 (patch) | |
tree | 919ed907f3ca69f79210d0778c65df8bec97d4d0 /pango/pango-font.h | |
parent | 52f2e805bf993f711d09ba6fe4972c7f7ee33eae (diff) | |
download | pango-613302136667231bcefd772b419369516eb3bf45.tar.gz |
Add user data to PangoContext
Tue Apr 4 20:13:06 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-context.h: Add user data to PangoContext
* pango/pangox.[ch] examples/viewer.c: Rework system for create GC's
so that the necessary information is stored on the PangoContext
instead of being passed to layout_render()
* pango/utils.[ch] pango/pango-context.c: fribidi-0.1.9
wants UCS-4 not UCS2; switch accordingly.
* pango/fonts.c pango/pango-font.h pango/pangox.c: Add functions
to get overall font metrics, possibly per-language. (Right now,
just font ascent, descent.) The implementation of this for
X is horribly complex.
Diffstat (limited to 'pango/pango-font.h')
-rw-r--r-- | pango/pango-font.h | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/pango/pango-font.h b/pango/pango-font.h index f6fd7ea4..063b0cea 100644 --- a/pango/pango-font.h +++ b/pango/pango-font.h @@ -33,6 +33,7 @@ typedef struct _PangoFontDescription PangoFontDescription; typedef struct _PangoFontClass PangoFontClass; typedef struct _PangoFontMap PangoFontMap; typedef struct _PangoFontMapClass PangoFontMapClass; +typedef struct _PangoFontMetrics PangoFontMetrics; typedef enum { PANGO_STYLE_NORMAL, @@ -74,6 +75,12 @@ struct _PangoFontDescription int size; }; +struct _PangoFontMetrics +{ + int ascent; + int descent; +}; + PangoFontDescription *pango_font_description_copy (const PangoFontDescription *desc); gboolean pango_font_description_compare (const PangoFontDescription *desc1, const PangoFontDescription *desc2); @@ -109,28 +116,35 @@ struct _PangoFontClass PangoGlyph glyph, PangoRectangle *ink_rect, PangoRectangle *logical_rect); + void (*get_metrics) (PangoFont *font, + const gchar *lang, + PangoFontMetrics *metrics); }; void pango_font_init (PangoFont *font); void pango_font_ref (PangoFont *font); void pango_font_unref (PangoFont *font); gpointer pango_font_get_data (PangoFont *font, - gchar *key); + const gchar *key); void pango_font_set_data (PangoFont *font, - gchar *key, + const gchar *key, gpointer data, GDestroyNotify destroy_func); -PangoFontDescription *pango_font_describe (PangoFont *font); -PangoCoverage * pango_font_get_coverage (PangoFont *font, - const char *lang); -PangoEngineShape * pango_font_find_shaper (PangoFont *font, - const char *lang, - guint32 ch); -void pango_font_get_glyph_extents (PangoFont *font, - PangoGlyph glyph, - PangoRectangle *ink_rect, - PangoRectangle *logical_rect); + +PangoFontDescription *pango_font_describe (PangoFont *font); +PangoCoverage * pango_font_get_coverage (PangoFont *font, + const char *lang); +PangoEngineShape * pango_font_find_shaper (PangoFont *font, + const char *lang, + guint32 ch); +void pango_font_get_metrics (PangoFont *font, + const gchar *lang, + PangoFontMetrics *metrics); +void pango_font_get_glyph_extents (PangoFont *font, + PangoGlyph glyph, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); /* * Font Map |