diff options
author | Mattias Andrée <maandree@kth.se> | 2021-08-13 16:57:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-08-13 16:57:18 +0200 |
commit | 513ee4f15567048b619848edb092cdc4f33fe1c0 (patch) | |
tree | 46a58fa34f1bd5307e4e4267f53c8db1f62acfde /libparsepsf.h | |
download | libparsepsf-513ee4f15567048b619848edb092cdc4f33fe1c0.tar.gz libparsepsf-513ee4f15567048b619848edb092cdc4f33fe1c0.tar.bz2 libparsepsf-513ee4f15567048b619848edb092cdc4f33fe1c0.tar.xz |
First commit1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libparsepsf.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 <stdint.h> +#include <stddef.h> + + +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 |