Commit Graph

131 Commits

Author SHA1 Message Date
eugeni 85fb960769 Rename:
face_desc_t -> ass_font_desc_t
face_cache_item_t -> ass_font_t
*face* -> *font*


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21281 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-26 20:34:54 +00:00
diego dc2be42703 Merge common parts of all Makefiles into one file included by all.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21275 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-26 18:12:36 +00:00
diego 8f167fc5c5 SRCS should be one per line to make patches more readable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21229 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-25 17:06:08 +00:00
diego b0e412cc9c Remove pointless indirection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21227 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-25 17:02:52 +00:00
diego 27b0177662 Remove superfluous comment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21222 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-25 16:12:36 +00:00
eugeni bec3287bd4 Cosmetics: remove unneeded curly brackets.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21114 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-20 17:13:19 +00:00
eugeni 852e37033b Fix collision detection. The old method tried to avoid gaps between subtitles
by moving the upper subtitle down. This is wrong. With this fix, a subtitle
will be moved only if it overlaps with another one.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21113 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-20 17:10:18 +00:00
diego cf4bf03dc2 Unify dep/depend targets.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21096 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-20 11:18:01 +00:00
kraymer 598d5be3ad MSGTRs for libass
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21082 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-19 22:35:17 +00:00
eugeni 8856d67d40 Collect all includes of mplayer headers in libass in a single file (mputils.h).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21042 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-19 00:41:00 +00:00
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 4a27cb5876 Partial fix for semitransparent glyph outlines.
This fix removes semitransparent area (less then pixel width) between glyph and
it's outline. Instead, it makes them overlap a little. It usually looks much
better this way.
Complete fix seems impossible with the current output format (single color
alpha bitmaps). The right way is to blend both glyph and outline into one
bitmap so that 2 pixels with 50% transparency produce a fully solid one.
This requires RGBA bitmap output from libass.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20890 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-13 16:35:15 +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 ff4a1ad4a9 Bugfix: when copying ass_force_style_list, ending 0 was left out.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20738 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-06 20:09:28 +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 aca2396794 Initialize fontconfig in VFCTRL_INIT_EOSD handler.
Recent libass api changes moved fontconfig initialization to filter's
config() function. It is bad, because cache update can take a long time,
resulting in unpleasant sound effects. This change restores the original
behaviour.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20722 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-05 18:56:31 +00:00
eugeni 0a8d19b293 Cosmetics: indentation fix.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20718 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-05 18:21:39 +00:00
eugeni f78a3783e5 Fix the following compiler warnings:
ass.c:999: warning: unused variable 'i'
ass.c:1041: warning: pointer targets in assignment differ in signedness
ass.c:1043: warning: pointer targets in assignment differ in signedness


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20714 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-05 17:26:55 +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 46afb40907 Prefer microsoft-specific charmaps to all other.
There are some fonts with both 'Unicode' and 'Microsoft/Unicode'
charmaps, and the second always seems to be the right choice.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20653 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 23:11:00 +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 593e642133 Implement loading subtitles from memory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20619 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 02:15:08 +00:00
eugeni 452d1d6c61 Bugfix: sub_recode could deallocate global sub_cp under some circumstances.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20618 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 01:41:48 +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 978061ad27 Move ass_library initialization code to ass_mp.c.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20518 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 15:26:13 +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 572576eb67 Don't set PlayResX for plaintext subtitles.
This way font proportions will not depend on frame aspect.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20512 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 13:58:30 +00:00
eugeni 870ed1a164 Add \N at the end of each subtitle line when converting from subdata.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20511 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-29 13:52:51 +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
reimar ef45c3167f If HAVE_FONTCONFIG is not defined, font_fontconfig might be declared both
extern and static, causing compilation to fail


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20485 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-28 10:21:30 +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 4ad4f781db Reduce margins for plaintext subtitles.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20144 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-09 19:57:56 +00:00
reimar b7971e6a40 Avoid crash with fontconfig 2.3.9x (as shipped with SuSE 10.1, FcDirScan is broken)
and warn that these are beta versions and not supported.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20111 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-08 13:01:14 +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 74727dc564 Cosmetics: add some comments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19972 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-24 16:15:47 +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
eugeni a88de95383 Free memory in ass_synth_done().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19968 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-24 15:50:31 +00:00