]> granicus.if.org Git - libass/log
libass
10 years agoFix change detection in presence of vector clips
wm4 [Thu, 6 Mar 2014 21:23:01 +0000 (22:23 +0100)]
Fix change detection in presence of vector clips

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.

10 years agoActually export ass_library_version symbol
wm4 [Mon, 3 Mar 2014 23:36:21 +0000 (00:36 +0100)]
Actually export ass_library_version symbol

Patch by chadr...@gmail.com.

Fixes libass#58, GC#117.

10 years agoDon't crash on \fscx0
wm4 [Mon, 3 Mar 2014 14:52:54 +0000 (15:52 +0100)]
Don't crash on \fscx0

Freetype can return a bounding box with all fields set to INT_MIN if an
outline with all points set to 0 is used. This can happen e.g. with
\fscx0, but also in more complicated cases. (In the original crashing
sample, this was probably caused in combination with an embedded font.)

Such a bounding box causes libass to crash, because it will enlarge the
combined bitmap bounding box to a ridiculous size.

Just skip outlines that have en empty bounding box. This is probably
the correct thing to do, and won't pass INT_MAX down to other parts
of libass.

10 years agoDon't use an unsigned it to check for <0 :|
11rcombs [Sat, 1 Mar 2014 01:54:39 +0000 (19:54 -0600)]
Don't use an unsigned it to check for <0 :|

10 years agoAssume SSE2 on x86_64
11rcombs [Sat, 1 Mar 2014 01:54:03 +0000 (19:54 -0600)]
Assume SSE2 on x86_64

10 years agoRedesigned configure/Makefile setup
11rcombs [Mon, 24 Feb 2014 01:39:45 +0000 (19:39 -0600)]
Redesigned configure/Makefile setup

Adds yasm version check and handles Free/OpenBSD/win32 correctly.

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
10 years agoFormat README.md
Rodger Combs [Wed, 19 Feb 2014 14:59:41 +0000 (08:59 -0600)]
Format README.md

10 years agoCreate README.md
Rodger Combs [Wed, 19 Feb 2014 14:48:14 +0000 (08:48 -0600)]
Create README.md

10 years agoUpdate version info and changelog 0.11.1
Grigori Goronzy [Wed, 19 Feb 2014 14:10:25 +0000 (15:10 +0100)]
Update version info and changelog

10 years agoAdd missing distfiles
Grigori Goronzy [Wed, 19 Feb 2014 13:52:48 +0000 (14:52 +0100)]
Add missing distfiles

10 years agoUpdate changelog 0.11.0
Grigori Goronzy [Tue, 18 Feb 2014 23:37:50 +0000 (00:37 +0100)]
Update changelog

10 years agoUpdate version info
Grigori Goronzy [Tue, 18 Feb 2014 21:02:48 +0000 (22:02 +0100)]
Update version info

10 years agoUpdate changelog
Grigori Goronzy [Tue, 18 Feb 2014 20:58:30 +0000 (21:58 +0100)]
Update changelog

10 years agoWe have aligned stack on Win64
11rcombs [Mon, 17 Feb 2014 16:08:22 +0000 (10:08 -0600)]
We have aligned stack on Win64

10 years agoDefine HAVE_ALIGNED_STACK; should wrap up #48
11rcombs [Mon, 17 Feb 2014 07:21:41 +0000 (01:21 -0600)]
Define HAVE_ALIGNED_STACK; should wrap up #48

10 years agoFix limits.h includes
Grigori Goronzy [Sun, 16 Feb 2014 23:13:37 +0000 (00:13 +0100)]
Fix limits.h includes

These were missing in several places. Fixes #50.

10 years agoRemove unnecessary instruction
11rcombs [Sun, 16 Feb 2014 19:32:54 +0000 (13:32 -0600)]
Remove unnecessary instruction

10 years agoAdded XMM register count in be_blur; should help #48
11rcombs [Sun, 16 Feb 2014 19:28:47 +0000 (13:28 -0600)]
Added XMM register count in be_blur; should help #48

10 years agoUse lower mm registers in be_blur.asm
11rcombs [Sun, 16 Feb 2014 19:29:40 +0000 (13:29 -0600)]
Use lower mm registers in be_blur.asm

10 years agoAdded license headers in ASM files
11rcombs [Sun, 16 Feb 2014 19:26:34 +0000 (13:26 -0600)]
Added license headers in ASM files

10 years agoDon't include skipped glyphs in combined bitmaps
Oleg Oshmyan [Wed, 12 Feb 2014 16:24:39 +0000 (16:24 +0000)]
Don't include skipped glyphs in combined bitmaps

Make sure to correctly handle situations where glyphs
have info->linebreak and info->skip set at the same time.

Fixes libass#44.

10 years agoDon't reset wrap_style on \r
Grigori Goronzy [Tue, 11 Feb 2014 22:47:18 +0000 (23:47 +0100)]
Don't reset wrap_style on \r

This isn't part of a style. Fixes libass#45, GC#116.

10 years agoFont metrics: FreeType falls back to sTypoAscender/Descender
Oleg Oshmyan [Tue, 11 Feb 2014 15:58:14 +0000 (15:58 +0000)]
Font metrics: FreeType falls back to sTypoAscender/Descender

Fixes libass#8.

10 years agoUse cluster advance in compute_string_bbox to account for \fsp
Oleg Oshmyan [Sun, 9 Feb 2014 03:18:39 +0000 (03:18 +0000)]
Use cluster advance in compute_string_bbox to account for \fsp

Fixes libass#16 (the remaining sub-issue).

10 years agoUse a function for aligned memory allocations
wm4 [Wed, 29 Jan 2014 17:11:13 +0000 (18:11 +0100)]
Use a function for aligned memory allocations

...instead of doing this manually.

10 years agoFix subpixel jumping of rotated glyph runs
Oleg Oshmyan [Wed, 29 Jan 2014 20:54:45 +0000 (20:54 +0000)]
Fix subpixel jumping of rotated glyph runs

Rotation origin was not taken into account
when caching glyph run bitmaps.

10 years agoMerge pull request #39 from grigorig/shaper-hash-opt
Grigori Goronzy [Wed, 29 Jan 2014 20:13:09 +0000 (12:13 -0800)]
Merge pull request #39 from grigorig/shaper-hash-opt

Shaper and hash function optimizations

10 years agoFixed incorrect spelling in copyright notice
11rcombs [Wed, 29 Jan 2014 18:05:41 +0000 (12:05 -0600)]
Fixed incorrect spelling in copyright notice

10 years agoUnroll FNV-1A hash function
Grigori Goronzy [Wed, 29 Jan 2014 04:25:40 +0000 (05:25 +0100)]
Unroll FNV-1A hash function

Unroll the hash function with Duff's device for improved performance.

10 years agoshaper: use global features correctly
Grigori Goronzy [Wed, 29 Jan 2014 04:23:55 +0000 (05:23 +0100)]
shaper: use global features correctly

start/end of feature tags is unsigned, so use the proper constant
to signal to HarfBuzz that these features are global. This allows
HarfBuzz to cache shape plans, and that can considerably speed up
shaping, especially if many small runs need to be shaped.

10 years agoshaper: rewrite and simplify harfbuzz shaping
Grigori Goronzy [Sun, 26 Jan 2014 02:30:45 +0000 (03:30 +0100)]
shaper: rewrite and simplify harfbuzz shaping

Rewrite the core of the harfbuzz shaping function. Gets rid of the
MAX_RUNS limit of runs per line and reuses a single hb_buffer_t,
which should be more efficient.

10 years agoMerge pull request #37 from wm4/minor
Grigori Goronzy [Tue, 28 Jan 2014 23:44:20 +0000 (15:44 -0800)]
Merge pull request #37 from wm4/minor

Minor cosmetics

10 years agoass_utils: fix declarations
wm4 [Mon, 27 Jan 2014 18:58:43 +0000 (19:58 +0100)]
ass_utils: fix declarations

Now they're the same as in ass_utils.h.

10 years agoass_utils: don't include freetype headers
wm4 [Mon, 27 Jan 2014 18:57:44 +0000 (19:57 +0100)]
ass_utils: don't include freetype headers

They're not even used.

10 years agoAdded copyright notice for xy \be blur
11rcombs [Mon, 27 Jan 2014 16:38:17 +0000 (10:38 -0600)]
Added copyright notice for xy \be blur

10 years agoCheck for YASM in configure
11rcombs [Mon, 27 Jan 2014 00:14:53 +0000 (18:14 -0600)]
Check for YASM in configure

10 years agoMake apply_blur and make_shadow_bitmap static; remove an unneeded local variable
11rcombs [Sun, 26 Jan 2014 05:14:06 +0000 (23:14 -0600)]
Make apply_blur and make_shadow_bitmap static; remove an unneeded local variable

10 years agoMake sure to release each event's vector clip mask
Oleg Oshmyan [Sat, 25 Jan 2014 01:22:04 +0000 (01:22 +0000)]
Make sure to release each event's vector clip mask

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.

10 years agoSimplify storage size handling
Oleg Oshmyan [Fri, 24 Jan 2014 19:30:58 +0000 (19:30 +0000)]
Simplify storage size handling

No functional changes.

10 years agoBuild: Remove references to unimplemented ARM ASM
11rcombs [Sun, 26 Jan 2014 02:48:10 +0000 (20:48 -0600)]
Build: Remove references to unimplemented ARM ASM

10 years agoParser: don't increment render_priv->state.bm_run_id (unnecessary)
11rcombs [Sat, 25 Jan 2014 23:48:24 +0000 (17:48 -0600)]
Parser: don't increment render_priv->state.bm_run_id (unnecessary)

10 years agoAdded x86 ASM functions
11rcombs [Sat, 25 Jan 2014 22:55:21 +0000 (16:55 -0600)]
Added x86 ASM functions

10 years agoCombine bitmaps before applying blur and shadow
11rcombs [Sun, 26 Jan 2014 01:06:12 +0000 (19:06 -0600)]
Combine bitmaps before applying blur and shadow

10 years agoTest/Profile: Support out-of-tree builds
11rcombs [Sat, 25 Jan 2014 22:46:10 +0000 (16:46 -0600)]
Test/Profile: Support out-of-tree builds

10 years agoTest: Render at 1280x720
11rcombs [Sat, 25 Jan 2014 22:33:00 +0000 (16:33 -0600)]
Test: Render at 1280x720

10 years agoAdded profile program and corresponding configure options
11rcombs [Tue, 31 Dec 2013 17:49:30 +0000 (11:49 -0600)]
Added profile program and corresponding configure options

10 years agoRemove configure from autogen.sh
11rcombs [Sun, 19 Jan 2014 00:12:27 +0000 (18:12 -0600)]
Remove configure from autogen.sh

10 years agoMerge pull request #26 from wm4/warnings
Grigori Goronzy [Sat, 25 Jan 2014 01:27:03 +0000 (17:27 -0800)]
Merge pull request #26 from wm4/warnings

Use more warning flags

10 years agoAttempt to make code more readable
wm4 [Fri, 24 Jan 2014 01:27:26 +0000 (02:27 +0100)]
Attempt to make code more readable

No more double pointer dereferencing.

10 years agoAppend new cache items at the start of the collision list
11rcombs [Fri, 24 Jan 2014 01:23:30 +0000 (02:23 +0100)]
Append new cache items at the start of the collision list

The idea is that more recently-added cache items are more likely to
get hits.

Signed-off-by: wm4 <wm4@nowhere>
10 years agoSimplify hash function
11rcombs [Fri, 24 Jan 2014 01:09:46 +0000 (02:09 +0100)]
Simplify hash function

We can rely on fast multiplication and good compilers.

v2: use default FNV-1a prime

Signed-off-by: wm4 <wm4@nowhere>
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
10 years agoMerge pull request #28 from astiob/compat
Grigori Goronzy [Sat, 25 Jan 2014 00:38:11 +0000 (16:38 -0800)]
Merge pull request #28 from astiob/compat

Fix \k starting time and incorrectly skipped fonts

10 years agofontconfig: don't compact the sorted font list
Oleg Oshmyan [Thu, 23 Jan 2014 20:21:58 +0000 (20:21 +0000)]
fontconfig: don't compact the sorted font list

Some broken fonts are dropped by Fontconfig during compacting.

10 years agoStart \k, \ko at exact start time, not right after it
Oleg Oshmyan [Sun, 19 Jan 2014 00:18:19 +0000 (00:18 +0000)]
Start \k, \ko at exact start time, not right after it

10 years agobuild: add more warnings
wm4 [Fri, 24 Jan 2014 00:37:41 +0000 (01:37 +0100)]
build: add more warnings

10 years agoass_strtod: use modern C
wm4 [Fri, 24 Jan 2014 00:37:07 +0000 (01:37 +0100)]
ass_strtod: use modern C

10 years agoRemove some ass_msg() calls
wm4 [Mon, 20 Jan 2014 23:32:28 +0000 (00:32 +0100)]
Remove some ass_msg() calls

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).

10 years agoAllocate track array exponentially
wm4 [Thu, 23 Jan 2014 17:38:51 +0000 (18:38 +0100)]
Allocate track array exponentially

This reduces the frequency of reallocations.

10 years agoFix \fade corner cases
Oleg Oshmyan [Wed, 15 Jan 2014 02:38:54 +0000 (02:38 +0000)]
Fix \fade corner cases

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.

10 years agoFix \t corner cases
Oleg Oshmyan [Wed, 15 Jan 2014 02:16:58 +0000 (02:16 +0000)]
Fix \t corner cases

The end time is reset to line duration if and only if it is zero.
Negative accelerations are allowed (and can cause overflow later).

10 years agoDon't ignore trailing empty line
Oleg Oshmyan [Wed, 15 Jan 2014 01:07:26 +0000 (01:07 +0000)]
Don't ignore trailing empty line

Trailing \N is effectively ignored, but
\N\N should still yield an empty line.

10 years agoFix missing pointer dereference in 1636a551
Oleg Oshmyan [Tue, 14 Jan 2014 13:11:01 +0000 (13:11 +0000)]
Fix missing pointer dereference in 1636a551

10 years agoMerge pull request #17 from astiob/compat
Grigori Goronzy [Wed, 8 Jan 2014 20:30:42 +0000 (12:30 -0800)]
Merge pull request #17 from astiob/compat

Various compatibility fixes + fix @font advance with HarfBuzz

10 years agoDo not reset \pbo and \p values after each drawing
Oleg Oshmyan [Wed, 8 Jan 2014 02:18:56 +0000 (04:18 +0200)]
Do not reset \pbo and \p values after each drawing

Confirmed with VSFilter. This complements the previous commit.

10 years agoTerminate drawings on {
Oleg Oshmyan [Wed, 8 Jan 2014 01:39:36 +0000 (03:39 +0200)]
Terminate drawings on {

This brings us in line with VSFilter
and also fixes Google Code issue #101.

10 years agoshaper: disable ligatures for non-zero \fsp
Oleg Oshmyan [Tue, 7 Jan 2014 23:28:49 +0000 (01:28 +0200)]
shaper: disable ligatures for non-zero \fsp

10 years agoDistinguish cached glyphs with different hspacing when border_style == 3
Oleg Oshmyan [Tue, 7 Jan 2014 22:48:36 +0000 (00:48 +0200)]
Distinguish cached glyphs with different hspacing when border_style == 3

hspacing affects opaque box borders.

10 years agoFix \fsp: use orig_scale_x, not post-fix_glyph_scaling scale_x
Oleg Oshmyan [Tue, 7 Jan 2014 21:49:53 +0000 (23:49 +0200)]
Fix \fsp: use orig_scale_x, not post-fix_glyph_scaling scale_x

10 years agoDon't try to remove end-of-line \fsp
Oleg Oshmyan [Tue, 7 Jan 2014 21:41:43 +0000 (23:41 +0200)]
Don't try to remove end-of-line \fsp

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].

10 years agoFix \pbo
Oleg Oshmyan [Tue, 7 Jan 2014 13:32:05 +0000 (15:32 +0200)]
Fix \pbo

b61d260b attempted to add support for \p scaling to \pbo.
However, while it fixed the exact sample originally reported,
it broke \pbo with other \p values, including \p1, by confusing
the direction of scaling and the units in which \pbo is measured.

In addition, the descenders assigned to drawings have always
had a wrong sign, causing lines that contain drawings with \pbo
to be shifted in the wrong direction: negative \pbo raised bottom-
aligned lines, while positive \pbo lowered top-aligned lines.

All errors and fixes have been confirmed with VSFilter.

10 years agoScale distance to screen plane like blur radius
Oleg Oshmyan [Fri, 27 Dec 2013 01:12:46 +0000 (03:12 +0200)]
Scale distance to screen plane like blur radius

VSFilter forgets to scale this distance,
just like it forgets to scale blur radius.

10 years agoAccept colors with arbitrary sequences of leading & and H
Oleg Oshmyan [Thu, 26 Dec 2013 02:50:19 +0000 (04:50 +0200)]
Accept colors with arbitrary sequences of leading & and H

10 years agoA whole bunch of parsing and default value fixes
Oleg Oshmyan [Thu, 26 Dec 2013 02:26:43 +0000 (04:26 +0200)]
A whole bunch of parsing and default value fixes

Obtained by reading the xy-VSFilter source code.

10 years agoFix \fs+ and \fs-
Oleg Oshmyan [Thu, 26 Dec 2013 00:33:57 +0000 (02:33 +0200)]
Fix \fs+ and \fs-

The argument is a relative amount. The unit is: \fs+1 = +10%.

10 years agoStop animating \b and \i
Oleg Oshmyan [Wed, 25 Dec 2013 23:00:05 +0000 (01:00 +0200)]
Stop animating \b and \i

Unlike what the cc635086 message says, VSFilter does not animate them.

10 years agoStop misparsing and add support for \fsc
Oleg Oshmyan [Wed, 25 Dec 2013 22:17:06 +0000 (00:17 +0200)]
Stop misparsing and add support for \fsc

10 years agoSupport fractional \org arguments
Oleg Oshmyan [Wed, 25 Dec 2013 22:09:38 +0000 (00:09 +0200)]
Support fractional \org arguments

10 years agoParse Angle overrides as floating-point numbers
Oleg Oshmyan [Tue, 3 Dec 2013 02:19:05 +0000 (02:19 +0000)]
Parse Angle overrides as floating-point numbers

This complements 5903771e.

10 years agoshaper: actually correctly handle @font advance
Oleg Oshmyan [Fri, 3 Jan 2014 17:27:34 +0000 (19:27 +0200)]
shaper: actually correctly handle @font advance

The code was confusing glyph index and Unicode codepoint.
256df617 attempted a fix but merely moved the wrong code.

Fixes Google Code issue #94.

Vertical ligatures are possibly still broken, but
horizontal ligatures and non-ligatures are correct now.

10 years agoMerge pull request #10 from astiob/blur
Grigori Goronzy [Tue, 7 Jan 2014 19:12:46 +0000 (11:12 -0800)]
Merge pull request #10 from astiob/blur

Blur fixes

11 years agoDon't forget to apply \be to the last row/column
Oleg Oshmyan [Tue, 17 Dec 2013 19:44:06 +0000 (21:44 +0200)]
Don't forget to apply \be to the last row/column

11 years agoFix mismatched/out-of-bounds accesses in vertical \blur
Oleg Oshmyan [Tue, 17 Dec 2013 19:39:23 +0000 (21:39 +0200)]
Fix mismatched/out-of-bounds accesses in vertical \blur

11 years agoSpeed up \blur table generation
Oleg Oshmyan [Sun, 10 Nov 2013 22:11:18 +0000 (22:11 +0000)]
Speed up \blur table generation

Based on xy-VSFilter commit 54391d3a.

11 years agoImprove blur quality: use volume 65536 and initialize left column
Oleg Oshmyan [Fri, 8 Nov 2013 19:25:20 +0000 (19:25 +0000)]
Improve blur quality: use volume 65536 and initialize left column

11 years agoFix compilation with VC++ 2013
Thomas Goyne [Wed, 11 Dec 2013 00:21:53 +0000 (16:21 -0800)]
Fix compilation with VC++ 2013

For whatever reason FT_Vector points[4] = { ... }; needs to come at the
beginning of a scope. Since that block was duplicated, just extract it
to a function.

This does not include buildsystem support, so actually compiling with
VC++ requires creating a project and supplying a config.h file.

Signed-off-by: wm4 <wm4@nowhere>
11 years agoMerge pull request #6 from 11rcombs/ms-symbol-fix
Grigori Goronzy [Fri, 6 Dec 2013 22:52:32 +0000 (14:52 -0800)]
Merge pull request #6 from 11rcombs/ms-symbol-fix

Hack to fix MS Symbol-encoded fonts

11 years agoAdded ass_font_index_magic to fix char indexes in weird encodings
11rcombs [Fri, 6 Dec 2013 14:02:56 +0000 (08:02 -0600)]
Added ass_font_index_magic to fix char indexes in weird encodings

11 years agoTry to make really weird looking macro mess more understandable
wm4 [Mon, 25 Nov 2013 23:13:57 +0000 (00:13 +0100)]
Try to make really weird looking macro mess more understandable

The "if (0) {  // cool ;)" is just mindblowing.

11 years agoAdd ass_library_version()
wm4 [Mon, 25 Nov 2013 22:59:04 +0000 (23:59 +0100)]
Add ass_library_version()

Based on the patch by chadr123.

See google code issue #113.

11 years agoReset text origin on \fay changes for VSFilter compatibility
wm4 [Thu, 24 Oct 2013 11:04:48 +0000 (13:04 +0200)]
Reset text origin on \fay changes for VSFilter compatibility

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)

11 years agoUpdate changelog 0.10.2 0.10.2
Grigori Goronzy [Mon, 14 Oct 2013 09:32:06 +0000 (11:32 +0200)]
Update changelog

11 years agoUpdate version info
Grigori Goronzy [Mon, 14 Oct 2013 09:31:35 +0000 (11:31 +0200)]
Update version info

11 years agoDon't rely on events being sorted in ass_step_sub()
wm4 [Mon, 7 Oct 2013 11:59:08 +0000 (13:59 +0200)]
Don't rely on events being sorted in ass_step_sub()

ass_step_sub() assumed that the subtitle event list was sorted by event
start time, but that is not guaranteed. Making the list sorted is not
an option. (At least for now - too many issues are in the way to get
such a change being done.) Fix this function so that it works with an
unsorted event list.

Semantics regarding corner cases might be slightly different, such as
what happens if the now parameter coincides with event start/end, or
behavior with overlapping subtitles.

11 years agoass_shaper: changing scale_x/y starts a new glyph run
wm4 [Wed, 25 Sep 2013 21:28:38 +0000 (23:28 +0200)]
ass_shaper: changing scale_x/y starts a new glyph run

Since font_size is usually normalized to 256, scale_x/y has to be used
for this purpose.

11 years agoCosmetics: remove repetition
wm4 [Wed, 25 Sep 2013 18:00:14 +0000 (20:00 +0200)]
Cosmetics: remove repetition

11 years agoFix Hinting again
wm4 [Wed, 25 Sep 2013 17:23:52 +0000 (19:23 +0200)]
Fix Hinting again

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.

11 years agoSkip both newline and carriage return.
Reimar Döffinger [Tue, 24 Sep 2013 20:28:15 +0000 (22:28 +0200)]
Skip both newline and carriage return.

'\r' characters weren't skipped correctly.

SKIP_SYMBOL from original patch renamed to IS_SKIP_SYMBOL.

Signed-off-by: wm4 <wm4@nowhere>
11 years agoRestore hinting
wm4 [Tue, 24 Sep 2013 20:28:35 +0000 (22:28 +0200)]
Restore hinting

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.

11 years agoenca: fix memory leak
wangkun [Tue, 6 Aug 2013 03:28:47 +0000 (11:28 +0800)]
enca: fix memory leak

11 years agoFix fribidi include path
wm4 [Wed, 17 Jul 2013 16:32:26 +0000 (18:32 +0200)]
Fix fribidi include path

The old include statement works only by coincidence, and will actually
break the build on certain setups.