summaryrefslogtreecommitdiffstats
path: root/libass/ass.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.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.h')
-rw-r--r--libass/ass.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass.h b/libass/ass.h
index d6728ed..1f8a506 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -453,6 +453,7 @@ ass_create_font_provider(ASS_Renderer *priv, ASS_FontProviderFuncs *funcs,
* \param meta font metadata. See struct definition for more information.
* \param path absolute path to font, or NULL for memory-based fonts
* \param index index inside a font collection file
+ * \param psname PostScript name of the face (overrides index if present)
* \param data private data for font callbacks
* \return success
*
@@ -460,7 +461,7 @@ ass_create_font_provider(ASS_Renderer *priv, ASS_FontProviderFuncs *funcs,
int
ass_font_provider_add_font(ASS_FontProvider *provider,
ASS_FontProviderMetaData *meta, const char *path,
- unsigned int index, void *data);
+ unsigned int index, const char *psname, void *data);
/**
* \brief Free font provider and associated fonts.