Commit Graph

70 Commits

Author SHA1 Message Date
eugeni 656bde87fa Support \t with acceleration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20891 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-13 16:49:32 +00:00
eugeni 60d29dbd71 s/break/continue/. A crazy mistake, somehow unnoticed for more that 2 months.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20795 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-08 18:57:40 +00:00
eugeni c8b995cf2f Calculate text bounding box in a way that does not depend on actual glyph
bitmaps. Each glyph is considered to be bounded by (origin, origin + advance)
horizontally, and (max font ascender, max font descender) vertically.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20734 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-06 02:47:57 +00:00
eugeni a5c1f03baa More precise bounding box calculation for karaoke effects.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20669 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-04 17:58:09 +00:00
eugeni 6fef7a200f Introduce MSGT_ASS, use it for all libass messages.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20645 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 18:15:33 +00:00
eugeni ef5dee5d56 Revert r20517.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20519 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 17:29:55 +00:00
eugeni 06758d89bc Copy the following functions to libass to avoid dependency on the rest of mplayer:
guess_buffer_cp
utf8_get_char
blur



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20517 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 15:03:30 +00:00
eugeni 7e9c778cf2 Fix width -> orig_width typo.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20513 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 13:59:36 +00:00
eugeni efea99c2c9 Libass interface reworked:
- ass_instance_t renamed to ass_renderer_t
- ass_library_t introduced
- use of mplayer-specific global variables limited to ass_mp.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20493 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-28 15:07:18 +00:00
eugeni 4d268b94d7 Add missing fontconfig_done() call.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20467 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-27 16:02:44 +00:00
eugeni e8733cbf9d Split ass_configure() into several smaller functions.
FontConfig initialization moved from ass_init() to ass_set_fonts().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20462 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-26 20:08:46 +00:00
eugeni 08d9c0718a Don't forget to apply scaling coefficients to kerning values.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20326 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-20 23:06:52 +00:00
eugeni a4a817a15f Fix center of rotation calculation. It was overly complex and
incorrect for right- and center-aligned text.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20308 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-19 18:08:44 +00:00
eugeni 7abe5a4ef8 Center of rotation depends on alignment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20302 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 21:19:51 +00:00
eugeni 2d3ad59854 Support separate rotation angle for each glyph.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20301 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 21:11:29 +00:00
eugeni 5b5798f039 Move base point calculation to a separate function. Will be reused soon.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20300 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 18:33:19 +00:00
eugeni 67232605ef Cosmetics: remove commented code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20299 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 17:57:00 +00:00
eugeni 6d4ad204b2 Fix a typo in collision detection code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20297 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-18 15:52:26 +00:00
eugeni 28ecbe3cc3 Remove an outdated debug message.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20275 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-16 19:02:11 +00:00
reimar 404c75b083 Fix crash because of last_glyph < first_glyph, probably caused by first line
only consisting of '\n'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20232 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-15 13:03:43 +00:00
eugeni 47006b0d7d Zerofill libass static variables during initialization.
Patch by Jindrich Makovicka <makovick a gmail d com>.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20208 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-14 14:42:23 +00:00
eugeni 965a305938 Free FT_Stroker during libass deinitialization.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20207 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-14 14:35:33 +00:00
eugeni 50ca7a4f72 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20014 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-01 17:09:04 +00:00
eugeni 1b0251e7ad Shadow support in libass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19971 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-24 16:04:37 +00:00
reimar 6c8ab3f263 Fix width -> orig_width typo causing subtitles to be too far to the right
for movies with vertical black bars (aspect < monitoraspect).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19946 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-22 20:47:08 +00:00
eugeni 0ba8cc2972 Move calculation of text parameters (number of lines, height, etc.) from
wrap_lines_smart() into a separate function. Call it for every event, even
those that do not require line wrapping.

This fixes randomly wrong positioning of 'Banner' events.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19938 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-22 18:56:09 +00:00
eugeni 38ea1d82d8 Move variable declaration to a more deeply nested block. It is not used outside of it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19937 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-22 18:47:29 +00:00
eugeni 4a09756828 Cosmetics: fix indentation after last commit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19925 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-21 22:37:42 +00:00
eugeni a7e1afc5b3 Fix FT_Stroker use in libass. The previous variant ended up with 0-width
outline in some cases.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19924 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-21 22:36:47 +00:00
eugeni 997c42f17f In r19831, font size multiplier was mistakenly applied to border width.
Fixed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19923 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-21 19:31:28 +00:00
eugeni ef3a4fa04e Sort events by ReadOrder (if both layer and start time are equal).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19912 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-19 18:23:36 +00:00
eugeni 0c1c5e7ea2 Calculate text bounding box in such way that it does not depend on the height
of individual glyphs.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19910 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-19 17:40:31 +00:00
eugeni ac4703fc35 Fix a stupid bug in list concatenation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19897 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-18 18:54:38 +00:00
eugeni 75cc0a6fc8 Reduce code duplication in init_render_context().
Don't use glyph stroker for borderless glyphs.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19879 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-17 15:32:01 +00:00
eugeni 69cbeae845 Add \be (blur edges) support to libass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19854 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-16 13:32:46 +00:00
eugeni 867aa92076 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
This is required for various bitmap modifications (like blur, outline and shadow).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19852 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-16 13:08:17 +00:00
eugeni dccd5e19ee Make font outline width proportional to movie resolution.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19831 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-13 15:35:10 +00:00
eugeni 6019b400da Bugfix: timing for empty karaoke words was lost, resulting
in faster than normal karaoke playback.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19722 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-06 17:32:31 +00:00
eugeni 4fd16b0702 Workaround for broken fonts with bad ascender/descender.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19699 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-05 20:06:20 +00:00
eugeni b4d4d22a50 Change \fad behaviour so that it does not get cancelled by \r.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19698 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-05 19:06:15 +00:00
eugeni 1e50bf37ea Simplification.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19697 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-05 18:33:31 +00:00
eugeni d764df09de Add vertical clipping for subtitles that were moved because of a collision.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19670 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-04 17:55:57 +00:00
eugeni 06ffbd9d7d Fix possible unallocated memory read in libass line wrapping code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19669 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-04 17:52:28 +00:00
eugeni 8ed46df92f Fix last commit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19657 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-03 17:36:29 +00:00
eugeni d9f0a7b4ad More checks in ass_render_event.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19656 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-03 17:25:04 +00:00
eugeni 83a3b732c4 Remove unneeded variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19655 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-03 17:09:53 +00:00
eugeni fc6751b73a Better collision detection algorithm. The idea is to keep a subtitle in place
when a lower placed one disappears, thus improving readability.
As a side effect, layers are supported now.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19644 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-02 19:17:32 +00:00
eugeni e6206f4e1c Remove some unused code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19642 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-02 18:33:51 +00:00
eugeni 729b0059a4 Make \fr* parameter a floating point value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19628 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-01 20:36:38 +00:00
eugeni 9b39128d2e Bugfix: wrong height value used in font size calculation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19616 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-31 20:19:19 +00:00