diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-04-03 19:16:36 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-04-03 19:16:36 +0000 |
commit | f3542cd8e6a4f666b3c39cb8d562a88369d9e858 (patch) | |
tree | 469cf50ef8da81606ccf592ead1b759f2dcdf8b4 /examples | |
parent | c1198ebb48f2eaf3e71a5f37b4ceaae16cba84d7 (diff) | |
download | pango-f3542cd8e6a4f666b3c39cb8d562a88369d9e858.tar.gz |
Fix off-by-one error for RTL runs.
Mon Apr 3 15:16:06 2000 Owen Taylor <otaylor@redhat.com>
* pango/glyphstring.c (pango_glyph_string_get_logical_widths):
Fix off-by-one error for RTL runs.
* configure.in: Add -lglib to AC_CHECK_LIB(fribidi...)
(How did this work?) From Matt Wilson.
* pango/pango-layout.c (pango_layout_check_lines): Correctly deal
with handling character offsets when breaking lines.
* modules/arabic/arabic.c (arabic_engine_shape): Fix problem with
setting unknown glyph when no arabic-capable font found.
Fri Mar 31 11:29:47 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox.[ch] (pango_x_render_layout[_line]) examples/viewer.c: Add
capability to render foreground / background colors. The interfaces
here are possibly certainly not right, or convenient, but
they should be a start.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/viewer.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/examples/viewer.c b/examples/viewer.c index ccff0b77..c966865f 100644 --- a/examples/viewer.c +++ b/examples/viewer.c @@ -289,6 +289,17 @@ size_allocate (GtkWidget *layout, GtkAllocation *allocation) gtk_adjustment_set_value (GTK_LAYOUT (layout)->vadjustment, height - allocation->height); } +GC +get_gc_func (PangoAttrColor *fg_color, void *data) +{ + return GDK_GC_XGC (data); +} + +void +free_gc_func (GC gc, void *data) +{ +} + /* Handle a draw/expose by finding the paragraphs that intersect * the region and reexposing them. */ @@ -315,8 +326,8 @@ draw (GtkWidget *layout, GdkRectangle *area) if (height + para->height >= GTK_LAYOUT (layout)->yoffset + area->y) pango_x_render_layout (GDK_DISPLAY(), GDK_WINDOW_XWINDOW (GTK_LAYOUT (layout)->bin_window), - GDK_GC_XGC (layout->style->text_gc[GTK_STATE_NORMAL]), - para->layout, 0, height - GTK_LAYOUT (layout)->yoffset); + para->layout, 0, height - GTK_LAYOUT (layout)->yoffset, + get_gc_func, free_gc_func, layout->style->text_gc[GTK_STATE_NORMAL]); height += para->height; } |