From 26bc1384c1163601af5902435bc3bc2c59855e97 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 17 Jan 2023 20:21:10 +0100 Subject: Add libfonts_char_is_in_subset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libfonts.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libfonts.h') diff --git a/libfonts.h b/libfonts.h index e20152f..a79941e 100644 --- a/libfonts.h +++ b/libfonts.h @@ -1826,6 +1826,23 @@ int libfonts_parse_alias_line(enum libfonts_alias_line_type *, char **, char **, */ int libfonts_parse_dir_line(char **, char **, const char *, char **); +/** + * Sets if a specific character is in a subset of + * of character set + * + * @param c The character to test; it is assumed that + * it is a member of the complete character set + * @param subset The subset (of the complete character set) + * to test against; shall be formatted as + * `struct libfonts_font_description.charset_subset` + * @return 1 if the character is a member of the subset, + * or `subset` is `NULL`, 0 otherwise; -1 on failure + * + * @throws EINVAL If `c` is equal to greater than 0x80000000 + * @throws EINVAL If `subset` is invalid + */ +int libfonts_char_is_in_subset(uint32_t, const char *); + /* TODO add font listing */ -- cgit v1.2.3-70-g09d2