Files
vectorcraft/crates/svg/tests/it/main.rs
T
dotCooCoo afdaa47cd5 SVG import: a clip path made of text clips by the text
A <text> in a <clipPath> was dropped with a warning, so a clip path made
only of text had no content and the art it clipped was hidden. The
clipPath content model in CSS Masking Module Level 1 lists text and use
(https://www.w3.org/TR/css-masking-1/#ClipPathElement).

The importer now clips by the text's glyph outlines, together with any
shapes in the same clip path, and keeps clipPathUnits, the transforms,
clip-rule, visibility, the conditional processing attributes and a clip
path on the text. A <use> in a clip path that shows a text clips the
same way, placed by the <use>; a clip path on the <use> applies in the
<use>'s user space, and a reference goes to the first element with the
id. When the clip path holds only one visible text, with no clip path
of its own and no even-odd clip rule, the clipping path of the clip
group is the text object with no fill or stroke, the same structure
Make Clipping Mask produces for type. A text or a <use> with an id in a
clip path can still be shown by a <use> outside it. Each text's
outlines are laid out once, however many elements use the clip path.

A transform set by a style rule or a style attribute on a text now
places it, as it does a shape. Before, only the transform attribute was
read, inside and outside clip paths.
2026-11-11 01:04:34 -08:00

40 lines
885 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! Integration tests: one test binary for the crate, one module per area.
// Unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
mod basic_shapes;
mod blend_export;
mod clip_text;
mod colorized_images;
mod colour_glyphs;
mod container_export;
mod css_rules;
mod dash_align;
mod data_attributes;
mod effects_export;
mod encoding_profile_fonts;
mod focal;
mod font_weights;
mod foreign_attributes;
mod gradients;
mod ids;
mod import_details;
mod import_live;
mod import_text;
mod import_units;
mod interactivity;
mod mask_options;
mod mesh_export;
mod non_scaling_stroke;
mod options;
mod prop_svg;
mod raster_paints;
mod roundtrip;
mod stroke_export;
mod svg_glyphs;
mod symbols_layers;
mod text_layout;
mod text_paint_order;
mod text_stroke;
mod title_control_chars;