font: initial port from cairo scaled fonts to raw freetype + pixman

This commit is contained in:
Daniel Eklöf 2019-09-22 00:50:11 +02:00
parent 393e1909b7
commit b3a5e0b5d7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 659 additions and 191 deletions

9
stride.h Normal file
View file

@ -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);
}