summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use FT_Glyph_StrokeBorder to render only the outside border.iive2007-03-311-1/+1
| | | | | | | Workarounds gaps between glyph and glyph border when rendering some fonts with freetype below 2.1.10 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22863 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary include from CFLAGS.diego2007-03-151-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22606 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Fix indentation, reorder some lines for consistency.diego2007-03-131-9/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22549 b3059339-0415-0410-9bf9-f77b7e298cf2
* Give more descriptive names to the source and library variables and splitdiego2007-03-131-2/+2
| | | | | | | between common, MPlayer-specific and MEncoder-specific parts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22546 b3059339-0415-0410-9bf9-f77b7e298cf2
* A function always returning 0 could as well return void.eugeni2007-03-061-11/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22475 b3059339-0415-0410-9bf9-f77b7e298cf2
* Text alignment should not use bounding boxes of individual glyphs.eugeni2007-03-061-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22474 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reset advance vector and glyph bounding box if glyph could not be found.eugeni2007-03-061-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22473 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix incorrect spacing introduced in r22231:eugeni2007-03-031-2/+2
| | | | | | | these two lines were supposed to perform truncation, not rounding. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22419 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: x2scr used twice instead of y2scr.eugeni2007-03-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22415 b3059339-0415-0410-9bf9-f77b7e298cf2
* Bugfix: transform origin to screen coordinates.eugeni2007-03-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22414 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix \a parsing broken in r22291uau2007-02-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22321 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add some missing includes.eugeni2007-02-222-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22310 b3059339-0415-0410-9bf9-f77b7e298cf2
* Oops, forgot {} before "else".eugeni2007-02-211-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22300 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: fix indentation.eugeni2007-02-201-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22294 b3059339-0415-0410-9bf9-f77b7e298cf2
* With \t(\b) text becomes bold at the middle of time interval, not at the endeugeni2007-02-201-1/+2
| | | | | | | of it like before. The same for \t(\i). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22293 b3059339-0415-0410-9bf9-f77b7e298cf2
* Any style modifier followed by no recognizable parameter resets to the default.eugeni2007-02-201-7/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22291 b3059339-0415-0410-9bf9-f77b7e298cf2
* \fn without an argument resets font family to the value from style.eugeni