aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-04-28 16:39:34 +0200
committerMattias Andrée <maandree@kth.se>2020-04-28 16:39:34 +0200
commitde7081c730426821d0e59d57f35d91b112a80961 (patch)
tree9d7ff6e961fa55842e03c92d5204a6695485f1b4 /common.h
parentFaster glyph merging when not using smoothing (diff)
downloadlibskrift-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/common.h b/common.h
index 615e9c2..5015efd 100644
--- a/common.h
+++ b/common.h
@@ -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];