From: Po Lu Date: Mon, 29 Nov 2021 07:12:25 +0000 (+0000) Subject: Make overhangs in ftcrfont work on Haiku X-Git-Tag: emacs-29.0.90~3649^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1aa9cbf57a08f1c17b92b13a2bf07d504684fcc;p=emacs.git Make overhangs in ftcrfont work on Haiku * src/ftcrfont.c (ftcrfont_draw): Dump left overhang clipping on Haiku and always set `background_filled_p'. --- diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 5d75f183570..820b3c0bd0c 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -539,13 +539,19 @@ ftcrfont_draw (struct glyph_string *s, return 0; } BView_cr_dump_clipping (FRAME_HAIKU_VIEW (f), cr); + + if (s->left_overhang && s->clip_head && !s->for_overlaps) + { + cairo_rectangle (cr, s->clip_head->x, 0, + FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); + cairo_clip (cr); + } #endif if (with_background) { #ifndef USE_BE_CAIRO x_set_cr_source_with_gc_background (f, s->gc); - s->background_filled_p = 1; #else struct face *face = s->face; @@ -556,6 +562,7 @@ ftcrfont_draw (struct glyph_string *s, GREEN_FROM_ULONG (col) / 255.0, BLUE_FROM_ULONG (col) / 255.0); #endif + s->background_filled_p = 1; cairo_rectangle (cr, x, y - FONT_BASE (face->font), s->width, FONT_HEIGHT (face->font)); cairo_fill (cr);