mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 20:01:43 +00:00
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.
40 lines
885 B
Rust
40 lines
885 B
Rust
//! 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;
|