In the function calculating the tangent to a cubic bezier
at a given t, the atan was calculated using dx over dy,
instead of dy over dx. The error was visible during
the animation using auto-orient = true.
Rather than aiming for extremely high accuracy,
a compromise can achieve with better performance.
This modification helps prevent unnecessary image rotation.
issue: https://github.com/thorvg/thorvg/issues/2265
Implementation of the roundness property
for a polystar. Only the corners that were
not subject to rounding by the inner or
outer roundness parameters are affected.
@Issue: https://github.com/thorvg/thorvg/issues/2230
The string passed to the svg parser is not guaranteed to always be a valid string.
Certain strings may have numbers that cannot be converted.
Therefore, make sure to check whether the converted value is in the appropriate range before returning.
related issue: https://github.com/thorvg/thorvg/issues/2078#issuecomment-2037495121
Dashed curves require greater precision in calculating
their lengths and while splitting Bezier curves.
Otherwise, it results in visual discrepancies compared
to the expected outcomes.
Approximate functions 'bezLengthApprox' and 'bezAtApprox'
used for calculations in the lottie loader.
issue: https://github.com/thorvg/thorvg/issues/1686
Some systems such as micro-processor might not support
the thread feature on the system.
Enhance the portability by compiling the thorvg with toggling the
threading depepdency through the build option.
For this, thorvg newly introduced the internal Key/ScopedLock abstraction
for transparent thread-locking dependnecy.
To turn off the thread feature, please use the next build option:
$meson setup build -Dthreads=false ...
Note that, the thread feature is enabled in default.
Turning off the thread feature could reduce the binary size by 7kb.
issue: https://github.com/thorvg/thorvg/issues/1900
ttf is an industry standard format that is the most widely used
in the products. Now thorvg supports the basic features of
the font to supplement the text drawing.
The implementation is followed the ttf spec,
the covered features are:
- horizontal layouting with kerning.
- utf8 -> utf32 converted glyph drawing.
To use the feature, please enable ttf loader:
$meson -Dloaders="ttf_beta, ..."
@Issue: https://github.com/thorvg/thorvg/issues/969
The loader cache is applied to conserve memory.
If the input data is already present in loaders,
the loader cache will promptly return the active loader.
This results in a lot of memory savings for the duplicated resources.
binary diff: -400 bytes
Inline lists mean that their nodes' pointers are part of the same memory as the data.
This has the benefit of fragmenting memory less and avoiding node->data indirection.
- The TVG binary format now consistently compresses the data.
- Removed redundant internal properties as part of this change.
Please note that this change will break compatibility with the TVG file format from version 1.0 onward.
Issue: https://github.com/thorvg/thorvg/issues/1372