summaryrefslogtreecommitdiffstats
path: root/libass/ass_fontselect.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2011-08-17 18:59:00 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:42:40 +0200
commit38f4a39bdbe6090d39e86b620c772ba5cd88c8a5 (patch)
tree8e67b50042c1c732c3100838eb22e4dcd90545dd /libass/ass_fontselect.h
parentd5091c88d10cbea95f3e45b31a8738d7cd8e3819 (diff)
downloadlibass-38f4a39bdbe6090d39e86b620c772ba5cd88c8a5.tar.bz2
libass-38f4a39bdbe6090d39e86b620c772ba5cd88c8a5.tar.xz
Never add a face twice to an ASS_Font
Introduce a unique ID per font face and check it in add_face to make sure we never add a font face twice. This is useful in case the glyph coverage report is unreliable.
Diffstat (limited to 'libass/ass_fontselect.h')
-rw-r--r--libass/ass_fontselect.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/libass/ass_fontselect.h b/libass/ass_fontselect.h
index 09c606b..43a32fb 100644
--- a/libass/ass_fontselect.h
+++ b/libass/ass_fontselect.h
@@ -20,15 +20,18 @@
#define LIBASS_FONTCONFIG_H
#include <stdint.h>
-#include "ass_types.h"
-#include "ass.h"
#include <ft2build.h>
#include FT_FREETYPE_H
+typedef struct ass_shaper_font_data ASS_ShaperFontData;
typedef struct font_selector ASS_FontSelector;
typedef struct font_provider ASS_FontProvider;
typedef struct font_info ASS_FontInfo;
+#include "ass_types.h"
+#include "ass.h"
+#include "ass_font.h"
+
// get face data
typedef void *(*GetFaceFunc)(void *);
@@ -58,9 +61,8 @@ ASS_FontSelector *
ass_fontselect_init(ASS_Library *library,
FT_Library ftlibrary, const char *family,
const char *path);
-char *ass_font_select(ASS_FontSelector *priv, ASS_Library *lib,
- const char *family, unsigned bold, unsigned italic,
- int *index, uint32_t code);
+char *ass_font_select(ASS_FontSelector *priv, ASS_Library *library,
+ ASS_Font *font, int *index, int *uid, uint32_t code);
void ass_fontselect_free(ASS_FontSelector *priv);
// Font provider functions