| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
These aren't very useful for debugging due to the high volume of the log
output in problem cases. In fact, all they do is making the code slower
(the message callback can easily appear in the profiler output, even if
the callback doesn't actually print the messages).
|
|
|
|
|
|
|
|
| |
Times in \fade(,,,-1,fadein,fadeout,-1)
are interpreted as in \fad(fadein,fadeout).
Make sure we check the times in the same
order as VSFilter in case they are not sorted.
|
|
|
|
|
| |
The end time is reset to line duration if and only if it is zero.
Negative accelerations are allowed (and can cause overflow later).
|
|
|
|
| |
Confirmed with VSFilter. This complements the previous commit.
|
|
|
|
| |
Obtained by reading the xy-VSFilter source code.
|
|
|
|
| |
The argument is a relative amount. The unit is: \fs+1 = +10%.
|
|
|
|
| |
Unlike what the cc635086 message says, VSFilter does not animate them.
|
| |
|
| |
|
|
|
|
|
| |
Make \rSTYLENAME with an invalid STYLENAME fall back to
line style rather than to Default. This fixes issue #104.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes: {\clip(1,1,20,20)\clip\alpha&H1E&\c&HC7E5C0&}X
libass tries to interpret the second \clip, which has no arguments.
Since the parsing code doesn't require a starting '(', the parser will
skip over the other tags (treating them as junk) and interpret the
numbers that happen to be in the rest of the string. The result is a
bogus drawing command, which happens to rasterize an extremely wide
glyph, which takes several seconds to finish.
Make the '(' required. Neither the aegisub manual nor the vsfilter
source code have any indication that \clip without starting '(' is
allowed, so this should not break anything.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, junk between tags is ignored. But unlike vsfilter, libass
doesn't do that inside \t tags. So the following fails and will never
actually switch the color: {\t(1000,1000,(\c&HFF0000&))} (The '(' and
')' are junk, and are not covered by any ASS documentation.)
Instead expecting that the last parameter to \t (the parameter that
takes nested tags) starts with '\', turn it around and assume that the
first parameter that's not a number is the last parameter. (This
parsing is kind of awkward because we don't do any lookahead.)
Likewise, let the nested tag parsing terminate on ')' instead of
checking whether a tag is started with '\'. This allows skipping
junk in the middle of the nested tag, without terminating too early.
(Check '}' and '\0' in case the tag is not properly terminated.)
|
|
|
|
| |
Fixes issue 90 (both cases).
|
|
|
|
|
|
|
|
|
| |
It appears VSFilter generally accepts the tag anyway if closing ')' are
missing in tags like \pos(1,2). Since they're not strictly needed
anyway, make the last ')' optional in order to make parsing more
tolerant against broken subs.
Fixes issue #79.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parsing code allowed override tags after \p0 to affect the drawing.
This is incorrect. Finish the drawing object as soon as \p0 is
encountered instead.
This requires moving the code executing the style overrides from
get_next_char() in ass_parse.c to the main render loop in
ass_renderer.c, because we have to re-enter the rendering loop
inside of a tag. The old code was simply executing all tags until
a new character could be returned to the renderer loop, mutating up
the state (RenderContext fields) for the drawing after the drawing
was closed, but before it was rendered.
This fixes libass issue #47.
|
|
|
|
|
|
|
|
|
| |
With \rSTYLE, it is possible to change the border style within the same
subtitle event. You can do this by setting a different BorderStyle value
in the newly requested style. VSFilter handles this as expected, while
libass uses a single border style for the whole subtitle event.
This fixes libass issue #56.
|
|
|
|
|
| |
Make sure to update the border appropriately in the second pass, after
parsing.
|
|
|
|
|
| |
This allows to reset to a certain style, instead of the default style
for the current line. For some reason, this was completely missing.
|
|
|
|
|
|
|
|
|
|
| |
Typical greater vs. greater-or-equal case. This especially fixes fades
with zero delays. A zero delay in the two-argument form means no fade at
all, but previously this faded over a single frame, since the code used
"greater" semantics, while "greater or equal" is required here.
Notably, this avoids blinking/flickering in some tightly timed karaoke
scripts.
|
|
|
|
|
|
|
|
|
|
| |
ASS specifies a "font encoding", both in the styles as well as with
the \fe override tag. This font encoding is very Windows-specific
and libass doesn't use it for charmap matching or anything like
that. However, it can be useful for hinting the base direction of
text. Make Hebrew and Arabic encodings switch to RTL base direction,
other languages to LTR and use neutral base direction for the
autodetect setting.
|
|
|
|
|
|
| |
Split up the combined event parsing and layout loop into two passes.
State information needed for layout are duplicated in GlyphInfo
structures.
|
|
|
|
|
|
|
|
| |
Prepare for run-based rendering. In the parser, increment a run id
according to relevant style changes (color, border, shadow, etc.) to
mark the points where a new bitmap needs to be started. Modify the line
wrapper to increment the run ids of each glyph after a break.
Add functions to calculate the render size of runs for rasterization.
|
|
|
|
|
|
|
| |
This finally gets rid of the nasty hack that manipulated a glyph
we somehow got from FreeType. Simplifies drawing handling a bit and
decouples drawing code from all font handling and related (fontconfig,
etc.) code.
|
| |
|
|
|
|
|
| |
Track if we already parsed a fade or a alignment tag and ignore all
further tags.
|
|
|
|
|
|
|
| |
These forms can be used to add or subtract a value from the
current font size instead of setting a new font size. Animations
are supported, but not recommended, as they won't be fluid due to
grid-fitting/hinting.
|
|
|
|
|
| |
The useless "if (foo) free(foo)" idiom is all over the place, just
get rid of it finally...
|
|
|
|
|
|
| |
Delay allocation of the "faux" glyph until a drawing is parsed.
This helps with fixing a (pretty bad) memory leak and also reduces frame
overhead a little.
|
|
|
|
| |
This is more irritating than it helps and can seriously spam output.
|
|
|
|
|
| |
Free clip vector drawing if multiple clip vectors appear in a single
line. (In this case the last clip vector is used.)
|
| |
|
|
|
|
| |
Limit context printed after parsing errors to 30 characters
|
|
|
|
| |
This allows this kind of subtitle to be displayed: \{Hello World\}
|
|
|
|
|
|
| |
Do not skip '@' at the start of a font name in styles; detect '@' at
font name start and set a new attribute in ASS_Font accordingly.
Rotate affected glyphs after loading and calculate a suitable advance.
|
| |
|
|
|
|
|
| |
Get rid of compatibility #ifdefs and some code to support very old
versions of freetype. libass now requires at least version 2.2.1.
|
|
|
|
|
|
|
|
|
| |
Make sure that libass does not crash even if no default font is
provided. Additionally, fix crashes related to drawings in this and
possibly other unusual cases.
Document the default_path and default_family parameters of
ass_set_fonts.
|
| |
|
|
|
|
|
| |
Picked up from XBMC svn. This should especially fix MPlayer's direct3d
video output (untested).
|
|
|
|
|
| |
Move the function apply_transition_effects, which parses event-global
effects and adjusts a few state variables, into ass_parse.c.
|
|
Move all code related to parsing event lines and processing override
tags into a separate file (ass_parse.c).
|