summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* Merge libass/Makefile into Makefile, one less recursive make directory.diego2008-04-081-15/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26356 b3059339-0415-0410-9bf9-f77b7e298cf2
* Case insensitive parsing of SSA/ASS section headers.eugeni2008-03-301-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26303 b3059339-0415-0410-9bf9-f77b7e298cf2
* Skip BOM at the beginning of text in ASS parser.eugeni2008-03-301-2/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26302 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing header #includes to fix 'make checkheaders'.diego2008-03-058-0/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2
* Comment out dump_glyph(): it is unused and, as it is now, breaks compilation.eugeni2008-02-222-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26068 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check glyph bounding box before rasterizing and complain if it is too large.eugeni2008-02-221-0/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26067 b3059339-0415-0410-9bf9-f77b7e298cf2
* Some debugging routines.eugeni2008-02-222-0/+27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26066 b3059339-0415-0410-9bf9-f77b7e298cf2
* Better handling of behind-the-camera objects.eugeni2008-02-221-2/+3
| | | | | | | | | Every point that is behind the camera is moved to the clipping plane by orthographic projection. It is obviously incorrect, but this is a very rare case, and proper clipping of Bezier curves is not that easy. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26065 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print FreeType version in libass init. Makes error logs slightly more helpful.eugeni2008-02-221-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26064 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently give all libass multiple inclusion guards a LIBASS_ prefix.diego2008-01-2910-30/+30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25927 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently use uppercase filename as multiple inclusion guard.diego2008-01-281-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25897 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add global ass_force_reload flag.eugeni2008-01-232-0/+15
| | | | | | | If it is set, renderer is reconfigured before the next frame. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25841 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not try to guess font metrics based on its bounding box.eugeni2008-01-121-8/+2
| | | | | | | | | It was originally a workaround for fonts with bad ascender/descender values, but it breaks display of some otherwise valid fonts (bugzilla 987), so reverted. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25688 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix ass_clear_fonts not deallocating fontdata.eugeni2008-01-081-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25649 b3059339-0415-0410-9bf9-f77b7e298cf2
* No need to reinvent strdup...eugeni2008-01-071-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25644 b3059339-0415-0410-9bf9-f77b7e298cf2
* Copy font data to ass_library instead of referencing demuxer-owned memory.eugeni2008-01-072-3/+26
| | | | | | | This fixes segfault when fonts are accessed after demuxer has been closed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25641 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow overriding [Script Info] parameters with -ass-force-style option.eugeni2008-01-051-0/+9
| | | | | | | Patch by Anton Khirnov, wyskas gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25610 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-3110-18/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* typodiego2007-12-302-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25543 b3059339-0415-0410-9bf9-f77b7e298cf2
* Improve comments for ass_process_* functions.eugeni2007-12-301-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25542 b3059339-0415-0410-9bf9-f77b7e298cf2
* Return from ass_start_frame immediately if the track is empty.eugeni2007-12-301-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25541 b3059339-0415-0410-9bf9-f77b7e298cf2
* make libass use sub_font_name whenever it's possibleben2007-12-161-3/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25420 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix libass to support -nofontconfig.ulion2007-12-122-4/+18
| | | | | | | | For history reason, fontconfig is auto-enabled when ass is enabled, we keep this behavior and document it clearly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25379 b3059339-0415-0410-9bf9-f77b7e298cf2
* Our enca code uses strdup() on the input encoding name, as we don't modify ↵iive2007-10-281-4/+1
| | | | | | | | | | it we can use the original constant string. Uses less memory, code is simpler and faster. Fixes memory leak (noticed by ulion). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24879 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: fix indentation after last commit.eugeni2007-10-251-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24856 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check return value of add_face.eugeni2007-10-251-0/+2
| | | | | | | | | This fixes segfault when reselecting fonts and the new font could not be loaded (because of a bad font file, or too many font faces already loaded). Patch by Glen Nakamura, glen at imodulo dot com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24855 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid text deformation and subtitles moving outside the screen in pan-and-scaneugeni2007-10-191-7/+20
| | | | | | | | | | | | mode. For this, crop amounts are passed from vo_gl as negative margins sizes. They are used to calculate aspect ratio. They are ignored when calculating subtitle positions, so subtitles will stay on screen most of the time. Based on a patch by Jindrich Makovicka [makovick gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24815 b3059339-0415-0410-9bf9-f77b7e298cf2
* More precise line spacing.eugeni2007-09-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24577 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix text height calculation. It depends on line spacing.eugeni2007-09-181-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24576 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix an obviously incorrect comment.eugeni2007-09-181-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24575 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable ass_line_spacing option.eugeni2007-09-183-0/+7
| | | | | | | Patch by Thomas Reitmayr (treitmayr devbase at). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24574 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up the way get_path is handled: Compile get_path.c to an object to linkdiego2007-08-281-2/+1
| | | | | | | | against instead of directly #including the C file and replace the many extern declarations by a proper header file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation of ass_fontconfig.c when fontconfig is disabled.iive2007-08-041-1/+2
| | | | | | | Add missing parameter to the function in the #else case git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24008 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't apply windows-like font scaling if hhea or os2 tables contain invalideugeni2007-08-031-2/+6
| | | | | | | metrics. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24003 b3059339-0415-0410-9bf9-f77b7e298cf2
* Workaround for fonts with zero ascender/descender in horizontal header.eugeni2007-08-031-0/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24002 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out common code from ass_font_new and ass_font_reselect.eugeni2007-08-032-58/+47
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24001 b3059339-0415-0410-9bf9-f77b7e298cf2
* More simple and correct font reselection.eugeni2007-08-034-58/+21
| | | | | | | | | Since ass_font_t contains a list of font faces, there is no need to select the face with maximum charset coverage each time. It is enough to select any face with the required glyph. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24000 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use leading underscores in multiple inclusion guards, they are reserved.diego2007-07-0210-20/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently use filename as multiple inclusion guard.diego2007-07-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23707 b3059339-0415-0410-9bf9-f77b7e298cf2
* When parsing ass-force-style arguments, search for '=' and '.' characters witheugeni2007-06-151-2/+2
| | | | | | | | strrchr. This allows using it for styles whose name contains those characters. Patch by Бранко Мајић <branko majic at gmail com>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23560 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure there is at least one style in ass_track when parsing events.eugeni2007-06-151-7/+8
| | | | | | | Before it was only checked for embedded subtitles. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23559 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move code for reading a file and recoding it to utf-8 to a separate function.eugeni2007-06-012-9/+23
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23442 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix #if condition.eugeni2007-05-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23358 b3059339-0415-0410-9bf9-f77b7e298cf2
* FT_Request_Size does not exist in FreeType 2.1.*. Fallback to FT_Set_Char_Size.eugeni2007-05-201-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23357 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct font size in libass.eugeni2007-05-193-10/+28
| | | | | | | | | Values from TrueType OS/2 table are used to reproduce VSFilter behaviour. Magic 0.8 multiplier and scaling for the fractional part of font size are not needed anymore. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23346 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert y-axis rotation. Change order of rotations.eugeni2007-05-181-4/+5
| | | | | | | | | Now rotations are performed in the following order: X, Y, Z. Before this, it was the other way around. Also, in FreeType Y axis is directed upwards, so the corresponding rotation must be reverted. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23340 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support fractional font sizes.eugeni2007-05-146-17/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23318 b3059339-0415-0410-9bf9-f77b7e298cf2
* Limit ass_font_set_transform to nonrotating transformations.eugeni2007-05-144-23/+30
| | | | | | | | Rotations are not needed here (they are performed in transform3d) and they disable autohinter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23317 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't deallocate font data if it will be used later.eugeni2007-05-091-1/+3
| | | | | | | | It produced either segfault or "Error opening memory font" with any script that contains embedded fonts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23282 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move variables and a function under #ifdef FC_VERSION to avoid warnings.eugeni2007-05-031-10/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23234 b3059339-0415-0410-9bf9-f77b7e298cf2
* Deallocate FontConfig objects.eugeni2007-05-031-9/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23233 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix stupid bug in r23229.eugeni2007-05-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23232 b3059339-0415-0410-9bf9-f77b7e298cf2
* Deallocate string.eugeni2007-05-031-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23231 b3059339-0415-0410-9bf9-f77b7e298cf2
* In ass_font_new, allocate temporary ass_font_t on stack and return the pointereugeni2007-05-031-19/+17
| | | | | | | | | | | to cache-owned copy. This fixes leaked ass_font_t struct. Without this, font pointers obtained from ass_font_new() and ass_font_cache_find() were different, and bitmaps rendered with the first one could not be located in the cache later. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23230 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make cache_*_add functions return the pointer to new (copied) value.eugeni2007-05-032-11/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23229 b3059339-0415-0410-9bf9-f77b7e298cf2
* Always deallocate glyphs. Fixes memory leak.eugeni2007-05-021-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23208 b3059339-0415-0410-9bf9-f77b7e298cf2
* Update comments.eugeni2007-05-011-11/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23197 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics.eugeni2007-05-011-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23196 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move glyph_to_bitmap() call and outline glyph deallocation toeugeni2007-05-011-30/+22
| | | | | | | get_bitmap_glyph(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23195 b3059339-0415-0410-9bf9-f77b7e298cf2
* Minor code simplification.eugeni2007-05-011-14/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23193 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move get_bitmap_glyph() call to a separate loop.eugeni2007-05-011-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23192 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move transform_3d() call to get_bitmap_glyph().eugeni2007-05-011-10/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23191 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make a function static.eugeni2007-05-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23190 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't recalculate rotation radius. eugeni2007-05-011-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23189 b3059339-0415-0410-9bf9-f77b7e298cf2
* Bugfix: glyph cache depends on border width, because it contains outline_glypheugeni2007-05-012-0/+2
| | | | | | | (glyph border obtained with FT_Glyph_StrokeBorder) since r23043. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23188 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add -ass-hinting option for setting font hinting method.eugeni2007-04-276-6/+39
| | | | | | | | | It is possible to separately configure hinting for scaled and unscaled osd. The default is native hinter for unscaled osd (only vo_gl at this point), no hinting for vf_ass. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23152 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix division by zero in "\t" parsing.eugeni2007-04-271-3/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23151 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use FT_Glyph_Copy with NULL glyphs.eugeni2007-04-241-2/+5
| | | | | | | Contrary to the docs, it leaves garbage in *target. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23104 b3059339-0415-0410-9bf9-f77b7e298cf2
* Deallocate glyphs in a separate loop.eugeni2007-04-211-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23054 b3059339-0415-0410-9bf9-f77b7e298cf2
* Always deallocate glyphs. Fixes a memory leak.eugeni2007-04-211-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23053 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reset outline glyph cache when configuration changes.eugeni2007-04-211-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23052 b3059339-0415-0410-9bf9-f77b7e298cf2
* Scale camera distance.eugeni2007-04-211-3/+4
| | | | | | | Otherwise perspective does not look the same in fullscreen. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23051 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused variables.eugeni2007-04-201-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23049 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics.eugeni2007-04-201-6/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23048 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow caching of rotated glyphs.eugeni2007-04-201-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23047 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add shift_[xy] (vector that is added to the glyph before transformation) toeugeni2007-04-202-3/+12
| | | | | | | | bitmap glyph key. Result of rotation depends on them because of perspective transformation. They are only set when some rotation take place. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23046 b3059339-0415-0410-9bf9-f77b7e298cf2