aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-21 17:29:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-21 17:29:36 +0000
commit7194f65ae9a49e0725310f8529de8ef61ac4a46b (patch)
tree462470ce1bcf9536aa200cc711f145a3d51a1f29 /render.c
parentMerge branch 'master' into fcft-v2 (diff)
fcft: adjust to fcft-2.0 API changes
* font_*() -> fcft_*() * struct font -> struct fcft_font * struct glyph -> struct fcft_glyph * enum subpixel_order -> enum fcft_subpixel
Diffstat (limited to 'render.c')
-rw-r--r--render.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/render.c b/render.c
index 1b71137b..7aede98d 100644
--- a/render.c
+++ b/render.c
@@ -196,7 +196,7 @@ static const struct wp_presentation_feedback_listener presentation_feedback_list
.discarded = &discarded,
};
-static struct font *
+static struct fcft_font *
attrs_to_font(const struct terminal *term, const struct attributes *attrs)
{
int idx = attrs->italic << 1 | attrs->bold;
@@ -263,7 +263,7 @@ draw_unfocused_block(const struct terminal *term, pixman_image_t *pix,
static void
draw_bar(const struct terminal *term, pixman_image_t *pix,
- const struct font *font,
+ const struct fcft_font *font,
const pixman_color_t *color, int x, int y)
{
int baseline = y + font_baseline(term) - term->fonts[0]->ascent;
@@ -276,7 +276,7 @@ draw_bar(const struct terminal *term, pixman_image_t *pix,
static void
draw_underline(const struct terminal *term, pixman_image_t *pix,
- const struct font *font,
+ const struct fcft_font *font,
const pixman_color_t *color, int x, int y, int cols)
{
pixman_image_fill_rectangles(
@@ -288,7 +288,7 @@ draw_underline(const struct terminal *term, pixman_image_t *pix,
static void
draw_strikeout(const struct terminal *term, pixman_image_t *pix,
- const struct font *font,
+ const struct fcft_font *font,
const pixman_color_t *color, int x, int y, int cols)
{
pixman_image_fill_rectangles(
@@ -300,7 +300,7 @@ draw_strikeout(const struct terminal *term, pixman_image_t *pix,
static void
draw_cursor(const struct terminal *term, const struct cell *cell,
- const struct font *font, pixman_image_t *pix, pixman_color_t *fg,
+ const struct fcft_font *font, pixman_image_t *pix, pixman_color_t *fg,
const pixman_color_t *bg, int x, int y, int cols)
{
pixman_color_t cursor_color;
@@ -402,9 +402,9 @@ render_cell(struct terminal *term, pixman_image_t *pix,
color_dim_for_search(&bg);
}
- struct font *font = attrs_to_font(term, &cell->attrs);
- const struct glyph *glyph = cell->wc != 0
- ? font_glyph_for_wc(font, cell->wc, term->font_subpixel)
+ struct fcft_font *font = attrs_to_font(term, &cell->attrs);
+ const struct fcft_glyph *glyph = cell->wc != 0
+ ? fcft_glyph_for_wc(font, cell->wc, term->font_subpixel)
: NULL;
int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;
@@ -1527,7 +1527,7 @@ render_search_box(struct terminal *term)
PIXMAN_OP_SRC, buf->pix, &transparent,
1, &(pixman_rectangle16_t){0, 0, width - visible_width, height});
- struct font *font = term->fonts[0];
+ struct fcft_font *font = term->fonts[0];
int x = width - visible_width + margin;
int y = margin;
pixman_color_t fg = color_hex_to_pixman(term->colors.table[0]);
@@ -1553,7 +1553,7 @@ render_search_box(struct terminal *term)
if (i == term->search.cursor)
draw_bar(term, buf->pix, font, &fg, x, y);
- const struct glyph *glyph = font_glyph_for_wc(font, term->search.buf[i], true);
+ const struct fcft_glyph *glyph = fcft_glyph_for_wc(font, term->search.buf[i], true);
if (glyph == NULL)
continue;