From 76567e9ef0945c5ce86bb55097e6112a9b866948 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 1 May 2020 11:56:13 +0200 Subject: render: render combining characters This is basically just a loop that renders additional glyphs on top off the base glyph. Since we now need access to the row struct, for the combining characters, the function prototype for 'render_cell()' has changed. When rendering the combining characters we also need to deal with broken fonts; some fonts use positive offsets (as if the combining character was a regular character), while others use a negative offset (to be used as if you had already advanced the pen position). We handle both - a positive offset is rendered just like a regular glyph. When we see a negative offset we simply add the width of a cell first. --- terminal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index e653e9be..27188cba 100644 --- a/terminal.h +++ b/terminal.h @@ -374,7 +374,7 @@ struct terminal { struct { struct coord actual; /* Absolute */ struct coord in_view; /* Offset by view */ - struct cell *cell; /* For easy access to content */ + struct row *row; /* Actual row TODO: remove */ } last_cursor; struct buffer *last_buf; /* Buffer we rendered to last time */ -- cgit v1.3