summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.13.70.13.7Grigori Goronzy2017-06-031-1/+1
|
* Bump ABI version and release 0.13.60.13.6Oleg Oshmyan2017-01-031-1/+1
| | | | | | sizeof(ASS_Style) is actually part of the ABI, so adding the Justify field in commit e54c123d5a08b6212533ddcced2cb1a50fa3d2b2 broke the ABI even though we tried to avoid it by placing the field at the end of the struct.
* Release 0.13.50.13.5Oleg Oshmyan2016-12-291-1/+1
|
* Add text justificationDan Oscarsson2016-11-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Subtitle recommendations often include that multi line subtitles should be left justified as this is easier for the eyes. This is also the standard used by several television companies. This add the possibility to define how subtitles are to be justified, independently of where they are aligned. The most common way could be to set justify to left, and have alignment to center. But you can, for example, have alignment to left and justify to center, giving subtitles to the left but justifed on the center (instead of normal left justified). Using justify right and alignment of center, might be good choice for Arabic. If justify is not defined, all works like before. If justify is defined, subtitles are aligned as defined by alignment and justified as defined by justify. ASS is not extended by this, justify can only be defined by setting Justify to wanted justification.
* Release 0.13.40.13.4Grigori Goronzy2016-10-051-1/+1
|
* Release 0.13.30.13.3Grigori Goronzy2016-09-241-1/+1
|
* Document default value for ass_set_check_readorderOleg Oshmyan2016-02-201-0/+1
|
* ass: add ass_set_check_readorder() API functionwm42015-12-311-1/+11
| | | | | | | | Not all API users will keep the event list on seeking. This also gives the opportunity to API users to handle severely broken files with duplicate ReadOrder entries. (It is not known whether this is really needed, however VSFilter does not deduplicate using the ReadOrder field.)
* ass: declare mixing ass_flush_events() and ass_process_chunk() allowedwm42015-12-311-1/+2
| | | | | | This was always the intention, but the wording could be read as if this is not allowed. There was a bug that broke ass_flush_events() too, which gives all the more reason to clarify this.
* Release 0.13.10.13.1Oleg Oshmyan2015-12-011-1/+1
|
* ass: use a bitmap for checking duplicate eventswm42015-10-121-1/+5
| | | | | | | | | | | | | The loop in check_duplicate_event() essentially makes event processing with ass_process_chunk() O(n^2). Using a bitmap instead of a loop brings it back to O(n). This could be interpreted as an API change: since the event list is freely modifieable by the API user through ASS_Track public fields, libass can't know if the internal bitmap went out of sync with the public event list. We just redefine it so that calling ass_process_chunk() means the API user agrees not to manipulate the event list otherwise.
* Release 0.13.00.13.0wm42015-10-031-1/+1
|
* ass: make font_provider API privatewm42015-08-281-35/+0
| | | | | | | | | | We were discussing whether this should be public or private. It could be public, because the API is potentially useful, and is relatively simple. On the other hand, the API is not necessarily final, and making it public would prevent us from improving/fixing it. Make it private for now - making it public later is much easier than having to break the public API later.
* ass: ass_fonts_update() is a stubwm42015-08-281-2/+2
|
* ass: restore ABI compatibility with older versions (more or less)wm42015-08-281-2/+7
| | | | | | | | | | | While enums normally are ints on most systems, it isn't guaranteed. This might also make C++ code fail to compile, since C++ doesn't allow implicit conversion of ints to enums. If the API user ever passed anything other than 0 or 1, compatibility will still break, but I guess we have to live with this. Also extend the doxygen.
* 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