From 4803b0a7bc9fee78e9eafb7417fa20f9a21d675f Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sat, 20 Aug 2011 18:19:25 +0200 Subject: Export font provider interface Add wrapper to the ASS_Renderer to create a font provider from its internal font selector and shuffle some code around to export everything that's needed for font providers to the public. Document font provider functions. --- libass/ass_types.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index ccb0a0e6..01e73061 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006 Evgeniy Stepanov + * Copyright (C) 2011 Grigori Goronzy * * This file is part of libass. * @@ -28,11 +29,47 @@ #define HALIGN_CENTER 2 #define HALIGN_RIGHT 3 +#define FONT_WEIGHT_LIGHT 300 +#define FONT_WEIGHT_MEDIUM 400 +#define FONT_WEIGHT_BOLD 700 +#define FONT_SLANT_NONE 0 +#define FONT_SLANT_ITALIC 100 +#define FONT_SLANT_OBLIQUE 110 + + /* Opaque objects internally used by libass. Contents are private. */ typedef struct ass_renderer ASS_Renderer; typedef struct render_priv ASS_RenderPriv; typedef struct parser_priv ASS_ParserPriv; typedef struct ass_library ASS_Library; +typedef struct font_provider ASS_FontProvider; + + +/* Font Provider */ +typedef void *(*GetFaceFunc)(void *, size_t *); +typedef int (*CheckGlyphFunc)(void *, uint32_t); +typedef void (*DestroyFontFunc)(void *); +typedef void (*DestroyProviderFunc)(void *); + +typedef struct font_provider_funcs { + GetFaceFunc get_face; // callback for memory fonts + CheckGlyphFunc check_glyph; // test codepoint for coverage + DestroyFontFunc destroy_font; // destroy a single font + DestroyProviderFunc destroy_provider; // destroy provider only +} ASS_FontProviderFuncs; + +/* + * Basic font metadata. All strings must be encoded with UTF-8. + * At minimum `family' is required. + */ +typedef struct font_provider_meta_data { + char *family; // English font family, e.g. "Arial" + char **fullnames; // list of localized full names, e.g. "Arial Bold" + int n_fullname; // number of localized full names + int slant; // uses the above scale (NONE/ITALIC/OBLIQUE) + int weight; // TrueType scale, 100-900 +} ASS_FontProviderMetaData; + /* ASS Style: line */ typedef struct ass_style { @@ -63,6 +100,7 @@ typedef struct ass_style { double Blur; } ASS_Style; + /* * ASS_Event corresponds to a single Dialogue line; * text is stored as-is, style overrides will be parsed later. -- cgit v1.2.3 From e87063d873b88427ffad038fcfbbe7e7a0b7437d Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Wed, 24 Aug 2011 14:23:01 +0200 Subject: Use streamed access for memory fonts This is faster in many cases, and more suitable for Windows' GetFontData function. --- libass/ass_types.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index 01e73061..f52e5370 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -46,13 +46,13 @@ typedef struct font_provider ASS_FontProvider; /* Font Provider */ -typedef void *(*GetFaceFunc)(void *, size_t *); -typedef int (*CheckGlyphFunc)(void *, uint32_t); -typedef void (*DestroyFontFunc)(void *); -typedef void (*DestroyProviderFunc)(void *); +typedef size_t (*GetDataFunc)(void *, unsigned char*, size_t, size_t); +typedef int (*CheckGlyphFunc)(void *, uint32_t); +typedef void (*DestroyFontFunc)(void *); +typedef void (*DestroyProviderFunc)(void *); typedef struct font_provider_funcs { - GetFaceFunc get_face; // callback for memory fonts + GetDataFunc get_data; // callback for memory fonts CheckGlyphFunc check_glyph; // test codepoint for coverage DestroyFontFunc destroy_font; // destroy a single font DestroyProviderFunc destroy_provider; // destroy provider only -- cgit v1.2.3 From 09edb29ea61785570d612b9fb246ddea93173bac Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sat, 3 Sep 2011 15:20:00 +0200 Subject: Add support for font width property Add a width field to metadata. This is used for sorting fonts as well. Fixes wrong matches with different width variants in the same font family. --- libass/ass_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index f52e5370..8411348a 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -35,6 +35,9 @@ #define FONT_SLANT_NONE 0 #define FONT_SLANT_ITALIC 100 #define FONT_SLANT_OBLIQUE 110 +#define FONT_WIDTH_CONDENSED 75 +#define FONT_WIDTH_NORMAL 100 +#define FONT_WIDTH_EXPANDED 125 /* Opaque objects internally used by libass. Contents are private. */ @@ -68,6 +71,7 @@ typedef struct font_provider_meta_data { int n_fullname; // number of localized full names int slant; // uses the above scale (NONE/ITALIC/OBLIQUE) int weight; // TrueType scale, 100-900 + int width; // in percent, normally 100 } ASS_FontProviderMetaData; -- cgit v1.2.3 From 33f5954eb6849ac228491b729bcc11e922f62060 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sun, 4 Sep 2011 15:54:38 +0200 Subject: Support multiple font family names Some fonts use localized family names, especially CJK fonts, which often have English and Japanese or Chinese names. Handle these cases just like full names. --- libass/ass_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index 8411348a..7d1e4989 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -66,8 +66,9 @@ typedef struct font_provider_funcs { * At minimum `family' is required. */ typedef struct font_provider_meta_data { - char *family; // English font family, e.g. "Arial" + char **families; // list of family names, e.g. "Arial" char **fullnames; // list of localized full names, e.g. "Arial Bold" + int n_family; // list of family names int n_fullname; // number of localized full names int slant; // uses the above scale (NONE/ITALIC/OBLIQUE) int weight; // TrueType scale, 100-900 -- cgit v1.2.3 From c75e58151aadc7179255d7c5c09aa61acf695d56 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Tue, 18 Oct 2011 16:28:51 +0200 Subject: Add todo comments --- libass/ass_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index 7d1e4989..16c970db 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -59,6 +59,7 @@ typedef struct font_provider_funcs { CheckGlyphFunc check_glyph; // test codepoint for coverage DestroyFontFunc destroy_font; // destroy a single font DestroyProviderFunc destroy_provider; // destroy provider only + // XXX: add function for alias handling } ASS_FontProviderFuncs; /* -- cgit v1.2.3 From b0776d353f8c3396165effd21e113c4f225daa0d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 2 Nov 2013 22:01:37 +0100 Subject: fontselect: coretext: allow to match fontname using the provider Not all APIs cache everything the same way that fontconfig does. This allows to first perform a match based on the font name and then score the matched fonts using the common code using and in memory database approach. The benefit is the application doesn't have to load all of the fonts and query for weight, slant, width, path and fullnames. I left both code paths inside ass_coretext.c. This allows to test matching problems and have a term of comparison with the slower implementation. To activate it one just has to flip the CT_FONTS_EAGER_LOAD define to 1. Here are some benchmarks with a pretty typical OS X font library of ~600 fonts and using Libass's test program to load a script with 'Helvetica Neue': CT_FONTS_EAGER_LOAD=0 0.04s user 0.02s system 79% cpu 0.081 total CT_FONTS_EAGER_LOAD=1 0.12s user 0.06s system 44% cpu 0.420 total --- libass/ass_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index 16c970db..e7f4ec54 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -53,12 +53,16 @@ typedef size_t (*GetDataFunc)(void *, unsigned char*, size_t, size_t); typedef int (*CheckGlyphFunc)(void *, uint32_t); typedef void (*DestroyFontFunc)(void *); typedef void (*DestroyProviderFunc)(void *); +typedef void (*MatchFontsFunc)(ASS_Library *lib, + ASS_FontProvider *provider, + char *name); typedef struct font_provider_funcs { GetDataFunc get_data; // callback for memory fonts CheckGlyphFunc check_glyph; // test codepoint for coverage DestroyFontFunc destroy_font; // destroy a single font DestroyProviderFunc destroy_provider; // destroy provider only + MatchFontsFunc match_fonts; // match fonts against some name // XXX: add function for alias handling } ASS_FontProviderFuncs; -- cgit v1.2.3 From 9f37df904f9a68b4db012c88712791fb10d94189 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 8 Jun 2015 23:21:50 +0200 Subject: fontselect: add documentation Add some documentation to the font provider callbacks and metadata struct. --- libass/ass_types.h | 93 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 17 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index e7f4ec54..c1a14b43 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -49,35 +49,94 @@ typedef struct font_provider ASS_FontProvider; /* Font Provider */ -typedef size_t (*GetDataFunc)(void *, unsigned char*, size_t, size_t); -typedef int (*CheckGlyphFunc)(void *, uint32_t); -typedef void (*DestroyFontFunc)(void *); -typedef void (*DestroyProviderFunc)(void *); + +/** + * Get font data. This is a stream interface which can be used as an + * alternative to providing a font path (which may not be available). + * + * This is called by fontselect if a given font was added without a + * font path (i.e. the path was set to NULL). + * + * \param font_priv font private data + * \param output buffer; set to NULL to query stream size + * \param offset stream offset + * \param len bytes to read into output buffer from stream + * \return actual number of bytes read, or stream size if data == NULL + */ +typedef size_t (*GetDataFunc)(void *font_priv, unsigned char *data, + size_t offset, size_t len); + +/** + * Check if a glyph is supported by a font. + * + * \param font_priv font private data + * \param codepont Unicode codepoint (UTF-32) + * \return non-zero value if codepoint is supported by the font + */ +typedef int (*CheckGlyphFunc)(void *font_priv, uint32_t codepoint); + +/** + * Destroy a font's private data. + * + * \param font_priv font private data + */ +typedef void (*DestroyFontFunc)(void *font_priv); + +/** + * Destroy a font provider's private data. + * + * \param priv font provider private data + */ +typedef void (*DestroyProviderFunc)(void *priv); + +/** + * Add fonts for a given font name; this should add all fonts matching the + * given name to the fontselect database. + * + * This is called by fontselect whenever a new logical font is created. The + * font provider set as default is used. + * + * \param lib ASS_Library instance + * \param provider font provider instance + * \param name font name (as specified in script) + */ typedef void (*MatchFontsFunc)(ASS_Library *lib, ASS_FontProvider *provider, char *name); typedef struct font_provider_funcs { - GetDataFunc get_data; // callback for memory fonts - CheckGlyphFunc check_glyph; // test codepoint for coverage - DestroyFontFunc destroy_font; // destroy a single font - DestroyProviderFunc destroy_provider; // destroy provider only - MatchFontsFunc match_fonts; // match fonts against some name + GetDataFunc get_data; + CheckGlyphFunc check_glyph; + DestroyFontFunc destroy_font; + DestroyProviderFunc destroy_provider; + MatchFontsFunc match_fonts; // XXX: add function for alias handling } ASS_FontProviderFuncs; /* * Basic font metadata. All strings must be encoded with UTF-8. - * At minimum `family' is required. + * At minimum one family is required. */ typedef struct font_provider_meta_data { - char **families; // list of family names, e.g. "Arial" - char **fullnames; // list of localized full names, e.g. "Arial Bold" - int n_family; // list of family names - int n_fullname; // number of localized full names - int slant; // uses the above scale (NONE/ITALIC/OBLIQUE) - int weight; // TrueType scale, 100-900 - int width; // in percent, normally 100 + + /** + * List of localized font family names, e.g. "Arial". + */ + char **families; + + /** + * List of localized full names, e.g. "Arial Bold". + * The English name should be listed first to speed up typical matching. + */ + char **fullnames; + int n_family; // Number of localized family names + int n_fullname; // Number of localized full names + + int slant; // Font slant value from FONT_SLANT_* + int weight; // Font weight in TrueType scale, 100-900 + // See FONT_WEIGHT_* + int width; // Font weight in percent, normally 100 + // See FONT_WIDTH_* } ASS_FontProviderMetaData; -- cgit v1.2.3 From faa5203fe181e50ce1377f09e451e90906ffe9e3 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Tue, 9 Jun 2015 01:20:28 +0200 Subject: fontselect: add fallback and substitution callbacks Add callbacks to introduce more sane fallback handling and font alias substitutions. --- libass/ass_types.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 7 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index c1a14b43..545724da 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -47,8 +47,8 @@ typedef struct parser_priv ASS_ParserPriv; typedef struct ass_library ASS_Library; typedef struct font_provider ASS_FontProvider; - /* Font Provider */ +typedef struct font_provider_meta_data ASS_FontProviderMetaData; /** * Get font data. This is a stream interface which can be used as an @@ -104,13 +104,55 @@ typedef void (*MatchFontsFunc)(ASS_Library *lib, ASS_FontProvider *provider, char *name); +/** + * Substitute font name by another. This implements generic font family + * substitutions (e.g. sans-serif, serif, monospace) as well as font aliases. + * + * The generic families should map to sensible platform-specific font families. + * Aliases are sometimes used to map from common fonts that don't exist on + * a particular platform to similar alternatives. For example, a Linux + * system with fontconfig may map "Arial" to "Liberation Sans" and Windows + * maps "Helvetica" to "Arial". + * + * This is called by fontselect when a new logical font is created. The font + * provider set as default is used. + * + * \param priv font provider private data + * \param name input string for substitution, as specified in the script + * \return output string for substitution, allocated with malloc(), must be + * freed by caller, can be NULL if no substitution was done. + */ +typedef char *(*SubstituteFontFunc)(void *priv, const char *name); + +/** + * Get an appropriate fallback font for a given codepoint. + * + * This is called by fontselect whenever a glyph is not found in the + * physical font list of a logical font. fontselect will try to add the + * font family with match_fonts if it does not exist in the font list + * add match_fonts is not NULL. Note that the returned font family should + * contain the requested codepoint. + * + * Note that fontselect uses the font provider set as default to determine + * fallbacks. + * + * \param font_priv font private data + * \param codepoint Unicode codepoint (UTF-32) + * \return output font family, allocated with malloc(), must be freed + * by caller. + */ +typedef char *(*GetFallbackFunc)(void *font_priv, + ASS_FontProviderMetaData *meta, + uint32_t codepoint); + typedef struct font_provider_funcs { - GetDataFunc get_data; - CheckGlyphFunc check_glyph; - DestroyFontFunc destroy_font; - DestroyProviderFunc destroy_provider; - MatchFontsFunc match_fonts; - // XXX: add function for alias handling + GetDataFunc get_data; /* optional/mandatory */ + CheckGlyphFunc check_glyph; /* mandatory */ + DestroyFontFunc destroy_font; /* optional */ + DestroyProviderFunc destroy_provider; /* optional */ + MatchFontsFunc match_fonts; /* optional */ + SubstituteFontFunc subst_font; /* optional */ + GetFallbackFunc fallback_font; /* optional */ } ASS_FontProviderFuncs; /* -- cgit v1.2.3 From baa5823cb56d86512a38fe8354fee1ca07627c9f Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 4 Aug 2015 11:33:40 +0200 Subject: Fix typedefs --- libass/ass_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index 545724da..bc0efd8a 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -48,7 +48,7 @@ typedef struct ass_library ASS_Library; typedef struct font_provider ASS_FontProvider; /* Font Provider */ -typedef struct font_provider_meta_data ASS_FontProviderMetaData; +typedef struct ass_font_provider_meta_data ASS_FontProviderMetaData; /** * Get font data. This is a stream interface which can be used as an @@ -159,7 +159,7 @@ typedef struct font_provider_funcs { * Basic font metadata. All strings must be encoded with UTF-8. * At minimum one family is required. */ -typedef struct font_provider_meta_data { +struct ass_font_provider_meta_data { /** * List of localized font family names, e.g. "Arial". @@ -179,7 +179,7 @@ typedef struct font_provider_meta_data { // See FONT_WEIGHT_* int width; // Font weight in percent, normally 100 // See FONT_WIDTH_* -} ASS_FontProviderMetaData; +}; /* ASS Style: line */ -- cgit v1.2.3 From 5c7e811cce10489d8762ee51eb3d390dfc33cbef Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Thu, 6 Aug 2015 04:35:56 +0200 Subject: fontconfig: implement substitutions Signed-off-by: wm4 --- libass/ass_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index bc0efd8a..f56a754c 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -119,10 +119,10 @@ typedef void (*MatchFontsFunc)(ASS_Library *lib, * * \param priv font provider private data * \param name input string for substitution, as specified in the script - * \return output string for substitution, allocated with malloc(), must be - * freed by caller, can be NULL if no substitution was done. + * \param meta metadata (fullnames and n_fullname) to be filled in */ -typedef char *(*SubstituteFontFunc)(void *priv, const char *name); +typedef void (*SubstituteFontFunc)(void *priv, const char *name, + ASS_FontProviderMetaData *meta); /** * Get an appropriate fallback font for a given codepoint. -- cgit v1.2.3 From cde3b40bce6b544d9f4a9fa695f316bae5aaa84f Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Aug 2015 14:51:09 +0200 Subject: ass: make font_provider API private We were discussing whether this should be public or private. It could be public, because the API is potentially useful, and is relatively simple. On the other hand, the API is not necessarily final, and making it public would prevent us from improving/fixing it. Make it private for now - making it public later is much easier than having to break the public API later. --- libass/ass_types.h | 136 ----------------------------------------------------- 1 file changed, 136 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index f56a754c..f4a6ae5e 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -45,142 +45,6 @@ typedef struct ass_renderer ASS_Renderer; typedef struct render_priv ASS_RenderPriv; typedef struct parser_priv ASS_ParserPriv; typedef struct ass_library ASS_Library; -typedef struct font_provider ASS_FontProvider; - -/* Font Provider */ -typedef struct ass_font_provider_meta_data ASS_FontProviderMetaData; - -/** - * Get font data. This is a stream interface which can be used as an - * alternative to providing a font path (which may not be available). - * - * This is called by fontselect if a given font was added without a - * font path (i.e. the path was set to NULL). - * - * \param font_priv font private data - * \param output buffer; set to NULL to query stream size - * \param offset stream offset - * \param len bytes to read into output buffer from stream - * \return actual number of bytes read, or stream size if data == NULL - */ -typedef size_t (*GetDataFunc)(void *font_priv, unsigned char *data, - size_t offset, size_t len); - -/** - * Check if a glyph is supported by a font. - * - * \param font_priv font private data - * \param codepont Unicode codepoint (UTF-32) - * \return non-zero value if codepoint is supported by the font - */ -typedef int (*CheckGlyphFunc)(void *font_priv, uint32_t codepoint); - -/** - * Destroy a font's private data. - * - * \param font_priv font private data - */ -typedef void (*DestroyFontFunc)(void *font_priv); - -/** - * Destroy a font provider's private data. - * - * \param priv font provider private data - */ -typedef void (*DestroyProviderFunc)(void *priv); - -/** - * Add fonts for a given font name; this should add all fonts matching the - * given name to the fontselect database. - * - * This is called by fontselect whenever a new logical font is created. The - * font provider set as default is used. - * - * \param lib ASS_Library instance - * \param provider font provider instance - * \param name font name (as specified in script) - */ -typedef void (*MatchFontsFunc)(ASS_Library *lib, - ASS_FontProvider *provider, - char *name); - -/** - * Substitute font name by another. This implements generic font family - * substitutions (e.g. sans-serif, serif, monospace) as well as font aliases. - * - * The generic families should map to sensible platform-specific font families. - * Aliases are sometimes used to map from common fonts that don't exist on - * a particular platform to similar alternatives. For example, a Linux - * system with fontconfig may map "Arial" to "Liberation Sans" and Windows - * maps "Helvetica" to "Arial". - * - * This is called by fontselect when a new logical font is created. The font - * provider set as default is used. - * - * \param priv font provider private data - * \param name input string for substitution, as specified in the script - * \param meta metadata (fullnames and n_fullname) to be filled in - */ -typedef void (*SubstituteFontFunc)(void *priv, const char *name, - ASS_FontProviderMetaData *meta); - -/** - * Get an appropriate fallback font for a given codepoint. - * - * This is called by fontselect whenever a glyph is not found in the - * physical font list of a logical font. fontselect will try to add the - * font family with match_fonts if it does not exist in the font list - * add match_fonts is not NULL. Note that the returned font family should - * contain the requested codepoint. - * - * Note that fontselect uses the font provider set as default to determine - * fallbacks. - * - * \param font_priv font private data - * \param codepoint Unicode codepoint (UTF-32) - * \return output font family, allocated with malloc(), must be freed - * by caller. - */ -typedef char *(*GetFallbackFunc)(void *font_priv, - ASS_FontProviderMetaData *meta, - uint32_t codepoint); - -typedef struct font_provider_funcs { - GetDataFunc get_data; /* optional/mandatory */ - CheckGlyphFunc check_glyph; /* mandatory */ - DestroyFontFunc destroy_font; /* optional */ - DestroyProviderFunc destroy_provider; /* optional */ - MatchFontsFunc match_fonts; /* optional */ - SubstituteFontFunc subst_font; /* optional */ - GetFallbackFunc fallback_font; /* optional */ -} ASS_FontProviderFuncs; - -/* - * Basic font metadata. All strings must be encoded with UTF-8. - * At minimum one family is required. - */ -struct ass_font_provider_meta_data { - - /** - * List of localized font family names, e.g. "Arial". - */ - char **families; - - /** - * List of localized full names, e.g. "Arial Bold". - * The English name should be listed first to speed up typical matching. - */ - char **fullnames; - int n_family; // Number of localized family names - int n_fullname; // Number of localized full names - - int slant; // Font slant value from FONT_SLANT_* - int weight; // Font weight in TrueType scale, 100-900 - // See FONT_WEIGHT_* - int width; // Font weight in percent, normally 100 - // See FONT_WIDTH_* -}; - /* ASS Style: line */ typedef struct ass_style { -- cgit v1.2.3