From dd0b4a5064c6f60adcfd2ea02e2d61fb60254d20 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 7 Mar 2000 02:02:15 +0000 Subject: Convert log_clusters[] use from char offsets to byte offset - should make Mon Mar 6 20:55:32 2000 Owen Taylor * 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) --- docs/tmpl/glyphs.sgml | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to 'docs/tmpl/glyphs.sgml') diff --git a/docs/tmpl/glyphs.sgml b/docs/tmpl/glyphs.sgml index e50472f7..ad3fad44 100644 --- a/docs/tmpl/glyphs.sgml +++ b/docs/tmpl/glyphs.sgml @@ -17,6 +17,64 @@ glyphs. + + +The #PangoRectangle structure represents a rectangle. It is frequently +used to represent the logical or ink extents of a single glyph or section +of text. (See, for instance, pango_font_get_glyph_extents()) + + +@x: X coordinate of the left side of the rectangle. +@y: Y coordinate of the the top side of the rectangle. +@width: width of the rectangle. +@height: height of the rectangle. + + + +Extracts the ascent from a #PangoRectangle +representing glyph extents. The ascent is the distance from the +baseline to the highest point of the character. This is positive if the +glyph ascends above the baseline. + + +@rect: a #PangoRectangle + + + + +Extracts the descent from a #PangoRectangle +representing glyph extents. The descent is the distance from the +baseline to the lowest point of the character. This is positive if the +glyph descends below the baseline. + + +@rect: a #PangoRectangle + + + + +Extracts the left bearing from a #PangoRectangle +representing glyph extents. The descent is the distance from the +horizontal origin to the farthest left point of the character. +This is positive for characters drawn completely to the right of the +glyph origin. + + +@rect: a #PangoRectangle + + + + +Extracts the left bearing from a #PangoRectangle +representing glyph extents. The descent is the distance from the +horizontal origin to the farthest left point of the character. +This is positive except for characters drawn completely to the left of the +horizontal origin. + + +@rect: a #PangoRectangle + + The #PangoGlyph structure represents a single glyph in the output @@ -187,3 +245,14 @@ accessible fields @string: + + + + + +@glyphs: +@font: +@ink_rect: +@logical_rect: + + -- cgit v1.2.1