From b5f0b34189540cab87289091a4e5e32e88ad738b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Apr 2020 18:06:29 +0200 Subject: Prepare for glyph caching support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- demo.c | 2 +- libskrift.h | 2 +- libskrift_create_context.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/demo.c b/demo.c index 70708c7..9157a5c 100644 --- a/demo.c +++ b/demo.c @@ -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; -- cgit v1.2.3-70-g09d2