| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reported by clang scan-build static analysis.
|
|
|
|
|
|
| |
Reported by clang scan-build static analysis. This cannot happen with
the current code, but the check might make this more robust in case
anything changes.
|
|
|
|
|
|
| |
Only normal dialog lines are allowed to appear outside.
Fixes #177.
|
| |
|
|
|
|
|
|
| |
What.
Closes #175.
|
|
|
|
|
| |
This really didn't make a lot of sense. This is a simplification, and
should not affect actual program behavior.
|
|
|
|
|
|
|
| |
libass already does not use the margins for events using \pos. This is
not quite complete: there are other tags that we consider as "not
dialogue", and which should not be overridden. These tags do not use
EVENT_POSITIONED, and thus use the margins, which can mess up rendering.
|
|
|
|
| |
Just move the *_pos ones about the variants without this postfix.
|
| |
|
|
|
|
| |
Similar to xy-VSFilter.
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
"Bold" should obviously be taken from the script's style, like it's done
with StrikeOut and Underline.
treat_fontname_as_pattern is specific to the font, and thus should be
taken from the same style as the font (the override style).
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
Fixes #153.
Fixes #82.
|
| |
|
|
|
|
| |
In both cases, fallback to doing nothing if alloc fails.
|
|
|
|
|
|
|
|
|
|
| |
Use strndup() instead of malloc+copy.
Make all code deal with the possibility that ASS_Drawing.text can be
NULL (which can happen on allocation failure).
Skip fix_collisions() on malloc failure - the lines will overlap, but at
least libass won't crash.
|
|
|
|
|
| |
The split doesn't necessarily follow any logic; for the most part
it just moves each processing loop into its own function.
|
|
|
|
| |
Put all code into one place, which makes it easier to follow.
|
|
|
|
| |
This still doesn't catch all cases.
|
|
|
|
| |
Part of #146
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Makes #131 not crash. The function likely fails because the number of
points exceeds SHRT_MAX.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Like VSFilter. '{' without a following '}' is just text, though
in vector drawing mode it still delimits individual drawings.
This also lets us nicely avoid '\0' hacks
in the \t override tag handler in parse_tag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Use FT_Outline_EmboldenXY
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is somewhat similar to BorderStyle=3, but with a number of
differences. Mainly, this new BorderStyle doesn't create overlaps
within an event.
Closes #105.
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
It turns out we don't need this.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Rodger Combs <rodger.combs@gmail.com>
|
|
|
|
| |
Fixes #75.
|
|
|
|
|
| |
Regression in commit 1f5eb5eb.
Fixes issue #74.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes this test case:
Dialogue: 0,0:00:00.00,0:00:02.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 220 l0 220)}Hello
Dialogue: 0,0:00:02.00,0:10:00.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 230 l0 230)}Hello
The problem here is that the rendered output bitmap list itself does
not change, only its contents (due to the different vector clip).
ass_render_frame() will not set *detect_change correctly, and an
application using this flag (like mplayer or mpv) will not update
the screen as needed.
Fix this with a very cheap hack: always report a full change if
there's a vector clip. This is basically an emergency fix until
we have a proper way to detect the change.
|
| |
|
|
|
|
|
|
|
| |
Make sure to correctly handle situations where glyphs
have info->linebreak and info->skip set at the same time.
Fixes libass#44.
|
|
|
|
| |
This isn't part of a style. Fixes libass#45, GC#116.
|
|
|
|
| |
Fixes libass#16 (the remaining sub-issue).
|
|
|
|
| |
...instead of doing this manually.
|
|
|
|
|
| |
Rotation origin was not taken into account
when caching glyph run bitmaps.
|
| |
|
|
|
|
|
|
|
|
| |
Events with a clip mask but no text such as just
Dialogue: ...,{\clip(m 47 32 )}
had their clip masks carried over to the next event.
Fixes GitHub issue #22.
|
|
|
|
| |
No functional changes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Trailing \N is effectively ignored, but
\N\N should still yield an empty line.
|
|
|
|
| |
Confirmed with VSFilter. This complements the previous commit.
|
|
|
|
|
| |
This brings us in line with VSFilter
and also fixes Google Code issue #101.
|
|
|
|
| |
hspacing affects opaque box borders.
|
| |
|
|
|
|
|
|
|
|
| |
VSFilter does not do this.
The code being removed was already buggy: i > 0 should
have been "got any non-skipped glyphs since last_break?",
and hspacing should have been taken from glyphs[i-1].
|
|
|
|
|
| |
VSFilter forgets to scale this distance,
just like it forgets to scale blur radius.
|
|
|
|
| |
Obtained by reading the xy-VSFilter source code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Comparing this rendering of this line:
{\fnTahoma\c&H000000&\fs100\an7\fay0.115\pos(240,250)}——————–>{\fay0.0}——>
To this line:
{\fnTahoma\c&H000000&\fs100\an7\fay0.0\pos(240,250)}——————–>{\fay0.0}——>
The second arrow is in the same place for both lines when using
VSFilter, but the origin of the second shear is different when using
libass.
After every change in \fay or a newline, the vertical offset resets
to 0.
Fixes issue #80. Bug report and patch by BwackNinja (BwackNi...@gmail.com)
(this commit corresponds to the patch issue_80_3.patch)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 05eb520 missed some duplicated bits in ass_shaper.c.
<wm4> oh crap
<zgreg> oh crap indeed
Instead of duplicating the logic in ass_shaper.c, just change the
glyphs before they even get into processing. This way, all code
reading the font size etc. is affected. This essentially reverts
commit c207000c, because it's not needed anymore.
|
|
|
|
|
|
|
|
| |
'\r' characters weren't skipped correctly.
SKIP_SYMBOL from original patch renamed to IS_SKIP_SYMBOL.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was broken since commit f780146. For reasons why, read the commit
message of that commit. To make it short, we set the font size to
something large and constant (256), and scale the font outlines returned
by freetype to the size we need in order to get smooth animation and
accurate positioning.
Of course, this obviously breaks hinting. Fix hinting by not using the
hack mentioned above if hinting enabled.
To mitigate the issues caused by freetype grid fitting and extremely
bad ASS scripts (such as setting font size to very small values and
scaling them up with \fscx/y), we still adjust the font size such that
the font is never scaled in Y direction (only in X direction, because
the \fscx/y tags can change aspect ratio).
Also see google code issue #46.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the explicit check whether the ASS_Track and ASS_Renderer were
created from the same ASS_Library object. Logging will not be entirely
consistent (some log messages go to the ASS_Track library when
rendering), but otherwise it works.
ASS_Library also contains embedded fonts added with ass_add_font().
It looks like the renderer will use the fonts from the ASS_Renderer
library object.
|
|
|
|
|
|
|
|
|
| |
Commit 0e1702ad7a6a827d "Add ass_set_storage_size and fix related scaling issues"
attempted to fix blur scaling. This breaks blur scaling for players
which don't call ass_set_storage_size().
This commit reverts the default behavior to the old behavior. The
behavior when ass_set_storage_size() is called should be unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ass_set_storage_size() overwrote the user-defined aspect ratio set with
ass_set_aspect_ratio(). Change it so that if ass_set_aspect_ratio() is
used, the ass_set_storage_size() parameters are not used for any aspect
ratio calculations. (The storage size is still used for calculating the
blur scale.) This simplifies the code as well, because the aspect ratio
is now centrally calculated in ass_start_frame().
Update the doxygen. Make it clear that ass_set_storage_size() will be
used for aspect ratio calculation, unless ass_set_aspect_ratio() is
used. Also mention what libass actually does with the dar and sar
parameters: it uses them to calculate a pixel aspect ratio, nothing
else.
Explicitly allow resetting the storage size with w=h=0. Document that
it's allowed to remove the user defined aspect ratio by setting a pixel
aspedct ratio of 0.
See issue 6.
|
|
|
|
| |
Patch by chrisburel, posted on Google code issue 31.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Determine script for each character and use this as an additional
property for splitting up the text into runs. Characters of Common
or Inherited script assume the script of the preceding character. If
that is not possible (First character(s) in a run are Common/Inherited,
for instance), a backwards scan is done so they can assume the script
of the following character.
Additionally, determine default language in case no override is
set. This simply maps a language to a script, if a language exists
that is mostly representative |