summaryrefslogtreecommitdiff
path: root/src/ftcrfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ftcrfont.c')
-rw-r--r--src/ftcrfont.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index b89510704e1..8fffb33ee2c 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -22,7 +22,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <cairo-ft.h>
#include "lisp.h"
+#ifndef HAVE_PGTK
#include "xterm.h"
+#else
+#include "pgtkterm.h"
+#endif
#include "blockinput.h"
#include "charset.h"
#include "composite.h"
@@ -513,11 +517,19 @@ ftcrfont_draw (struct glyph_string *s,
block_input ();
+#ifndef HAVE_PGTK
cr = x_begin_cr_clip (f, s->gc);
+#else
+ cr = pgtk_begin_cr_clip (f);
+#endif
if (with_background)
{
+#ifndef HAVE_PGTK
x_set_cr_source_with_gc_background (f, s->gc);
+#else
+ pgtk_set_cr_source_with_color (f, s->xgcv.background);
+#endif
cairo_rectangle (cr, x, y - FONT_BASE (face->font),
s->width, FONT_HEIGHT (face->font));
cairo_fill (cr);
@@ -534,11 +546,19 @@ ftcrfont_draw (struct glyph_string *s,
NULL));
}
+#ifndef HAVE_PGTK
x_set_cr_source_with_gc_foreground (f, s->gc);
+#else
+ pgtk_set_cr_source_with_color (f, s->xgcv.foreground);
+#endif
cairo_set_scaled_font (cr, ftcrfont_info->cr_scaled_font);
cairo_show_glyphs (cr, glyphs, len);
+#ifndef HAVE_PGTK
x_end_cr_clip (f);
+#else
+ pgtk_end_cr_clip (f);
+#endif
unblock_input ();