summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-05 00:55:13 +0200
committerwm4 <wm4@nowhere>2014-06-05 01:15:14 +0200
commitdcecb9cba3ab2e9c1d082c9860aecb9e437e40f6 (patch)
treec366e02227a4814504f7911d0f6e2d48f5ec0ff4 /libass/ass_render.h
parent4a4e464d1dadce90bc91dce5448890e987019d89 (diff)
downloadlibass-dcecb9cba3ab2e9c1d082c9860aecb9e437e40f6.tar.bz2
libass-dcecb9cba3ab2e9c1d082c9860aecb9e437e40f6.tar.xz
Add a mechanism for selective style overrides
This adds 2 new API functions: ass_set_selective_style_override() ass_set_selective_style_override_enabled() They can be used to force dialog text to use a specific ASS_Style. It uses a fuzzy heuristic for that, and the quality of results may vary. It does style overriding selectively and tries not to override things that need explicit styling. The heuristic for that isn't set in stone either, and can change with future libass versions. Closes libass#88.
Diffstat (limited to 'libass/ass_render.h')
-rw-r--r--libass/ass_render.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libass/ass_render.h b/libass/ass_render.h
index 8e15ad5..e1b42b2 100644
--- a/libass/ass_render.h
+++ b/libass/ass_render.h
@@ -85,6 +85,7 @@ typedef struct {
double par; // user defined pixel aspect ratio (0 = unset)
ASS_Hinting hinting;
ASS_ShapingLevel shaper;
+ int selective_style_overrides;
char *default_font;
char *default_family;
@@ -294,6 +295,9 @@ typedef struct {
int treat_family_as_pattern;
int wrap_style;
int font_encoding;
+
+ // used to store RenderContext.style when doing selective style overrides
+ ASS_Style override_style_temp_storage;
} RenderContext;
typedef struct {
@@ -360,6 +364,8 @@ struct ass_renderer {
FreeList *free_head;
FreeList *free_tail;
+
+ ASS_Style user_override_style;
};
typedef struct render_priv {