diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-01-15 06:12:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-01-15 06:12:19 +0000 |
commit | 08be81c00f4fce735979e6a684eeade00c1ce328 (patch) | |
tree | 5fc105b5c494741d01e484fbb43fb737cb777ccd /pango/pangox.h | |
parent | a26b023b2859fed3e178a92e3d93c71672644e7d (diff) | |
download | pango-08be81c00f4fce735979e6a684eeade00c1ce328.tar.gz |
Eliminate PangoCFont; For X, encode charset into upper 16 bits of 32 bit
Sat Jan 15 01:06:45 2000 Owen Taylor <otaylor@redhat.com>
* libpango/pangox.c libpango/pangox.h libpango/fonts.c
libpango/glyphstring.c modules/basic/basic.c:
Eliminate PangoCFont; For X, encode charset into upper
16 bits of 32 bit glyph IDs. Revise X core <=> module
interfaces to support this change.
Remove support for X_XLFD_FONT_RANGES, which has been
disavowed by its proponents, in favor of checking metrics
to figure out if the relevant characters are there.
Rework operation of basic module to be faster and simple.
* modules/Makefile.am: temporarily comment out Tamil and
Hangul modules until I finish mucking with the
X font interfaces.
Diffstat (limited to 'pango/pangox.h')
-rw-r--r-- | pango/pangox.h | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/pango/pangox.h b/pango/pangox.h index 731ced79..c3a7d7f2 100644 --- a/pango/pangox.h +++ b/pango/pangox.h @@ -33,17 +33,6 @@ extern "C" { #define PANGO_RENDER_TYPE_X "PangoRenderX" -typedef struct _PangoXCFont PangoXCFont; - -struct _PangoXCFont { - /*< private >*/ - PangoCFont font; - - /*< public >*/ - Display *display; - XFontStruct *font_struct; -}; - /* Calls for applications */ PangoFont *pango_x_load_font (Display *display, @@ -51,10 +40,12 @@ PangoFont *pango_x_load_font (Display *display, void pango_x_render (Display *display, Drawable d, GC gc, + PangoFont *font, PangoGlyphString *glyphs, gint x, gint y); -void pango_x_extents (PangoGlyphString *glyphs, +void pango_x_extents (PangoFont *font, + PangoGlyphString *glyphs, gint *lbearing, gint *rbearing, gint *width, @@ -62,7 +53,8 @@ void pango_x_extents (PangoGlyphString *glyphs, gint *descent, gint *logical_ascent, gint *logical_descent); -void pango_x_glyph_extents (PangoGlyph *glyph, +void pango_x_glyph_extents (PangoFont *font, + PangoGlyphIndex glyph, gint *lbearing, gint *rbearing, gint *width, @@ -71,23 +63,19 @@ void pango_x_glyph_extents (PangoGlyph *glyph, gint *logical_ascent, gint *logical_descent); - -/* Calls for rendering modules +/* API for rendering modules */ -PangoCFont *pango_x_find_cfont (PangoFont *font, - gchar *charset); -void pango_x_list_cfonts (PangoFont *font, - gchar **charsets, - gint n_charsets, - gchar ***xlfds, - gint *n_xlfds); -gboolean pango_x_xlfd_get_ranges (PangoFont *font, - gchar *xlfd, - gint **ranges, - gint *n_ranges); -PangoCFont *pango_x_load_xlfd (PangoFont *font, - gchar *xlfd); - +typedef guint16 PangoXCharset; + +#define PANGO_X_MAKE_GLYPH(charset,index) (charset<<16 | index) +#define PANGO_X_GLYPH_CHARSET(glyph) (glyph>>16) +#define PANGO_X_GLYPH_INDEX(glyph) (glyph & 0xffff) + +PangoXCharset pango_x_find_charset (PangoFont *font, + gchar *charset); +gboolean pango_x_has_glyph (PangoFont *font, + PangoGlyphIndex glyph); + #ifdef __cplusplus } #endif /* __cplusplus */ |