summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fill bitmap_hash_key during parsing stage, call get_bitmap_glyph() much later.eugeni2007-04-201-16/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23045 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove bbox and advance vector from bitmap cache.eugeni2007-04-202-8/+0
| | | | | | | They are now available from glyph cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23044 b3059339-0415-0410-9bf9-f77b7e298cf2
* Store outline_glyph (glyph border) in glyph cache.eugeni2007-04-203-8/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23043 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: reindentation.eugeni2007-04-201-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23042 b3059339-0415-0410-9bf9-f77b7e298cf2
* Because of the outline glyph cache it is now possible for glyph_info_t to haveeugeni2007-04-201-1/+3
| | | | | | | | both non-zero glyph and bitmap at the same time. In that case, bitmap should not be generated anew. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23041 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make get_*_glyph return void.eugeni2007-04-201-13/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23040 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move outline glyph generation to a separate function, using outline glypheugeni2007-04-201-34/+60
| | | | | | | cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23039 b3059339-0415-0410-9bf9-f77b7e298cf2
* Oops, fix compilation broken in r23037.eugeni2007-04-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23038 b3059339-0415-0410-9bf9-f77b7e298cf2
* Collect hit/miss statistic in hash map, and print in -v mode.eugeni2007-04-201-2/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23037 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add outline glyph cache (unused yet).eugeni2007-04-202-0/+68
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23036 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename glyph cache to bitmap cache.eugeni2007-04-203-41/+40
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23035 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add generic hash map implementation.eugeni2007-04-202-120/+179
| | | | | | | Reimplement both font cache and glyph cache on top of it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23034 b3059339-0415-0410-9bf9-f77b7e298cf2
* A meaningless cosmetic change.eugeni2007-04-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23033 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add perspective projection.eugeni2007-04-201-0/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23032 b3059339-0415-0410-9bf9-f77b7e298cf2
* Applying transformation matrix to the glyph and the shift vector separately iseugeni2007-04-201-26/+20
| | | | | | | incorrect. Instead, it should be applied to translated glyph. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23031 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: reindentation.eugeni2007-04-201-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23030 b3059339-0415-0410-9bf9-f77b7e298cf2
* Disable caching of rotated glyphs.eugeni2007-04-201-0/+4
| | | | | | | | | The following commits will add perspective distortion to the glyphs rotated with \frx and \fry. Somewhere along the way correct caching of such glyphs will become impossible, but in the end everything will be fine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23029 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a stupid bug in r22473: bbox is zero-filled everytime when a glypheugeni2007-04-131-5/+1
| | | | | | | | is found in the cache. This leads to broken karaoke (some glyphs are not highlighted at all), and, probably, slightly incorrect linebreaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22986 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused includes.eugeni2007-04-101-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22965 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't check if user-supplied default font path exists.eugeni2007-04-101-6/+1
| | | | | | | It is checked in FT_New_Face anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22964 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix lost hard linebreaks in libass by repeating the loop when both soft andeugeni2007-04-071-0/+5
| | | | | | | | | | | | | hard linebreaks are about to be added. Original message: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/050876.html Patch by Jindrich Makovicka /makovick gmail com/ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22931 b3059339-0415-0410-9bf9-f77b7e298cf2
* "()" to "(void)" function param list fixesuau2007-04-015-6/+6
| | | | | | | patch from Stefan Huehner, stefan huehner org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
*