| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Handle advance of clusters correctly, fix drawings, calculate run
direction correctly, fix y offset sign.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Split up text into runs with the same direction, font face and font
size, shape these runs with HarfBuzz and reorder accordingly.
This noticeably improves Arabic shaping and should make shaping for many
other scripts work. HarfBuzz also does kerning for Latin text.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Split up the combined event parsing and layout loop into two passes.
State information needed for layout are duplicated in GlyphInfo
structures.
|
| |
|
|
|
|
|
|
|
|
| |
Prepare for run-based rendering. In the parser, increment a run id
according to relevant style changes (color, border, shadow, etc.) to
mark the points where a new bitmap needs to be started. Modify the line
wrapper to increment the run ids of each glyph after a break.
Add functions to calculate the render size of runs for rasterization.
|
|
|
|
|
|
|
|
| |
The bitmap hash key duplicated a lot of information the glyph hash
key already saves. The subclassing introduced recently complicates
this even more. Modify the hash key to utilize a pointer to the glyph
hash value instead, which is faster and more flexible. Make sure to
always empty the bitmap cache when the glyph cache is emptied.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
This introduces functions to use and copy pointered outline objects
easily and uses these instead of glyphs everywhere.
Previously the glyph cache was abused for caching vector clipping masks,
but this isn't possible anymore (nor desirable), thus vector clipping
cache has been disabled for the moment.
|
|
|
|
|
|
|
|
| |
- less code, cleaner
- decoupled from ASS_Library
- better data encapsulation
- simpler interface
- avoids a nasty hack
|
| |
|
|
|
|
|
| |
Track if we already parsed a fade or a alignment tag and ignore all
further tags.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Move all code related to parsing event lines and processing override
tags into a separate file (ass_parse.c).
|
|
|
|
|
| |
Mark leading and trailing spaces on lines and adjust layouting code
to respect these marks and skip the spaces.
|
|
|
|
|
|
| |
Consider the bounding box of an event for collision detection instead
of only its vertical position and height. This allows multiple events
per line if they don't overlap.
|
|
|
|
|
|
| |
Parse \q override tag and set a new state variable to its value.
The line wrapping code still needs improvements; wrap style 0/3 are not
entirely correctly implemented and style 1 is not implemented.
|
|
|