summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorDr.Smile <vabnick@gmail.com>2021-11-11 05:42:40 +0300
committerDr.Smile <vabnick@gmail.com>2022-03-31 17:00:21 +0300
commitf664ced049394e2a5d4300ba526e206df73ec729 (patch)
tree7c527c1e81c570289819f913c85b03e6fc32734f /libass/ass.h
parent42f1fa1b2e5128f8dbb99b7da5f2665b78de0046 (diff)
downloadlibass-f664ced049394e2a5d4300ba526e206df73ec729.tar.bz2
libass-f664ced049394e2a5d4300ba526e206df73ec729.tar.xz
Add partial unicode support for Windows
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 60b8453..18aa419 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -24,7 +24,7 @@
#include <stdarg.h>
#include "ass_types.h"
-#define LIBASS_VERSION 0x01502001
+#define LIBASS_VERSION 0x01502002
#ifdef __cplusplus
extern "C" {
@@ -283,6 +283,11 @@ void ass_library_done(ASS_Library *priv);
* Optional directory that will be scanned for fonts. The fonts
* found are used for font lookup.
* NOTE: A valid font directory is not needed to support embedded fonts.
+ * On Microsoft Windows, when using WIN32-APIs, fonts_dir must be in either
+ * UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8
+ * or the encoding accepted by fopen with the former taking precedence
+ * if both versions are valid and exist.
+ * On all other systems there is no need for special considerations like that.
*
* \param priv library handle
* \param fonts_dir directory with additional fonts
@@ -510,7 +515,7 @@ void ass_get_available_font_providers(ASS_Library *priv,
* If the requested fontprovider does not exist or fails to initialize, the
* behavior is the same as when ASS_FONTPROVIDER_NONE was passed.
* \param config path to fontconfig configuration file, or NULL. Only relevant
- * if fontconfig is used.
+ * if fontconfig is used. The encoding must match the one accepted by fontconfig.
* \param update whether fontconfig cache should be built/updated now. Only
* relevant if fontconfig is used.
*
@@ -701,6 +706,11 @@ void ass_flush_events(ASS_Track *track);
* \param fname file name
* \param codepage encoding (iconv format)
* \return newly allocated track or NULL on failure
+ * NOTE: On Microsoft Windows, when using WIN32-APIs, fname must be in either
+ * UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8
+ * or the encoding accepted by fopen with the former taking precedence
+ * if both versions are valid and exist.
+ * On all other systems there is no need for special considerations like that.
*/
ASS_Track *ass_read_file(ASS_Library *library, char *fname,
char *codepage);
@@ -720,6 +730,11 @@ ASS_Track *ass_read_memory(ASS_Library *library, char *buf,
* \param fname file name
* \param codepage encoding (iconv format)
* \return 0 on success
+ * NOTE: On Microsoft Windows, when using WIN32-APIs, fname must be in either
+ * UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8
+ * or the encoding accepted by fopen with the former taking precedence
+ * if both versions are valid and exist.
+ * On all other systems there is no need for special considerations like that.
*/
int ass_read_styles(ASS_Track *track, char *fname, char *codepage);