diff options
author | Mattias Andrée <maandree@kth.se> | 2020-04-26 18:06:29 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-04-26 18:06:29 +0200 |
commit | b5f0b34189540cab87289091a4e5e32e88ad738b (patch) | |
tree | 98a164aeeb5c3427516c1e14bef4c1b876be4462 | |
parent | Store font count in context (diff) | |
download | libskrift-b5f0b34189540cab87289091a4e5e32e88ad738b.tar.gz libskrift-b5f0b34189540cab87289091a4e5e32e88ad738b.tar.bz2 libskrift-b5f0b34189540cab87289091a4e5e32e88ad738b.tar.xz |
Prepare for glyph caching support
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | demo.c | 2 | ||||
-rw-r--r-- | libskrift.h | 2 | ||||
-rw-r--r-- | libskrift_create_context.c | 4 |
3 files changed, 5 insertions, 3 deletions
@@ -25,7 +25,7 @@ main(void) return -1; } height = libskrift_points_to_pixels(72, &rendering); - if (libskrift_create_context(&ctx, &font, 1, height, &rendering)) { + if (libskrift_create_context(&ctx, &font, 1, height, &rendering, NULL)) { perror("libskrift_create_context"); return -1; } diff --git a/libskrift.h b/libskrift.h index 1fa0085..8745e09 100644 --- a/libskrift.h +++ b/libskrift.h @@ -167,7 +167,7 @@ void libskrift_close_font(LIBSKRIFT_FONT *); _LIBSKRIFT_GCC_ONLY(__attribute__((__nonnull__(1, 2)))) -int libskrift_create_context(LIBSKRIFT_CONTEXT **, LIBSKRIFT_FONT **, size_t, double, const struct libskrift_rendering *); +int libskrift_create_context(LIBSKRIFT_CONTEXT **, LIBSKRIFT_FONT **, size_t, double, const struct libskrift_rendering *, void *); void libskrift_free_context(LIBSKRIFT_CONTEXT *); diff --git a/libskrift_create_context.c b/libskrift_create_context.c index 672a667..2528221 100644 --- a/libskrift_create_context.c +++ b/libskrift_create_context.c @@ -18,10 +18,12 @@ static const struct libskrift_rendering default_rendering = LIBSKRIFT_DEFAULT_RE int libskrift_create_context(LIBSKRIFT_CONTEXT **ctxp, LIBSKRIFT_FONT **fonts, size_t nfonts, double height, - const struct libskrift_rendering *rendering) + const struct libskrift_rendering *rendering, void *caching) { size_t i; + (void) caching; + if (!nfonts) { errno = EINVAL; return -1; |