summaryrefslogtreecommitdiffstats
path: root/libass/ass_shaper.h
Commit message (Collapse)AuthorAgeFilesLines
* shaper: add FriBidi error handlingGrigori Goronzy2014-05-291-1/+1
| | | | | | It is unlikely, but FriBidi might not process a string correctly, and we should handle that. Tested by making it fail always. This should also fix some compiler warnings.
* Fix fribidi include pathwm42013-07-171-1/+1
| | | | | The old include statement works only by coincidence, and will actually break the build on certain setups.
* Runtime shaper selectionGrigori Goronzy2011-08-081-0/+1
| | | | | | | 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.
* Support language hint in the Script Info sectionGrigori Goronzy2011-08-011-0/+1
| | | | | | Parse a hint in the form "Language: xx" with xx being an ISO 639-1 language code, and pass it to HarfBuzz. This can be useful to render scripts with language-specific character variants.
* Cache HarfBuzz fontsGrigori Goronzy2011-07-151-0/+2
| | | | | | Add a new opaque data structure to store shaper-specific font data in an ASS_Font. At the moment, this is used for caching HarfBuzz fonts, to reduce allocation and font initialization overhead.
* Use the "font encoding" property as a base direction hintGrigori Goronzy2011-07-151-0/+2
| | | | | | | | | | ASS specifies a "font encoding", both in the styles as well as with the \fe override tag. This font encoding is very Windows-specific and libass doesn't use it for charmap matching or anything like that. However, it can be useful for hinting the base direction of text. Make Hebrew and Arabic encodings switch to RTL base direction, other languages to LTR and use neutral base direction for the autodetect setting.
* Add kerning toggle for HarfBuzz shapingGrigori Goronzy2011-07-131-0/+1
| | | | | Make the "Kerning" track property toggle the OpenType feature "kern". The old TrueType kerning code won't come back.
* Introduce ASS_Shaper objectGrigori Goronzy2011-07-131-7/+13
| | | | | | Encapsulate all data related to shaping into this new object and migrate all shaping-related code to it. The object is long-living; arrays are allocated only once and then grown as needed.
* Support glyph clusters of multiple glyphsGrigori Goronzy2011-07-111-0/+1
| | | | | | | | | Sometimes a glyph cluster resolves to multiple glyphs, for example when diacritics are used with Arabic script. This doesn't map well to the list of glyphs expected by libass. Extend the glyph list to a list of singly-linked glyph clusters of glyphs and adapt the renderer to support this.
* shaper: print version info stringGrigori Goronzy2011-07-061-0/+1
|
* Provisional bidi and shaping supportGrigori Goronzy2011-07-061-0/+28
Adds fully working bidirectional text and simple shaping support. The following works: - bidirectional text according to the Unicode Bidirectional Algorithm - simple shaper for mirrored forms (brackets, etc.) according to rule L4 of the Unicode Bidirectional Algorithm - reordering into visual order with correct line wrapping However, the implementation certainly needs efficiency improvements (caching, less malloc'ing), a proper shaper (HarfBuzz) needs to be hooked up and various bugs with karaoke and positioning need to be fixed.