diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-12-26 15:24:16 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-01 20:09:31 +0000 |
| commit | 7acdb3a0dd5633ac79aa7664df300b1fdbe715f0 (patch) | |
| tree | 4829dac899ff813f95b430d4f528f3015e27895b /stride.h | |
| parent | doc: foot.ini: remove FONT FORMAT section, expand description of ‘font’ (diff) | |
box-drawing: add infrastructure for rendering box drawing characters ourselves
* ‘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.
Diffstat (limited to 'stride.h')
| -rw-r--r-- | stride.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 <pixman.h> + +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); +} |
