diff options
author | feliwir <stephan.vedder@gmail.com> | 2015-05-19 11:46:37 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@chown.ath.cx> | 2015-07-10 10:42:40 +0200 |
commit | 29fd129671bb66a2e54717ca666b6ccd7f7ee941 (patch) | |
tree | d9bf30c9deed976780b923e9655fdd20af59f906 /libass/ass_fontselect.c | |
parent | efcb9c17e8da4f09f1aea795f081aebd9a04e8e2 (diff) | |
download | libass-29fd129671bb66a2e54717ca666b6ccd7f7ee941.tar.bz2 libass-29fd129671bb66a2e54717ca666b6ccd7f7ee941.tar.xz |
directwrite: add initial fontselect implementation
Incomplete, leaks memory, but capable of rendering something.
Diffstat (limited to 'libass/ass_fontselect.c')
-rw-r--r-- | libass/ass_fontselect.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index bc1dec5..174fe1d 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -38,6 +38,7 @@ #include "ass_fontselect.h" #include "ass_fontconfig.h" #include "ass_coretext.h" +#include "ass_directwrite.h" #include "ass_font.h" #define ABS(x) ((x) < 0 ? -(x) : (x)) @@ -236,6 +237,24 @@ ass_font_provider_add_font(ASS_FontProvider *provider, ASS_FontSelector *selector = provider->parent; ASS_FontInfo *info; +#if 0 + int j; + printf("new font:\n"); + printf(" families: "); + for (j = 0; j < meta->n_family; j++) + printf("'%s' ", meta->families[j]); + printf("\n"); + printf(" fullnames: "); + for (j = 0; j < meta->n_fullname; j++) + printf("'%s' ", meta->fullnames[j]); + printf("\n"); + printf(" slant: %d\n", meta->slant); + printf(" weight: %d\n", meta->weight); + printf(" width: %d\n", meta->width); + printf(" path: %s\n", path); + printf(" index: %d\n", index); +#endif + weight = meta->weight; slant = meta->slant; width = meta->width; @@ -804,6 +823,9 @@ struct font_constructors font_constructors[] = { #ifdef CONFIG_FONTCONFIG { ASS_FONTPROVIDER_FONTCONFIG, &ass_fontconfig_add_provider }, #endif +#ifdef CONFIG_DIRECTWRITE + { ASS_FONTPROVIDER_DIRECTWRITE, &ass_directwrite_add_provider }, +#endif { ASS_FONTPROVIDER_NONE, NULL }, }; |