| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't know what's making 577-multiple-font-families.svg pass on my
machine but fail in CI and in RPM builds. So we'll go back to the old
test files for a while.
Findings so far:
- This doesn't depend on order in which font files are added to
FcConfig - changed test-utils.c to use a different order and nothing
changed.
- During pango_itemize for a layout, I think pango is using the first font in the
fontset that contains the codepoint for a particular character, even
if there are other fonts in the fontset. Maybe ordering is not
constant? But given a PangoFontDescription like "Nonexistent, serif,
sans-serif", why is it not using serif first?
Sigh.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We'll have support for multiple font families soon. We only test with
a sans-serif font, so this commit adds two of the Noto Serif faces for
the test suite.
A few test files that use default font-family (which is "Times New
Roman" for librsvg) get changed to explicitly use "sans", so their
reference PNGs still match the output.
Other test files which have both sans and serif fonts, but got
rendered to sans-only, get their reference PNGs regenerated to match
the newly available faces.
|
|
|
|
|
|
|
| |
I couldn't make it work with bbox.rect_to_transform, so here is an
ugly check directly on the rectangle instead :(
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/593
|
|
|
|
|
|
| |
Hopefully I'm not testing too little by only testing a single function
- they all go through the same internals right now, with checks in a
single place.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The macros g_return_if_fail() and g_return_val_if_fail() just call the
function g_return_if_fail_warning().
We'll implement equivalent macros in Rust, so we can move all the
argument checks for the C API to Rust.
Then we can hopefully remove the C wrapper library that just calls
into Rust immediately.
|
|
|
|
|
|
|
|
| |
There was a cut&paste error in Mask::get_units(). I'm not sure why
the test suite didn't catch this; maybe we don't have a test with the
defaults for maskUnits and maskContentUnits?
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/590
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The example file, created through fuzzing, has a viewBox="0 0 6E20 540".
This creates a non-invertible transform in
AspectRatio.viewport_to_viewbox_transform(), and when the calling code
sets that transform on a cr, it panics because the cr ends up in an
error state.
This commit makes viewport_to_viewbox_transform() return a Result, so
that it returns Err when it would create an invalid transform.
Fixes one of the cases in https://gitlab.gnome.org/GNOME/librsvg/-/issues/588
|
|
|
|
| |
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/578
|
|
|
|
|
|
|
|
| |
This is to be resilient with Open Clip Art images generated by
an (old?) version of Adobe Illustrator, which creates data: URLs without
a MIME-type. We'll sniff those images instead of using text/plain.
https://gitlab.gnome.org/GNOME/librsvg/-/issues/548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
offsets
This has two parts:
1. Start a new chunk for a tspan even if it does not have absolute
positions. This is so that
<text>
Foo bar<tspan baseline-shift="sub">subscript</tspan>
</text>
will actually pick up the span's ComputedValues - note how the tspan
does not have x/y position properties.
2. If the baseline-shift is a length with an absolute unit, add it to
the parent's instead of ignoring it. As a limitation, we still use
only the parent's baseline-shift if the units are different.
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/129
|
|
|
|
|
|
|
|
| |
PangoFT2's headers included the FreeType2 headers for us, but builds without
PangoFT2 had to include them explicitly. So do so here if we don't have
PangoFT2. Also, if we are building against Pango that is before 1.44.0,
include the HarfBuzz headers explicitly, since Pango core only included that
for us since 1.44.0.
|
| |
|
|
|
|
| |
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/553
|
|
|
|
|
| |
Pango changed from 1.43 to 1.44 and creates different results. I'm
not completely convinced that they are correct.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use our own Transform type, rather than cairo::Matrix.
Beside paving the way to other rendering backends, using our own
type has the benefit of not having to cross the ffi boundary for
every transformation and also allows us to have a nicer api.
The code matches the conventions of cairo::Matrix (eg the
internal representation), but for the API I also checked
euclid::Transform2D and resvg's Transform type, and where possible
makes things more clear and ergonomic (explicit pre_ and post_
variants for each method, chainable methods).
Note: the filters-composite-02-b reftest differs by one pixel,
I am assuming this is a rounding issue and hence I am updating
the reference image.
|
|
|
|
| |
Cover more cases: zero-offset and no-intersection
|
|
|
|
|
|
|
|
|
| |
feImage doesn't do pixel processing, so it is able to use exact
floating-point bounds.
Thanks to Paolo Borelli for unlocking the solution to this in !262.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/408
|
| |
|
|
|
|
|
|
|
|
| |
This is not an infinite-loop test anymore; those are supposed to catch
infinite loops and return FALSE from rsvg_handle_render_cairo().
We don't have tests to catch infinite loops during loading, so for now
just move that test file to the load crasher tests.
|
|
|
|
| |
This is now fixed with the switch from croco to cssparser
|
| |
|
|
|
|
|
|
|
| |
We still don't consider ordering of rules in stylesheets, but at least
we handle specificity for conflicting matches with this.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/525
|
|
|
|
|
|
|
| |
Fixes a regression introduced in the recent refactoring.
While at it, improve the style type attribute parsing so that
invalid values are detected during the parsing of attributes.
A corresponding test case is included.
|
| |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This is also a fuzzed file, where the point was to test a zero-sized pattern.
|
| |
| |
| |
| |
| | |
This is a fuzzed file; the point was to test invalid path data, and
namespaces are irrelevant for this particular test.
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Commit a2b34631 broke geometry computation of elements when the
toplevel SVG has a viewBox attribute.
Every time we change the matrix to draw, we need to retransform the
drawings's resulting bbox to the original matrix.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was not handled properly because our <use> implementation did
this:
- Acquire the node referenced by <use xlink:href="#foo"/>
- Clone the node referene, causing the AcquiredNode to be dropped...
- ... so that the node reference is "free" now, outside of the
AcquiredNodes stack...
- ... so that if the node somehow ends up referencing itself as a
clipPath or a mask or something, it will work.
I.e. doing cycle detection with our old scheme made the test for
761175-recursive-masks.svg fail, since it <use>s a group which
in turn contains a <use href="#foo" mask="#mask-which-uses-foo"/>.
With the new cycle detection scheme, only <use> and elements which are
referenced indirectly (patterns, gradients, filters, etc.) get put
into the AcquiredNodes stack. This seems to find cycles properly
while not breaking that particular test.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/308
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the last part of #515, an enormous SVG file with millions
of elements, which causes out-of-memory.
To avoid unbounded memory consumption, we'll set a hard limit on the
number of loaded elements. The largest legitimate file I have is a
map rendering with about 26K elements; here we set a limit of 200,000
elements for good measure.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/515
|
|
|
|
|
| |
This is billion-laughs, but done with elements inside <pattern>. They
in turn reference a fill="url(#next_sublevel_pattern)".
|
|
|
|
|
|
|
|
| |
This fucking file's rendering frequently changes subtly. I hope I'm
not just sticking my head in the ground by deleting it; we already
have other tests for things that break when the initial transformation
matrix has a translation component, so I *hope* we can safely remove
this test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we do draw_ctx.acquired_nodes().get_node_of_type() to acquire a
pattern, or its fallback, we need to set the NodePattern.node to the
corresponding node weakref.
This was being done correctly at the beginning of the implementation
of resolve(), as of commit 03cbbe96, where the sequence is this:
DrawingCtx.set_source_paint_server()
paint_server = acquired_nodes.get_node()
<paint_server as NodePattern>.resolve_fallbacks_and_set_pattern()
self.resolve(node, ...)
*self.node.borrow_mut() = Some(node.downgrade());
However, this setting of self.node (where self is a NodePattern) to
the corresponding weakref was missing in the "while" loop in
NodePattern.resolve(), where it acquires the fallback pattern - the
fallback's NodePattern also needs its .node to be set to its node's
weakref.
We'll clean this up at some point.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/506
|
|
|
|
| |
Freetype changed, once again, the spacing between glyphs...
|
|
|
|
|
|
|
|
|
|
|
| |
The path parser creates a PathBuilder with zero commands.
In turn, builder.to_cairo() does nothing, as expected.
But then we stroke_and_fill(), and the wrapper call to
with_discrete_layer() doesn't like not having bounds.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/497
|
|
|
|
|
|
|
|
| |
When computing the positions of spans, the values of the dx/dy
attributes need to be added in, not just for the render position of
each span, but for the position of the *next* span as well.
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/494
|
| |
|
| |
|
| |
|
| |
|