diff options
author | Mattias Andrée <maandree@kth.se> | 2020-04-28 16:39:34 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-04-28 16:39:34 +0200 |
commit | de7081c730426821d0e59d57f35d91b112a80961 (patch) | |
tree | 9d7ff6e961fa55842e03c92d5204a6695485f1b4 /common.h | |
parent | Faster glyph merging when not using smoothing (diff) | |
download | libskrift-de7081c730426821d0e59d57f35d91b112a80961.tar.gz libskrift-de7081c730426821d0e59d57f35d91b112a80961.tar.bz2 libskrift-de7081c730426821d0e59d57f35d91b112a80961.tar.xz |
Add code (untested) for applying glyphs to an image
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | common.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,7 @@ #include <sys/mman.h> #include <sys/stat.h> +#include <endian.h> #include <errno.h> #include <math.h> #include <stdlib.h> @@ -14,6 +15,8 @@ #define MIN(A, B) ((A) < (B) ? (A) : (B)) #define MAX(A, B) ((A) > (B) ? (A) : (B)) +#define LEN(ARR) (sizeof(ARR) / sizeof(*(ARR))) + struct libskrift_font { SFT_Font *font; void *memory_free; @@ -31,3 +34,14 @@ struct libskrift_context { size_t nfonts; LIBSKRIFT_FONT *fonts[]; }; + +struct format_settings { + int float_type; + int8_t apos; + int8_t rpos; + int8_t gpos; + int8_t bpos; + size_t spsize; +}; + +extern const struct format_settings libskrift_format_settings[LIBSKRIFT_RGBA_LONG_DOUBLE + 1]; |