aboutsummaryrefslogtreecommitdiffstats
path: root/libskrift_create_context.c
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 /libskrift_create_context.c
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--libskrift_create_context.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libskrift_create_context.c b/libskrift_create_context.c
index 2528221..fd8d086 100644
--- a/libskrift_create_context.c
+++ b/libskrift_create_context.c
@@ -5,12 +5,9 @@
LIBSKRIFT_NO_AUTOHINTING |\
LIBSKRIFT_NO_AUTOKERNING)
-#define IMPLEMENTED_FLAGS (LIBSKRIFT_CORRECT_GAMMA |\
- LIBSKRIFT_REMOVE_GAMMA |\
+#define IMPLEMENTED_FLAGS (LIBSKRIFT_REMOVE_GAMMA |\
FORCED_FLAGS) /* libschrift does not add gamma, so not handling is required */
-#define HAVE_MULTIPLE_FLAGS(HAVE, CHECK) (((HAVE) & (CHECK)) & (((HAVE) & (CHECK)) - 1))
-
#define COPY_ARRAY(DEST_STRUCT, SRC_STRUCT, FIELD)\
memcpy((DEST_STRUCT).FIELD, (SRC_STRUCT).FIELD, sizeof((SRC_STRUCT).FIELD))
@@ -30,8 +27,7 @@ libskrift_create_context(LIBSKRIFT_CONTEXT **ctxp, LIBSKRIFT_FONT **fonts, size_
}
if (rendering) {
- if (HAVE_MULTIPLE_FLAGS(rendering->flags, LIBSKRIFT_CORRECT_GAMMA | LIBSKRIFT_REMOVE_GAMMA) ||
- !rendering->grid_fineness) {
+ if (!rendering->grid_fineness) {
errno = EINVAL;
return -1;
}