From 7acdb3a0dd5633ac79aa7664df300b1fdbe715f0 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 26 Dec 2020 16:24:16 +0100 Subject: box-drawing: add infrastructure for rendering box drawing characters ourselves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ‘term’ struct contains an array of 160 fcft glyph pointers * the glyph pointers are lazily allocated when we need to draw a box drawings character * Filtering out box drawings characters is easy - they are (except unicode 13, which isn’t handled yet )all in a single range. --- stride.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 stride.h (limited to 'stride.h') diff --git a/stride.h b/stride.h new file mode 100644 index 00000000..b2c71a71 --- /dev/null +++ b/stride.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +static inline int +stride_for_format_and_width(pixman_format_code_t format, int width) +{ + return (((PIXMAN_FORMAT_BPP(format) * width + 7) / 8 + 4 - 1) & -4); +} -- cgit v1.3