summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
Commit message (Collapse)AuthorAgeFilesLines
* fontselect: malloc and error checkingGrigori Goronzy2015-07-101-1/+6
| | | | | | | | Add malloc checks with useful semantics and error checks in some specific cases. This should hopefully make fontselect more robust. The platform-specific font providers (DirectWrite/CoreText/FontConfig) still need to be checked for proper memory management.
* directwrite: add initial fontselect implementationfeliwir2015-07-101-0/+1
| | | | Incomplete, leaks memory, but capable of rendering something.
* fontselect: expose a fontprovider listing APIStefano Pigozzi2015-07-101-0/+8
| | | | | | This allows client code to query libass for the font providers it was compiled with. It can be useful for clients so that they can show selection interfaces to their users.
* fontselect: expose a fontprovider selection APIStefano Pigozzi2015-07-101-2/+19
| | | | | | | | | Allow the user of libass to select the font provider from ass_set_fonts. This API change actually doesn't break client code which was passing `fc=1`; now the same value will autodetect a usable font provider. Also add an api to list available font providers as that is useful for client code to show drop down menus with a font provider to choose from.
* fontselect: coretext: allow selection based on PostScript nameStefano Pigozzi2015-07-101-1/+2
| | | | | | | | | | | Up until now fontselect used the face index to identify which font to load from a font collection. While this pretty convenient when using something freetype based like fontconfig, it seems to be somewhat freetype specific. CoreText uses the PostScript name as the unique identifier of a font. This commit allows to use that instead of the index to decide which face to open with FT_New_Face. To use the PostScript name the provider must return a -1 index and the PostScript name.
* Export font provider interfaceGrigori Goronzy2015-07-101-0/+35
| | | | | | | Add wrapper to the ASS_Renderer to create a font provider from its internal font selector and shuffle some code around to export everything that's needed for font providers to the public. Document font provider functions.
* Release 0.12.30.12.3wm42015-06-301-1/+1
|
* Release 0.12.20.12.2wm42015-05-071-1/+1
|
* Allow more fine grained control over style overrideswm42015-02-261-16/+71
| | | | | | | | Add tons of ASS_OVERRIDE_ flags, which control whether certain ASS_Style fields are copied when doing selective style overrides with ass_set_selective_style_override_enabled(). This comes with some cleanup. It should be fully backwards-compatible.
* Add extern "C" guard to public headerOleg Oshmyan2015-01-161-0/+8
| | | | | | Our public headers can be #included from C++. Hence, ass.h needs an extern "C" guard to declare the correct linkage for functions. ass_types.h only defines types, so it does not need a guard.
* Update version and changelog0.12.1wm42015-01-071-1/+1
|
* Update version and changelog0.12.0Grigori Goronzy2014-10-231-1/+1
|
* Provide slightly more fine-grained control over style overrideswm42014-10-171-4/+25
|
* Add a mechanism for selective style overrideswm42014-06-051-1/+27
| | | | | | | | | | | | | | | This adds 2 new API functions: ass_set_selective_style_override() ass_set_selective_style_override_enabled() They can be used to force dialog text to use a specific ASS_Style. It uses a fuzzy heuristic for that, and the quality of results may vary. It does style overriding selectively and tries not to override things that need explicit styling. The heuristic for that isn't set in stone either, and can change with future libass versions. Closes libass#88.
* Add BorderStyle=4, background color for textwm42014-06-011-1/+1
| | | | | | | | This is somewhat similar to BorderStyle=3, but with a number of differences. Mainly, this new BorderStyle doesn't create overlaps within an event. Closes #105.
* Update version info and changelog0.11.2Grigori Goronzy2014-04-251-1/+1
|
* Fix API documentation of change detectionGrigori Goronzy2014-03-061-2/+2
|
* Update version info and changelog0.11.1Grigori Goronzy2014-02-191-1/+1
|
* Update version infoGrigori Goronzy2014-02-181-1/+1
|
* Add ass_library_version()wm42013-11-251-1/+8
| | | | | | Based on the patch by chadr123. See google code issue #113.
* Restore hintingwm42013-09-241-0/+7
| | | | | | | | | | | | | | | | | | | This was broken since commit f780146. For reasons why, read the commit message of that commit. To make it short, we set the font size to something large and constant (256), and scale the font outlines returned by freetype to the size we need in order to get smooth animation and accurate positioning. Of course, this obviously breaks hinting. Fix hinting by not using the hack mentioned above if hinting enabled. To mitigate the issues caused by freetype grid fitting and extremely bad ASS scripts (such as setting font size to very small values and scaling them up with \fscx/y), we still adjust the font size such that the font is never scaled in Y direction (only in X direction, because the \fscx/y tags can change aspect ratio). Also see google code issue #46.
* Bump LIBASS_VERSIONwm42013-04-121-1/+1
| | | | The ABI was broken and a new API function were introduced.
* Add ass_set_pixel_aspect(), deprecate ass_set_aspect_ratio()wm42013-03-291-10/+52
| | | | | | | | | | | | ass_set_aspect_ratio() is confusing, because it takes a DAR and SAR value, while libass just needs a single pixel aspect ratio. Introduce ass_set_pixel_aspect(), which sets the pixel aspect ratio directly. ass_set_aspect_ratio() is considered deprecated. There's no reason to remove it, but hopefully directing users to ass_set_pixel_aspect() will make for a simpler API. Improve the doxygen and document what ass_set_margins() actually does.
* Don't overwrite user-defined aspect ratio settingswm42013-03-291-2/+11
| | | | | | | | | | | | | | | | | | | | | ass_set_storage_size() overwrote the user-defined aspect ratio set with ass_set_aspect_ratio(). Change it so that if ass_set_aspect_ratio() is used, the ass_set_storage_size() parameters are not used for any aspect ratio calculations. (The storage size is still used for calculating the blur scale.) This simplifies the code as well, because the aspect ratio is now centrally calculated in ass_start_frame(). Update the doxygen. Make it clear that ass_set_storage_size() will be used for aspect ratio calculation, unless ass_set_aspect_ratio() is used. Also mention what libass actually does with the dar and sar parameters: it uses them to calculate a pixel aspect ratio, nothing else. Explicitly allow resetting the storage size with w=h=0. Document that it's allowed to remove the user defined aspect ratio by setting a pixel aspedct ratio of 0. See issue 6.
* Add type field to ASS_Image structwm42013-03-201-0/+7
| | | | Patch by chrisburel, posted on Google code issue 31.
* Add ass_set_storage_size and fix related scaling issuesOleg Oshmyan2013-03-031-0/+9
| | | | | | | | \blur radius is not scaled from script to storage resolution but is scaled from storage to display resolution. The same applies to borders and shadows if ScaledBorderAndShadow is "no". (If it is "yes", borders and shadows are scaled from script to display resolution just like before.)
* Add ass_set_line_position() API function for subtitle positionwm42012-10-011-1/+9
| | | | | | | | This allows users to change the vertical position of normal subtitles. MPlayer has such a feature as -sub-pos option using its internal subtitle renderer. Bump LIBASS_VERSION to indicate the API addition.
* Bump version to 0.10.00.10.0Grigori Goronzy2011-09-251-1/+1
|
* Runtime shaper selectionGrigori Goronzy2011-08-081-0/+20
| | | | | | | Add an API call, ass_set_shaper, and infrastructure to make shapers selectable at runtime. Currently, this allows to switch between two shapers: a SIMPLE shaper that maps to FriBidi and a COMPLEX shaper that maps to HarfBuzz.
* Bump version0.9.12Grigori Goronzy2011-05-301-1/+1
|
* Relicense to ISCGrigori Goronzy2010-09-281-12/+10
| | | | | | In hope to make libass as useful as possible, relicense libass to ISC, a simplified 2-clause BSD license. All contributors who provided non-trivial changes have granted their permission for this.
* Bump autoconf version and LIBASS_VERSION0.9.11Grigori Goronzy2010-08-111-1/+1
|
* Add API function to flush all eventsGrigori Goronzy2010-05-311-1/+7
| | | | | | 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).
* Bump LIBASS_VERSION0.9.9Grigori Goronzy2010-03-011-1/+1
|
* Do not try to render if fonts have not been configuredGrigori Goronzy2010-02-061-0/+2
|
* 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.
* Fix minor typoGrigori Goronzy2009-10-111-1/+1
|
* Fix libass w/o fontconfigGrigori Goronzy2009-10-111-0/+3
| | | | | | | | | 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.
* Bump version to 0.9.8Grigori Goronzy2009-09-181-1/+1
|
* Bump LIBASS_VERSION due to renamesGrigori Goronzy2009-08-061-1/+1
|
* Rename typedefs (breaks API)Grigori Goronzy2009-08-061-41/+41
| | | | | | Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it.
* Cosmetics: add parameter name in prototypeGrigori Goronzy2009-08-051-1/+1
|
* Clarify the AR parameter meaningsGrigori Goronzy2009-08-051-3/+3
| | | | Use the correct terms (SAR/DAR) for the aspect ratio parameters.
* Clean up typedefs/structsGrigori Goronzy2009-07-281-5/+2
| | | | | Remove useless _s suffix from struct names and remove struct name where not needed (only the typedef'd struct is used). Clean up API headers.
* Improve message callback APIGrigori Goronzy2009-07-261-2/+2
| | | | | | Instead of passing a pointer to a va_list, pass the va_list itself. Additionally, use const char for the format string and use names in the prototype that describe the arguments' meaning.
* Document ass_hinting enumGrigori Goronzy2009-07-241-1/+7
| | | | Add a note to the docs regarding hinting method choice.
* Factor out bitmap buffer copyGrigori Goronzy2009-07-211-1/+11
| | | | | | | For clarity, factor out bitmap copying into a function. Do not pad the bitmap with stride in the last row; this can not by guaranteed anyway. Add a comment about this peculiarity to the API documentation in ass.h Idea by Evgeniy Stepanov.
* Introduce simple cache memory managementGrigori Goronzy2009-07-191-0/+11
| | | | | | | | | | | libass' cache was basically unmanaged; it would grow without any limits, depending on how complex the subtitles are. Introduce a simple limiting that resets the cache if certain limits are exceeded. The bitmap cache is limited to approx. 50 MB size by default, while the glyph cache allows storing up to 1000 glyphs by default. A few tests with rather heavily softsubbed fansubs show that these limits are fine. The API was extended with the function ass_set_cache_limits which allows modification of these limits.
* Improve API headers and documentationGrigori Goronzy2009-07-171-42/+146
| | | | | | Improve APi documentation; each function is properly documented now. Add a new macro LIBASS_VERSION that encodes the version in a hexadecimal format, similar to OpenSSL. Fix formatting of the headers.
* Improve fontconfig setupGrigori Goronzy2009-07-171-2/+9
| | | | | | | Add an argument to ass_set_fonts for controlling whether the fontconfig font cache should be built/updated. Add a new function ass_fonts_update to make it possible to update fonts later on. Additionally, stop using FcConfigSetDefault for thread safety.
* Allow passing user data to callbackGrigori Goronzy2009-07-121-1/+2
| | | | | | It is often useful or necessary to pass custom data to a callback. Add an argument to the callback registering function to pass a void pointer object to the callback each time it is called.
* Message callback funtionalityGrigori Goronzy2009-07-111-0/+4
| | | | | | | | | | | Introduce functionality for providing a message callback that is used for passing messages to the controlling application instead of simply printing them to standard output. The function pointer to the callback is stored in the ass_library_t instance. ass_msg needs access to it, so in many places the library instance needs to be passed around now. The default behavior is the old one: messages of MSGL_INFO or lower are printed to the standard output, prefixed with "[ass]".
* Remove read_file_recode from APIGrigori Goronzy2009-07-011-2/+0
| | | | | | read_file_recode is only used internally in ass_read_file and shouldn't be exposed in the API. Remove the prototype from ass.h and declare it static.
* API: make process_force_style availableGrigori Goronzy2009-06-291-0/+2
| | | | | Rename process_force_style to ass_process_force_style and make it available in the DSO.
* PAR correction for rendering at non-video resolutionGrigori Goronzy2009-06-291-1/+1
| | | | | | | | | | | | | | | The most prominent ASS/SSA renderer (VSFilter) conveniently ignores the real aspect ratio, and everyone seems to rely on that. This is fine when the subtitles are rendered before anamorphic video is stretched to its native aspect ratio, but results in wrongly stretched text with native renderers (EOSD). It can be fixed by making libass aware of the pixel ratio of the video. ass_set_aspect_ratio now requires an extra argument that specifies the pixel ratio, which is just width / height of the video after decoding. Glyphs are stretched in x direction before transformation (rotation, shearing), so there are still issues with transformed glyphs to be fixed.
* ass_set_fonts: optionally pass fontconfig config pathgreg2009-06-201-1/+3
| | | | | | | Optionally pass a fontconfig config file to the fontconfig initialisation. This changes the public API.
* Remove wrappers for ass_set_fontsgreg2009-06-201-0/+1
| | | | | | | | | ass_set_fonts_ was wrapped through ass_set_fonts and ass_set_fonts_nofc to either use fontconfig or not. This is not very useful, since a simple parameter to ass_set_fonts_ can be used instead. Remove the wrapper functions and rename the real function to ass_set_fonts. This changes the public API.
* Reindent all source code.greg2009-06-201-50/+49
| | | | | | | | | | | | | | | Reindent complete source code (*.c, *.h) with indent, the exact command line being: indent -kr -i4 -bap -nut -l76 *.c *.h From now on, new code should use (more or less) K&R style, only spaces and no tabs, 4 spaces indent width. Avoid long lines. Fix function declaration pointer spacing. Remove spaces that were added to many function declarations by indent, like some_func(foo_t * bar). Fix indenting of macros in ass.c
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* libass: fix type mismatch between size parameter and the way it's usedaurel2008-09-051-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27531 b3059339-0415-0410-9bf9-f77b7e298cf2
* libass: add a new ass_process_data() to process demuxed subtitle packetsaurel2008-09-051-0/+8
| | | | | | | conforming to the ASS spec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27530 b3059339-0415-0410-9bf9-f77b7e298cf2
* Speak of libass instead of MPlayer in the libass license headers.diego2008-05-141-4/+4
| | | | | | | | We already use LIBASS_ prefixes for the multiple inclusion guards. Thus libass can be considered separate enough to warrant this. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26770 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use standard license header.diego2008-05-131-16/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove libass dependency on global font_fontconfig variable.eugeni2008-04-301-0/+5
| | | | | | | | | A new function (ass_set_fonts_nofc) is introduced instead of an extra argument to existing ass_set_fonts to keep binary compatibility with older versions of the library. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26614 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing header #includes to fix 'make checkheaders'.diego2008-03-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently give all libass multiple inclusion guards a LIBASS_ prefix.diego2008-01-291-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25927 b3059339-0415-0410-9bf9-f77b7e298cf2
* Copy font data to ass_library instead of referencing demuxer-owned memory.eugeni2008-01-071-0/+5
| | | | | | | 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
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* typodiego2007-12-301-1/+1
| | | | 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
* Enable ass_line_spacing option.eugeni2007-09-181-0/+1
| | | | | | | Patch by Thomas Reitmayr (treitmayr devbase at). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24574 b3059339-0415-0410-9bf9-f77b7e298cf2