wm4 [Fri, 6 Mar 2015 12:14:39 +0000 (13:14 +0100)]
Refine list of tags that prevent selective style overrides
Somewhat stolen from:
https://github.com/Cyberbeing/xy-VSFilter/blob/xy_sub_filter_rc3/src/subtitles/RTS.cpp#L2004
(xy-VSFilter started work on this in commit 014da6d9766417d7886eb867c9f2c14038f2a226)
wm4 [Thu, 26 Feb 2015 19:49:18 +0000 (20:49 +0100)]
Allow more fine grained control over style overrides
Add tons of ASS_OVERRIDE_ flags, which control whether certain ASS_Style
fields are copied when doing selective style overrides with
ass_set_selective_style_override_enabled().
This comes with some cleanup. It should be fully backwards-compatible.
wm4 [Thu, 26 Feb 2015 19:49:10 +0000 (20:49 +0100)]
Always use the new style with \r and style overrides
I don't know why it was done this way, but some fields were always taken
from the event's style, instead of the (possibly different) \r style.
Undo this, as it seems like an unnecessary complication.
Dr.Smile [Fri, 23 Jan 2015 03:32:16 +0000 (06:32 +0300)]
Clean up bitmap combining
Now pre- and post-combining operations are clearly separated,
many parameters in cache keys are no longer necessary due to that.
Also an ambiguous (in case of multiple fonts) text string is replaced
with a list of direct bitmap references in composite cache key.
Oleg Oshmyan [Fri, 16 Jan 2015 11:26:13 +0000 (13:26 +0200)]
Add extern "C" guard to public header
Our public headers can be #included from C++. Hence, ass.h needs
an extern "C" guard to declare the correct linkage for functions.
ass_types.h only defines types, so it does not need a guard.
wm4 [Sun, 16 Nov 2014 16:23:12 +0000 (17:23 +0100)]
Check bitmap allocation for overflows
This actually fixes #146.
The overflow check itself is obvious. Also, make ass_align() return an
unaligned value if aligning it would overflow. This is probably better,
as it for example makes the overflow check in the caller simpler.
wm4 [Fri, 14 Nov 2014 00:45:09 +0000 (01:45 +0100)]
Fix the bug
Commit 8536eaa was slightly broken: for some incomprehensible reason,
(w + 1) memory instead of w is needed. The missing space could lead to
memory corruption and crashes.
wm4 [Thu, 16 Oct 2014 23:26:30 +0000 (01:26 +0200)]
Silence compilation warning
This fixes the following warnings:
In file included from ass_cache.c:34:0:
ass_cache_template.h:52:0: warning: "BINSTRING" redefined
#define BINSTRING(member) \
^
In file included from ass_cache.h:59:0,
from ass_font.h:58,
from ass_cache.c:28:
ass_cache_template.h:9:0: note: this is the location of the previous definition
#define BINSTRING(member) \
^
In file included from ass_cache.c:36:0:
ass_cache_template.h:30:0: warning: "BINSTRING" redefined
#define BINSTRING(member) \
^
In file included from ass_cache.c:34:0:
ass_cache_template.h:52:0: note: this is the location of the previous definition
#define BINSTRING(member) \
^
Oleg Oshmyan [Thu, 29 May 2014 23:01:41 +0000 (00:01 +0100)]
Use ass_drawing_add_chars for vector drawings
This not only provides a performance improvement but also
conveniently fixes the following issue: we used to interpret
backslash-escapes in vector drawings, but we shouldn't.
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.
wm4 [Sat, 31 May 2014 21:19:45 +0000 (23:19 +0200)]
Fix change detection when text is clipped to screen
The glyphs are clipped before combining, so the combined bitmap can
always have the same position, size, and address. This breaks the
change detection. Or at least I think that's what happens.
Grigori Goronzy [Thu, 29 May 2014 01:59:08 +0000 (03:59 +0200)]
shaper: add FriBidi error handling
It is unlikely, but FriBidi might not process a string correctly,
and we should handle that. Tested by making it fail always. This
should also fix some compiler warnings.
Oleg Oshmyan [Thu, 1 May 2014 01:38:33 +0000 (02:38 +0100)]
Reset clipping mode on every rectangle \clip
Prior to this fix, both of the following:
\iclip(0,0,9999,9999)\clip(0,0,9999,9999)
\iclip(0,0,0,0)\clip(0,0,9999,9999)
hid the whole picture in libass. The correct behavior
in both cases is to display the whole picture.