summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct font size in libass.eugeni2007-05-191-3/+1
| | | | | | | | | 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-141-4/+4
| | | | 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-141-9/+4
| | | | | | | | 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
* Deallocate string.eugeni2007-05-031-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23231 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-011-0/+1
| | | | | | | (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-271-1/+10
| | | | | | | | | 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-201-3/+9
| | | | | | | | 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-201-6/+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-201-8/+10
| | | | 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
* Rename glyph cache to bitmap cache.eugeni2007-04-201-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23035 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
* 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-011-2/+2
| | | | | | | 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
* 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
* 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.eugeni2007-02-201-3/+6
| | | | | | | Fixes bugzilla #762. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22287 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix display order of events.eugeni2007-02-201-4/+0
| | | | | | | Starting time does not matter, it depends on Layer and ReadOrder only. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22286 b3059339-0415-0410-9bf9-f77b7e298cf2
* Both (-1) and 1 mean bold font in SSA/ASS styles.eugeni2007-02-191-4/+4
| | | | | | | The same for italics and some other fields. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22281 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add \t(\b) support.eugeni2007-02-191-3/+4
| | | | | | | Contradicts the specification, but supported by all other renderers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22280 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix bounding box calculation with \fscx/\fscy.eugeni2007-02-191-2/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22279 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix \fscx/\fscy animation.eugeni2007-02-191-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22278 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct implementation of text spacing.eugeni2007-02-191-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22277 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reallocate event_images_t, removing limit on simultanious events count.eugeni2007-02-191-23/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22276 b3059339-0415-0410-9bf9-f77b7e298cf2
* Restore a minus sign that was lost in r22231.eugeni2007-02-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22239 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement \frx and \fry (and reimplement \frz) as 3d rotations.eugeni2007-02-161-22/+104
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22233 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently name z-axis rotation angle "frz".eugeni2007-02-161-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22232 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move conversions between 16.16, 26.6 fixed point and int, double to separateeugeni2007-02-161-17/+17
| | | | | | | functions. Some rounding errors are fixed along the way. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22231 b3059339-0415-0410-9bf9-f77b7e298cf2
* \r resets \frz to style value.eugeni2007-02-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22227 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix \t(\frz) handling.eugeni2007-02-151-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22226 b3059339-0415-0410-9bf9-f77b7e298cf2
* \org(0,0) is different from no \org at all.eugeni2007-02-151-1/+4
| | | | | | | Use render_context.have_origin to tell them apart. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22225 b3059339-0415-0410-9bf9-f77b7e298cf2
* Bugfix: glyph and bitmap pointers could be left uninitialized aftereugeni2007-01-291-4/+3
| | | | | | | | get_glyph(). Based on a patch by Stanislav Maslovski (stanislav d maslovski a gmail d com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22063 b3059339-0415-0410-9bf9-f77b7e298cf2
* Keep reselected fonts in an array, adding new ones to the end. Glypheugeni2006-12-161-1/+1
| | | | | | | | | | | | lookup prefers earlier opened fonts. This way glyph lookup is stable, which means that: - cache cleanup is never required after font reselecting; - a single unrecognized char won't change the appearance of all the others. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21635 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a mistakenly committed debug printf.eugeni2006-12-161-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21633 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ascender, descender, and kerning computation to ass_font.c.eugeni2006-12-161-33/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21630 b3059339-0415-0410-9bf9-f77b7e298cf2
* Speed up ASS subtitles display by detecting changes between two consecutiveeugeni2006-12-061-10/+84
| | | | | | | rendering results. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21522 b3059339-0415-0410-9bf9-f77b7e298cf2
* Open embedded fonts directly from memory.eugeni2006-12-031-2/+2
| | | | | | | | | FontConfig 2.4.2 (released yesterday) supports scanning fonts with FcFreeTypeQueryFace without writing them to disk. With earlier FontConfig versions, the old mechanism is used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21476 b3059339-0415-0410-9bf9-f77b7e298cf2
*