summaryrefslogtreecommitdiffstats
path: root/libass/ass_render_api.c
Commit message (Collapse)AuthorAgeFilesLines
* fontselect: expose a fontprovider selection APIStefano Pigozzi2015-07-101-3/+3
| | | | | | | | | 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.
* Export font provider interfaceGrigori Goronzy2015-07-101-0/+7
| | | | | | | 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.
* Restore fontconfig runtime configurationGrigori Goronzy2015-07-101-2/+2
| | | | | | | | | | | Pass the fontconfig configuration file option and enable switch through into the font selector. This restores some of the old functionality related to fontconfig. However, the functionality to delay the fontconfig database update will not come back. This is not a big problem. Later it will be possible to manually add the fontconfig provider, which will delay the update in a comparable way.
* Custom font matching and font sourcesGrigori Goronzy2015-07-101-6/+6
| | | | | | | Implement a simple font sorter (FontSelector) and an interface to deal with multiple font sources (FontProvider). Unfinished business, but works for the most part. Currently the only implemented FontProvider uses fontconfig.
* Allow more fine grained control over style overrideswm42015-02-261-1/+0
| | | | | | | | 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.
* Provide slightly more fine-grained control over style overrideswm42014-10-171-4/+3
|
* Add a mechanism for selective style overrideswm42014-06-051-0/+18
| | | | | | | | | | | | | | | 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.
* Simplify storage size handlingOleg Oshmyan2014-01-261-7/+0
| | | | No functional changes.
* Add ass_set_pixel_aspect(), deprecate ass_set_aspect_ratio()wm42013-03-291-1/+5
| | | | | | | | | | | | 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-13/+3
| | | | | | | | | | | | | | | | | | | | | 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 ass_set_storage_size and fix related scaling issuesOleg Oshmyan2013-03-031-2/+25
| | | | | | | | \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-0/+8
| | | | | | | | 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.
* Add compile time switch for HarfBuzz supportGrigori Goronzy2011-08-081-0/+2
| | | | | | | | | | | | | Now that it's possible to switch shapers at runtime, it also becomes a lot easier to disable them at compile time. Add ifdefs and build system changes so that HarfBuzz can be safely disabled. It's autodetected now and enabled if available. This shuffles a bit of code around, but there are no functional changes. Note that FriBidi remains mandatory for the time being, but this shouldn't pose any problems, since it is a small and very portable library without any special dependencies.
* Runtime shaper selectionGrigori Goronzy2011-08-081-0/+9
| | | | | | | 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.
* cache: unified outline cache for glyphs/drawingsGrigori Goronzy2011-06-271-1/+1
| | | | | | | | | Glyphs and drawings have wildly different hash keys. Subclass the hash keys of glyphs and drawings in a new, unified outline cache. This also fixes some issues with drawings in the glyph cache. Now, the textual description of the drawing is included in the key (the hash value isn't really good enough, especially not fnv32) and the baseline offset is saved as well.
* Much improved cache/hashmap implementationGrigori Goronzy2011-06-071-6/+3
| | | | | | | | - less code, cleaner - decoupled from ASS_Library - better data encapsulation - simpler interface - avoids a nasty hack
* 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.
* refactor: move ASS_Renderer getters/setters/etc into separate fileGrigori Goronzy2010-08-011-0/+141