From 513ee4f15567048b619848edb092cdc4f33fe1c0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 13 Aug 2021 16:57:18 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libparsepsf.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libparsepsf.h (limited to 'libparsepsf.h') diff --git a/libparsepsf.h b/libparsepsf.h new file mode 100644 index 0000000..b1984b4 --- /dev/null +++ b/libparsepsf.h @@ -0,0 +1,27 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef LIBPARSEPSF_H +#define LIBPARSEPSF_H + +#include +#include + + +struct libparsepsf_unimap { + struct libparsepsf_unimap *nonterminal[256]; + size_t terminal[256]; /* index + 1, 0 if not used */ +}; + +struct libparsepsf_font { + size_t num_glyphs; + size_t height; + size_t width; + uint8_t *glyph_data; + struct libparsepsf_unimap *map; +}; + + +void libparsepsf_destroy_font(struct libparsepsf_font *font); +int libparsepsf_parse_font(const void *data, size_t size, struct libparsepsf_font *fontp, uint32_t *unrecognised_versionp); +size_t libparsepsf_get_glyph(const struct libparsepsf_font *font, const char *c, size_t *remp, const char **next_cp); + +#endif -- cgit v1.2.3-70-g09d2