summaryrefslogtreecommitdiff
path: root/pango/glyphstring.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-07 04:06:29 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-07 04:06:29 +0000
commit1a9eb53c12b49c53aaaf56ef40220c28bd13df84 (patch)
treefd8a5035b8606576ef7c9b9fa2366d4f7880b94e /pango/glyphstring.c
parentadf1db25a516e1a8b02b89de216e2b42ef1d7639 (diff)
downloadpango-1a9eb53c12b49c53aaaf56ef40220c28bd13df84.tar.gz
When handling overstrikes, try to guess a bit better how overstrike glyphs
Sun May 7 00:00:00 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/basic.c (basic_engine_shape): When handling overstrikes, try to guess a bit better how overstrike glyphs are positioned in the font. (Now works with more of glyphs from clearlyu, though not the Hebrew accents in that font) * examples/HELLO.utf8: Insert tab characters to keep the columns in the right order for either global direction. Insert left-to-right marks in a few places to keep leading and trailing punctuation in the right place. * modules/basic/basic.c (basic_engine_shape): Don't show RLM and LRM * pango/glyphstring.c (pango_glyph_string_extents): Use the logical width set in the glyph string rather than that from the font's metrics. * pango/pangox.c (pango_x_render): Treat glyph index 0 as special - representing invisible, 0 size character. We need this sometimes, and it is easier and faster to have this special case than to shape a space. * pango/pango-context.c (pango_itemize): Put tabs into separate items. (Sort of lame hack, we do this to make line breaking with tab handling simpler) * examples/viewer.c (checkbutton_toggled): Notify all the layouts that the context has changed so the RTL base dir change actually takes effect.
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r--pango/glyphstring.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index c2964704..d9d7c87b 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -139,6 +139,12 @@ pango_glyph_string_extents (PangoGlyphString *glyphs,
if (i == 0)
{
pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph, ink_rect, logical_rect);
+
+ if (logical_rect)
+ {
+ logical_rect->x = 0;
+ logical_rect->width = geometry->width;
+ }
}
else
{
@@ -163,14 +169,11 @@ pango_glyph_string_extents (PangoGlyphString *glyphs,
if (logical_rect)
{
- new_pos = MIN (logical_rect->x, x_pos + glyph_logical.x + geometry->x_offset);
- logical_rect->width = MAX (logical_rect->x + logical_rect->width,
- x_pos + glyph_logical.x + glyph_logical.width + geometry->x_offset) - new_pos;
- logical_rect->x = new_pos;
+ logical_rect->width += geometry->width;
new_pos = MIN (logical_rect->y, glyph_logical.y + geometry->y_offset);
logical_rect->height = MAX (logical_rect->y + logical_rect->height,
- glyph_logical.y + glyph_logical.height + geometry->y_offset) - new_pos;
+ glyph_logical.y + glyph_logical.height + geometry->y_offset) - new_pos;
logical_rect->y = new_pos;
}
}