summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* Add support for \fs+ and \fs- syntaxGrigori Goronzy2010-08-121-0/+16
| | | | | | | These forms can be used to add or subtract a value from the current font size instead of setting a new font size. Animations are supported, but not recommended, as they won't be fluid due to grid-fitting/hinting.
* Only word wrap on spacesGrigori Goronzy2010-08-121-7/+3
| | | | | | It looks like VSFilter only ever wraps on spaces, even if the line length is going to overflow. We should do that as well. Fixes a pretty confusing problem with scrolling vertical text.
* Bump autoconf version and LIBASS_VERSION0.9.11Grigori Goronzy2010-08-111-1/+1
|
* Set AM_CFLAGS instead of CFLAGS directlyGrigori Goronzy2010-08-091-0/+2
|
* Get rid of NULL checks for freeGrigori Goronzy2010-08-097-52/+33
| | | | | The useless "if (foo) free(foo)" idiom is all over the place, just get rid of it finally...
* Fix another minor leak (event_format overwriting)Grigori Goronzy2010-08-091-0/+1
|
* Fix leaking of script-embedded fontsGrigori Goronzy2010-08-091-4/+2
|
* Fix drawing leakage: delay glyph allocationGrigori Goronzy2010-08-094-15/+17
| | | | | | Delay allocation of the "faux" glyph until a drawing is parsed. This helps with fixing a (pretty bad) memory leak and also reduces frame overhead a little.
* POSIX compliance: add strings.h include where appropriateGrigori Goronzy2010-08-074-0/+4
| | | | | strcasecmp/strncasecmp needs strings.h according to POSIX, so add this include where these occur.
* Add missing config.h includeGrigori Goronzy2010-08-071-0/+2
|
* Version bump0.9.10Grigori Goronzy2010-08-061-2/+2
| | | | | Increment shared library revision (due to API additions) and autoconf version.
* Fall back to first charmap as last resortGrigori Goronzy2010-08-011-0/+8
| | | | | | If we're already after the font reselection stage and a glyph cannot be found in a font, try again with the first charmap as a last resort. This is needed for old "symbol" fonts, for example.
* Raise verbosity level of "unknown transition effect" messageGrigori Goronzy2010-08-011-1/+1
| | | | This is more irritating than it helps and can seriously spam output.
* Check vector clip mask bounding box sizeGrigori Goronzy2010-08-013-6/+15
| | | | | | Similar to regular glyphs, check the bounding box of the clip mask and refrain from rendering humongous masks, which can take up considerably memory.
* Fix TextInfo reallocationGrigori Goronzy2010-08-011-1/+1
|
* Don't initialize bitmap hash key with bogus valuesGrigori Goronzy2010-08-011-2/+0
|
* refactor: extract glyph hash key fillGrigori Goronzy2010-08-011-24/+34
|
* refactor: move transformation/projection functionsGrigori Goronzy2010-08-011-80/+75
| | | | Gets rid of another forward declaration.
* Cosmetics: various cleanups in ass_render.cGrigori Goronzy2010-08-011-43/+36
| | | | | Cosmetical simplifications, fix whitespace where useful, remove deprecated comments.
* Handle allocation failure of clipped bitmapsGrigori Goronzy2010-08-011-0/+2
|
* Check ASS_Image allocationGrigori Goronzy2010-08-011-7/+13
|
* refactor: remove unneeded includesGrigori Goronzy2010-08-011-15/+1
| | | | These are included by ass_render.h already.
* refactor: move ASS_Renderer getters/setters/etc into separate fileGrigori Goronzy2010-08-014-126/+147
|
* refactor: extract bitmap hash key fillGrigori Goronzy2010-08-011-96/+80
|
* refactor: extract cache check/managementGrigori Goronzy2010-08-011-20/+27
|
* Limit (bitmap) glyph cache sizeGrigori Goronzy2010-08-012-4/+11
| | | | | | | | | | Now that bitmap glyphs (for vector clip masks) are stored in the glyph cache, make sure it cannot grow indefinitely easily. Similar to the bitmap cache, track approximate size of the cached elements and reset if the cache exceeds a certain limit. Also, reduce default bitmap cache size to 30 MB as we have essentially two bitmap caches now. That's still plenty in all use cases where caching matters.
* Fix potential, small memory leakGrigori Goronzy2010-07-291-0/+1
| | | | | Free clip vector drawing if multiple clip vectors appear in a single line. (In this case the last clip vector is used.)
* Parse vector clip mask only after cache missGrigori Goronzy2010-07-292-16/+23
|
* Remove debugging leftoversGrigori Goronzy2010-07-291-21/+0
|
* Fix drawing cbox calculationGrigori Goronzy2010-07-292-2/+19
| | | | | | Use extremes of all points fed to the parser, instead of only points that are added to the outline. Fixes a rendering problem reported on IRC and should fix Issue #7.
* Cache vector clip masksGrigori Goronzy2010-07-221-11/+31
| | | | | Cache pre-rasterized vector clip masks, big speedup if vector clipping is used extensively.
* refactor: move position translation functionsGrigori Goronzy2010-07-221-55/+51
| | | | Gets rid of a few forward declarations.
* Better PAR correctionGrigori Goronzy2010-07-221-29/+48
| | | | | | | | | | PAR correction so far merely applied a horizontal scaling factor to glyphs right after loading. This screws up transformed text, unfortunately. It's a much better approach to typeset text without correction and scale everything at the very end. In MPlayer, an EOSD rendering now looks exactly the same as a video filter rendering (except for more sharpness in the EOSD case).
* Limit debug output on parsing errorsGrigori Goronzy2010-07-192-2/+2
| | | | Limit context printed after parsing errors to 30 characters
* Drawing cache: include scale factor in hash keyGrigori Goronzy2010-07-141-1/+5
|
* Avoid unnecessary conditional and initializationsGrigori Goronzy2010-07-141-4/+3
|
* ASS_Drawing: do not free glyphGrigori Goronzy2010-07-141-2/+0
| | | | | The glyph is inserted into the cache and freed upon cache reset, so it shouldn't be freed alongside the drawing.
* Fix match_fullname loopGrigori Goronzy2010-07-111-1/+2
| | | | | Let's loop over everything and not just the outline check. *sigh* Fixes a crash reported by lachs0r on IRC.
* Simple optimizations to memory handlingGrigori Goronzy2010-06-272-7/+4
|
* Reduce number of glyph copiesGrigori Goronzy2010-06-271-16/+18
| | | | | | | | | Do not copy glyphs when it isn't really needed. Profiling with valgrind's callgrind showed that FT_Glyph_Copy takes a big fraction of the rendering time (~40%) for "simple styled softsubs" cases. It turned out that glyphs are duplicated much more often than is necessary. Reducing the number of copies cuts down the rendering time for the "simple styled softsubs" case by about 70%!
* Add fixups for various font defectsGrigori Goronzy2010-06-263-82/+128
| | | | | | | | Reverse "outside" contours with wrong winding correction, require that a contour is "inside" for considering its removal; Move this hack into ass_font.c, where it belongs. Initial patch by uau.
* Improve fullname matchingGrigori Goronzy2010-06-261-5/+18
| | | | | | | | Only match outline fonts and take slant and weight into consideration. This matches all font faces which have at least the slant/weight that is requested. This fixes issue 23; however, corner cases can be constructed in which wrong fonts will be matched, if multiple slant/weight variants of the same font exist, but that is very unlikely in practice.
* Fix off-by-one error in cbox calculationGrigori Goronzy2010-06-071-1/+1
| | | | | The last point wasn't included in cbox calculation, sometimes triggering removal of inside contours when it wasn't needed.
* Export ass_flush_events symbolGrigori Goronzy2010-06-021-0/+1
| | | | Fix for previous commit.
* Add API function to flush all eventsGrigori Goronzy2010-05-312-1/+21
| | | | | | Add a function to flush all events in a track and increment LIBASS_VERSION to indicate the addition. Initial patch by Aurelien Jacobs (aurel AT gnuage DOT org).
* Handle simple backquotingClément Bœsch2010-05-221-0/+8
| | | | This allows this kind of subtitle to be displayed: \{Hello World\}
* Fix ascender/descender scalingGrigori Goronzy2010-05-171-1/+1
| | | | Partially reverts 162a735b6b2dba13022f96db42a3f153cf28033e.
* Use first Windows charmap as fallbackGrigori Goronzy2010-04-181-2/+13
| | | | | | Extend the charmap selection heuristics to select the first Windows charmap if no Unicode charmap is found. Fixes one particular font, FGP楷書体NT-M, and possibly others.
* Support multiple faces per attachment correctlyGrigori Goronzy2010-04-172-2/+2
| | | | | | | | Store the real font face id instead of using 0 all the time and use the real font face id for font lookup as well. This makes font attachments with multiple faces work correctly. Thanks to ubitux and uau!
* Simplify: FreeType glyph load flagsGrigori Goronzy2010-04-111-2/+2
|
* Use vertical ascender only for rotated glyphsGrigori Goronzy2010-04-111-1/+1
|
* Completely disable transforms when loading a glyphGrigori Goronzy2010-04-111-0/+1
| | | | Might save a few cycles.
* Do not rotate glyphs below lower bound (GDI)Grigori Goronzy2010-04-111-31/+20
| | | | | | GDI does not use vertical writing for glyphs below a certain unicode codepoint. To make this work correctly, refactor glyph transformations a bit.
* Calculate vertical layout ascender/descenderGrigori Goronzy2010-04-111-0/+3
| | | | | Calculate ascender for rotated glyphs from the maximum advance width. Works OK usually, but screws up with fonts that miss this information.
* Basic @font supportGrigori Goronzy2010-04-115-14/+40
| | | | | | Do not skip '@' at the start of a font name in styles; detect '@' at font name start and set a new attribute in ASS_Font accordingly. Rotate affected glyphs after loading and calculate a suitable advance.
* Ignore global advance width unconditionallyGrigori Goronzy2010-04-101-5/+5
| | | | | | | | | | Some (arguably) broken CJK fonts claim to have a fixed advance width, but they actually use two different widths for half-width and full-width characters. Even worse, some use proportional width. This can cause problems under certain circumstances. A big project (Cairo) uses a FreeType load flag to ignore the global advance width for such fonts, so I assume it can be used safely. Let's do it just like them.
* Bump LIBASS_VERSION0.9.9Grigori Goronzy2010-03-011-1/+1
|
* Cosmetics: remove underscore prefix from _select_font functionGrigori Goronzy2010-02-131-4/+4
|
* fontconfig: consider fullname for matching fontsGrigori Goronzy2010-02-121-3/+61
| | | | | | | Additionally match fonts via the fullname (or name for humans) and prefer these matches. Previously, libass matched against the family name only and this name can be completely different from the fullname (which is used by VSFilter!).
* Move frame size setup into ass_reconfigureGrigori Goronzy2010-02-121-16/+15
| | | | It isn't needlessly run every frame this way. Also it's cleaner.
* Update documentation to reflect fontconfig changesGrigori Goronzy2010-02-121-2/+2
|
* Remove file size limit in ass_read_fileGrigori Goronzy2010-02-061-9/+0
| | | | | | If an application wants to provide some sort of safeguard against loading very big files (which can trash memory), it should do so by itself.
* Use font scaling coefficient 1.0 by defaultGrigori Goronzy2010-02-061-0/+2
|
* Do not try to render if fonts have not been configuredGrigori Goronzy2010-02-062-0/+5
|
* Clarify that libass expects subtitle packets in Matroska formatGrigori Goronzy2010-02-021-3/+4
|
* Update ass_set_fonts_dir documentationGrigori Goronzy2010-02-021-3/+5
| | | | | Now that libass never extracts fonts anymore, update documentation accordingly.
* Skip border generation if glyph is collapsedGrigori Goronzy2010-01-211-2/+3
| | | | | | | | | If a character is completely collapsed in x or y direction (\fscx0, \fscy0), the rasterizer will not generate any visible pixels. This also means vsfilter will never draw any border in this case, since it works on the pixel data. FreeType's stroker OTOH happily draws a border around a character, no matter how collapsed it is. Emulate vsfilter's behavior by skipping border generation if the glyph is collapsed.
* Adjust a few message levels and message textsGrigori Goronzy2010-01-192-5/+5
|
* Up size limit for script filesGrigori Goronzy2010-01-191-2/+3
| | | | | | Change size limit from 10MB to 50MB and clean up code a bit. A limit still might be handy if one selects a very big file for subtitles by accident. 50MB should be enough for even the biggest karaoke files.
* Fix a warning due to added constnessGrigori Goronzy2010-01-121-1/+1
|
* Fix leftovers from conversion to ass_strtodYuriy M. Kaminskiy2010-01-122-4/+6
|
* Constify table in ass_strtodYuriy M. Kaminskiy2010-01-121-0/+2
|
* Remove support for freetype < 2.2.1Grigori Goronzy2010-01-082-15/+0
| | | | | Get rid of compatibility #ifdefs and some code to support very old versions of freetype. libass now requires at least version 2.2.1.
* Remove support for fontconfig < 2.4.2Grigori Goronzy2010-01-081-119/+1
| | | | | Get rid of compatibility code and #ifdefs for very old fontconfig versions. libass now requires at least version 2.4.2.
* Use conversion functions to generate cache keysGrigori Goronzy2010-01-071-6/+6
| | | | | Use the fixed-point conversion functions instead of (slightly incorrect) manual conversion.
* Improve rotation cache accuracyGrigori Goronzy2010-01-072-3/+18
| | | | | | In some cases 16.16 precision is not good enough. Instead use 10.22 and use modulo 360.0 on the angles to make overflows impossible and improve cache hit ratio sometimes.
* Don't flag for freeing if codepage is unspecifiedGrigori Goronzy2010-01-061-5/+6
| | | | Patch by Arne Morten Kvarving <spiff@micron.(none)>.
* Reset clip_mode on new eventsGrigori Goronzy2010-01-051-0/+1
| | | | | | | Make sure that the clip mode is reset to regular on new events. Otherwise events after an event that used inverse clip will also use inverse clip. Ouch! Usually the symptom is that subtitles become invisible as the whole screen is clipped.
* Replace strtod with locale-independent strtodGrigori Goronzy2010-01-054-4/+254
| | | | | | | | | strtod respects the locale and in some locales, the decimal separator is not a point, leading to parsing errors in tags like \pos(23.4,5), which are perfectly valid. As there isn't a really portable way to use a particular locale just for one call to strtod, reimplement it. The implementation was taken from the 1.8 branch of Ruby.
* Fix minor typoGrigori Goronzy2009-10-111-1/+1
|
* Fix libass w/o fontconfigGrigori Goronzy2009-10-115-28/+41
| | | | | | | | | Make sure that libass does not crash even if no default font is provided. Additionally, fix crashes related to drawings in this and possibly other unusual cases. Document the default_path and default_family parameters of ass_set_fonts.
* strdup() fontconfig strings freed by callerGrigori Goronzy2009-10-081-3/+5
| | | | | fontconfig_select() can return the path to the default font as fallback, but the caller frees it later. Return a copy with strdup() instead.
* Remove superfluous castGrigori Goronzy2009-10-081-1/+1
|
* Fix alpha calculation in some casesGrigori Goronzy2009-10-021-2/+2
| | | | | Picked up from XBMC svn. This should especially fix MPlayer's direct3d video output (untested).
* Bump version to 0.9.8Grigori Goronzy2009-09-181-1/+1
|
* Refactor: effect parsing should be in ass_parse.cGrigori Goronzy2009-09-163-76/+76
| | | | | Move the function apply_transition_effects, which parses event-global effects and adjusts a few state variables, into ass_parse.c.
* Copy shadow bitmap from glyph bitmap