summaryrefslogtreecommitdiffstats
path: root/libass/ass_fontconfig.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2011-08-07 02:21:09 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:41:01 +0200
commitc22a4ff9a395546637dbe0f1e9d0ee549dd0069a (patch)
tree40540f98c0faed9e3bac99ecc5caa0ef16b3aa92 /libass/ass_fontconfig.h
parentd787615845d78d8f8e6d1a4ffc3dc3eecd8a92f6 (diff)
downloadlibass-c22a4ff9a395546637dbe0f1e9d0ee549dd0069a.tar.bz2
libass-c22a4ff9a395546637dbe0f1e9d0ee549dd0069a.tar.xz
Custom font matching and font sources
Implement a simple font sorter (FontSelector) and an interface to deal with multiple font sources (FontProvider). Unfinished business, but works for the most part. Currently the only implemented FontProvider uses fontconfig.
Diffstat (limited to 'libass/ass_fontconfig.h')
-rw-r--r--libass/ass_fontconfig.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/libass/ass_fontconfig.h b/libass/ass_fontconfig.h
index 396fb72..6d4f5e9 100644
--- a/libass/ass_fontconfig.h
+++ b/libass/ass_fontconfig.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
+ * Copyright (C) 2011 Grigori Goronzy <greg@chown.ath.cx>
*
* This file is part of libass.
*
@@ -16,30 +16,20 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef LIBASS_FONTCONFIG_H
-#define LIBASS_FONTCONFIG_H
+#include "config.h"
-#include <stdint.h>
#include "ass_types.h"
-#include "ass.h"
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include "ass_fontselect.h"
+
+#ifndef ASS_FONTCONFIG_H
+#define ASS_FONTCONFIG_H
#ifdef CONFIG_FONTCONFIG
-#include <fontconfig/fontconfig.h>
-#endif
-typedef struct fc_instance FCInstance;
+ASS_FontProvider *
+ass_fontconfig_add_provider(ASS_Library *lib, ASS_FontSelector *selector,
+ const char *config);
-FCInstance *fontconfig_init(ASS_Library *library,
- FT_Library ftlibrary, const char *family,
- const char *path, int fc, const char *config,
- int update);
-char *fontconfig_select(ASS_Library *library, FCInstance *priv,
- const char *family, int treat_family_as_pattern,
- unsigned bold, unsigned italic, int *index,
- uint32_t code);
-void fontconfig_done(FCInstance *priv);
-int fontconfig_update(FCInstance *priv);
+#endif
-#endif /* LIBASS_FONTCONFIG_H */
+#endif