diff options
| author | Po Lu | 2021-11-29 07:12:25 +0000 |
|---|---|---|
| committer | Po Lu | 2021-11-29 07:12:25 +0000 |
| commit | a1aa9cbf57a08f1c17b92b13a2bf07d504684fcc (patch) | |
| tree | 3d82cdbc905949127b439952fe0bb75615e5c3c5 | |
| parent | 0400b3c329b4bcfaea68ab24ae2d1857707a983d (diff) | |
| download | emacs-a1aa9cbf57a08f1c17b92b13a2bf07d504684fcc.tar.gz emacs-a1aa9cbf57a08f1c17b92b13a2bf07d504684fcc.zip | |
Make overhangs in ftcrfont work on Haiku
* src/ftcrfont.c (ftcrfont_draw): Dump left overhang clipping
on Haiku and always set `background_filled_p'.
| -rw-r--r-- | src/ftcrfont.c | 9 |
1 files changed, 8 insertions, 1 deletions
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, | |||
| 539 | return 0; | 539 | return 0; |
| 540 | } | 540 | } |
| 541 | BView_cr_dump_clipping (FRAME_HAIKU_VIEW (f), cr); | 541 | BView_cr_dump_clipping (FRAME_HAIKU_VIEW (f), cr); |
| 542 | |||
| 543 | if (s->left_overhang && s->clip_head && !s->for_overlaps) | ||
| 544 | { | ||
| 545 | cairo_rectangle (cr, s->clip_head->x, 0, | ||
| 546 | FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); | ||
| 547 | cairo_clip (cr); | ||
| 548 | } | ||
| 542 | #endif | 549 | #endif |
| 543 | 550 | ||
| 544 | if (with_background) | 551 | if (with_background) |
| 545 | { | 552 | { |
| 546 | #ifndef USE_BE_CAIRO | 553 | #ifndef USE_BE_CAIRO |
| 547 | x_set_cr_source_with_gc_background (f, s->gc); | 554 | x_set_cr_source_with_gc_background (f, s->gc); |
| 548 | s->background_filled_p = 1; | ||
| 549 | #else | 555 | #else |
| 550 | struct face *face = s->face; | 556 | struct face *face = s->face; |
| 551 | 557 | ||
| @@ -556,6 +562,7 @@ ftcrfont_draw (struct glyph_string *s, | |||
| 556 | GREEN_FROM_ULONG (col) / 255.0, | 562 | GREEN_FROM_ULONG (col) / 255.0, |
| 557 | BLUE_FROM_ULONG (col) / 255.0); | 563 | BLUE_FROM_ULONG (col) / 255.0); |
| 558 | #endif | 564 | #endif |
| 565 | s->background_filled_p = 1; | ||
| 559 | cairo_rectangle (cr, x, y - FONT_BASE (face->font), | 566 | cairo_rectangle (cr, x, y - FONT_BASE (face->font), |
| 560 | s->width, FONT_HEIGHT (face->font)); | 567 | s->width, FONT_HEIGHT (face->font)); |
| 561 | cairo_fill (cr); | 568 | cairo_fill (cr); |