summaryrefslogtreecommitdiffstats
path: root/libass/ass_fontselect.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-02 12:07:07 +0100
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:42:40 +0200
commit9014b275e9e90d796bee95249a6059e4a55f3cf9 (patch)
treecb8972dc534a88fd4dc2bf3ee88a0735cdc53035 /libass/ass_fontselect.h
parentd9585a81add0a41f6a59f3c7f95bcc6182732059 (diff)
downloadlibass-9014b275e9e90d796bee95249a6059e4a55f3cf9.tar.bz2
libass-9014b275e9e90d796bee95249a6059e4a55f3cf9.tar.xz
fontselect: coretext: allow selection based on PostScript name
Up until now fontselect used the face index to identify which font to load from a font collection. While this pretty convenient when using something freetype based like fontconfig, it seems to be somewhat freetype specific. CoreText uses the PostScript name as the unique identifier of a font. This commit allows to use that instead of the index to decide which face to open with FT_New_Face. To use the PostScript name the provider must return a -1 index and the PostScript name.
Diffstat (limited to 'libass/ass_fontselect.h')
-rw-r--r--libass/ass_fontselect.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass_fontselect.h b/libass/ass_fontselect.h
index e080ab0..c1371dd 100644
--- a/libass/ass_fontselect.h
+++ b/libass/ass_fontselect.h
@@ -36,8 +36,8 @@ ass_fontselect_init(ASS_Library *library,
FT_Library ftlibrary, const char *family,
const char *path, const char *config, int fc);
char *ass_font_select(ASS_FontSelector *priv, ASS_Library *library,
- ASS_Font *font, int *index, int *uid,
- ASS_FontStream *data, uint32_t code);
+ ASS_Font *font, int *index, char **postscript_name,
+ int *uid, ASS_FontStream *data, uint32_t code);
void ass_fontselect_free(ASS_FontSelector *priv);
// Font provider functions