diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-03-07 02:02:15 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-03-07 02:02:15 +0000 |
commit | dd0b4a5064c6f60adcfd2ea02e2d61fb60254d20 (patch) | |
tree | 39a121f4bd40300bcd67521104db86c12bd33165 /pango/pango-types.h | |
parent | 6278d373c1a564ae4233a2e4b6d428a9f6202728 (diff) | |
download | pango-dd0b4a5064c6f60adcfd2ea02e2d61fb60254d20.tar.gz |
Convert log_clusters[] use from char offsets to byte offset - should make
Mon Mar 6 20:55:32 2000 Owen Taylor <otaylor@redhat.com>
* libpango/mapping.c example/viewer.c:
* modules/hangul/hangul.c modules/basic/basic.c modules/tamil/tamil.c:
Convert log_clusters[] use from char offsets to byte offset - should
make it easier to have all interface deal with stuff in byte offsets.
* libpango/mapping.c libpango/pango-glyph.h: Rename x_to_cp and cp_to_x
to make them "member functions" of glyph_string.
* libpango/pango-types.h: Add a rectangle type for use in storing
glyph/glyph-string extents, plus macros for extracting ascent/descent.
* libpango/fonts.c libpango/pango-font.h libpango/pangox.c: Virtualize
glyph extents function into the font.
* libpango/pangox.c modules/*/*.c examples/viewer.c: Convert over to
new rationalized unit system - everything in 1000ths of a point
or 1000ths of a glyph unit.
* libpango/pango-glyph.h libpango/glyphstring.c: Add function to get
extents of a glyph string. (We may want to fastpath the width in
the future, since getting the width seems to be a very common
and time-critical operation)
Diffstat (limited to 'pango/pango-types.h')
-rw-r--r-- | pango/pango-types.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pango/pango-types.h b/pango/pango-types.h index 33ef0195..9d31603c 100644 --- a/pango/pango-types.h +++ b/pango/pango-types.h @@ -39,6 +39,29 @@ typedef struct _PangoEngineLang PangoEngineLang; typedef struct _PangoEngineShape PangoEngineShape; typedef struct _PangoFont PangoFont; +typedef struct _PangoRectangle PangoRectangle; + +/* A index of a glyph into a font. Rendering system dependent + */ +typedef guint32 PangoGlyph; + +/* A rectangle. Used to store logical and physical extents of glyphs, + * runs, strings, etc. + */ +struct _PangoRectangle +{ + int x; + int y; + int width; + int height; +}; + +/* Macros to translate from extents rectangles to ascent/descent/lbearing/rbearing + */ +#define PANGO_ASCENT(rect) (-(rect).y) +#define PANGO_DESCENT(rect) ((rect).y + (rect).height) +#define PANGO_LBEARING(rect) ((rect).x) +#define PANGO_RBEARING(rect) ((rect).x + (rect).width) /* Information about a segment of text with a consistent * shaping/language engine and bidirectional level |