# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
This commit is contained in:
bflatastic committed 2026-11-19 01:07:40 +07:00
commit d39caaeebd
9 files changed
+818 -73

No files matched your search

+32 -10
View File
@@ -1,6 +1,6 @@
//! Bounded ownership of authored replacement text (ISO 32000-1, 14.9.4).
use super::state::Builder;
use super::state::{Builder, HeldStroke};
use super::{Affine, Look, Placement, Shape, TextLine, Upright};
use crate::import_text::TextContent;
@@ -21,13 +21,16 @@ impl ActualText {
self.depth = self.depth.saturating_add(1);
}
pub(super) fn end(&mut self) {
if self.owner == Some(self.depth) {
/// `true`: the owner's span ended.
pub(super) fn end(&mut self) -> bool {
let ended = self.owner == Some(self.depth);
if ended {
self.owner = None;
self.pending = None;
self.empty = false;
}
self.depth = self.depth.saturating_sub(1);
ended
}
pub(super) fn active(&self) -> bool {
@@ -62,13 +65,32 @@ impl Builder<'_> {
/// against the glyph's original Unicode, not against this replacement's characters.
pub(super) fn actual_glyph(&mut self, o: &craft_pdf::interpret::font::OutlineGlyph, m: Affine, at: Placement, look: Look, opacity: f32) -> bool {
let key = o.font_cache_key();
self.flush_glyphs();
// A fill and stroke callback for the same glyph consumes its text only once.
if let (Some(stroke), Some(line)) = (&look.stroke, &mut self.text)
&& look.fill.is_none()
&& line.stroke_actual(key, at, stroke.clone(), look.overprint_stroke)
// A fill and stroke callback for the same glyph consumes its text only once: the stroke
// goes over the glyph of the span filled, matched as the stroke pass ends as any other
// (`Builder::hold_stroke`), on a line the operator's kerning finished too.
let stroking = look.fill.is_none() && look.stroke.is_some();
if let Some(stroke) = &look.stroke
&& stroking
{
return true;
let h = HeldStroke {
font: key,
at,
opacity,
text: String::new(),
stroke: stroke.clone(),
overprint: look.overprint_stroke,
glyph: None,
actual: true,
first: (0, 0),
};
if self.hold_stroke(h) {
return true;
}
}
self.flush_glyphs();
// Stroked type of its own ends the stroke pass of the glyphs filled before it.
if stroking {
self.end_fills();
}
let width = o.advance_width().filter(|w| w.is_finite());
let advance = width.map_or(at.size * 0.5, |w| w as f64 / 1000.0 * at.size * at.h_scale / 100.0);
@@ -87,7 +109,7 @@ impl Builder<'_> {
None => line.push_content(&look, at, opacity, advance, content),
};
if !self.text.as_mut().is_some_and(place) {
self.flush_text();
self.park_text(!stroking);
let mut line = TextLine::new(at, opacity);
if !place(&mut line) {
self.actual.pending = pending;
+341 -12
View File
@@ -4,7 +4,9 @@ use super::entry::{
UNNAMED_CHARACTERS_NOTE, max_objects,
};
use super::reshaped;
use super::state::{Builder, Frame, FrameKind, GlyphRun, Saved, bounds, grouped, mean_scale, paints, round3, same_stroke, stroke_layer, type_stroke};
use super::state::{
Builder, Frame, FrameKind, GlyphRun, HeldStroke, Saved, bounds, grouped, mean_scale, paints, round3, same_stroke, stroke_layer, type_stroke,
};
use super::{
Affine, Appearance, AppearanceItem, Arc, BezPath, BfString, BlendMode, CacheKey, Color, Colors, Families, FillLayer, FillRule, FunctionBudget,
FunctionPaint, HashMap, HashSet, ImageBlob, ImageObject, Knockout, Look, MaskSpec, MaskType, Native, Node, NodeId, NodeKind, OpacityMask, Paint,
@@ -12,6 +14,30 @@ use super::{
Upright, Walked, clipped, contains, fold_stop_opacity, function_paint, gradient_shape, is_rectangle, luminance, mask_spec, shading_gradient,
};
/// The most lines of type kept for a text-showing operator's stroke pass ([`Builder::park_text`]):
/// beyond them the oldest is finished, and strokes over its glyphs come in as type of their own.
/// They are the lines its fill pass finished, besides the open one: a `TJ` over up to 65 lines is
/// filled and stroked, one over more is a filled object and a stroked one for each part. The
/// pass's first stroke goes over a glyph finished so, which can match a glyph kept (a `TJ` that
/// draws it again where it began): a first stroke that may go over one of them is type of its own
/// too, and ends the pass ([`Builder::hold_stroke`]).
const MAX_PARKED: usize = 64;
/// The most strokes of a stroke pass held to be matched to the glyphs they go over
/// ([`Builder::hold_stroke`]): beyond them, those held are matched to the last glyphs filled one
/// after another that they go over, with as many glyphs filled from there on as strokes held
/// ([`Builder::replayed`]), and the pass goes on from there. The reader tells no operator's
/// start, so the last such run is taken: the operator's fill pass is the one right before its
/// stroke pass. An operator that fills the same run of more than this many glyphs twice at the
/// same places may have its first strokes matched to its second copy; such a pass is matched as
/// well as it can be, not exactly.
const MAX_HELD: usize = 4096;
/// The most glyphs [`Builder::replayed`] compares to the strokes held, for bounded work on
/// hostile input: beyond them, each stroke goes over the first glyph it may go over after the one
/// the stroke before it goes over.
const MAX_REPLAY_WORK: usize = 1 << 20;
fn is_colour_face(face: &vectorcraft_text::FontFace) -> bool {
use skrifa::Tag;
use skrifa::raw::TableProvider;
@@ -37,6 +63,9 @@ impl<'p> Builder<'p> {
type3_run: None,
text: None,
text_glyphs: vec![],
parked: vec![],
held: vec![],
lost: None,
text_as,
actual: Default::default(),
images: HashMap::new(),
@@ -119,6 +148,9 @@ impl<'p> Builder<'p> {
self.type3_run = None;
self.text = None;
self.text_glyphs.clear();
self.parked.clear();
self.held.clear();
self.lost = None;
self.mask = None;
self.masked.clear();
self.marked.clear();
@@ -420,7 +452,10 @@ impl<'p> Builder<'p> {
}
}
/// Finish the open run of glyphs kept as outlines, once the strokes held are matched
/// ([`Self::settle_strokes`]): whatever is drawn next ends their stroke pass.
pub(super) fn flush_glyphs(&mut self) {
self.settle_strokes();
let Some(run) = self.glyphs.take() else { return };
if run.path.elements().is_empty() {
return;
@@ -450,11 +485,274 @@ impl<'p> Builder<'p> {
}
}
/// Finish the open line of type. `true`: it was kept as outlines instead ([`reshaped`]), which
/// are left open as the glyph run for an outline drawn next to join.
/// Finish the open line of type, after the lines parked before it ([`Self::park_text`]).
/// `true`: the open line was kept as outlines instead ([`reshaped`]), which are left open as
/// the glyph run for an outline drawn next to join.
pub(super) fn end_text(&mut self) -> bool {
self.settle_strokes();
self.release_parked(usize::MAX);
let glyphs = std::mem::take(&mut self.text_glyphs);
let Some(mut line) = self.text.take() else { return false };
let Some(line) = self.text.take() else { return false };
self.end_line(line, glyphs)
}
/// Finish the first `n` parked lines ([`Self::park_text`]), in the order they were drawn.
pub(super) fn release_parked(&mut self, n: usize) {
let n = n.min(self.parked.len());
if n == 0 {
return;
}
let lines: Vec<_> = self.parked.drain(..n).collect();
for (line, glyphs) in lines {
if self.end_line(line, glyphs) {
self.flush_glyphs();
}
}
}
/// The open line ends where glyph drawn next starts another. The reader fills every glyph of
/// a text-showing operator before it strokes them (fill and stroke rendering): a line that a
/// stroke may still be drawn over is parked instead of finished, so that the operator's
/// stroke pass still finds the glyphs it filled when its kerning started a new line part way
/// through (#8543). Any other line, or with `park` false, is finished with the lines parked
/// before it.
///
/// Parked lines are finished, oldest first, when the stroke pass goes past them (a stroke is
/// drawn over a later line or the open one: [`Self::settle_strokes`]; or over none of them:
/// [`Self::end_fills`]), when anything else ends the open line ([`Self::end_text`]), and
/// beyond [`MAX_PARKED`] lines: the glyphs of those are kept for the stroke after them
/// ([`Self::hold_stroke`]).
pub(super) fn park_text(&mut self, park: bool) {
match self.text.take() {
Some(line) if park && line.awaits_stroke() => {
let glyphs = std::mem::take(&mut self.text_glyphs);
self.parked.push((line, glyphs));
let over = self.parked.len().saturating_sub(MAX_PARKED);
if over > 0 {
let lost = self.lost.get_or_insert_default();
for (line, _) in self.parked.iter().take(over) {
lost.add(line);
}
}
self.release_parked(over);
}
line => {
self.text = line;
self.flush_text();
}
}
}
/// A boundary of stroke passes: no stroke drawn from now on goes over a glyph filled before
/// it. The strokes held are matched ([`Self::settle_strokes`]), the parked lines finished, and
/// the open line's glyphs filled so far closed to strokes ([`TextLine::end_fills`]). A stroke
/// that goes over no glyph filled (stroked type of its own) is one: a stroke pass replays the
/// glyphs its operator filled last, so a stroke after it isn't part of a pass over glyphs
/// filled before it, and stroking those would draw it under the type of its own. The start
/// and end of an ActualText span are too: a span's glyphs are stroked within it (#8543).
pub(super) fn end_fills(&mut self) {
self.lost = None;
self.settle_strokes();
self.release_parked(usize::MAX);
if let Some(line) = &mut self.text {
line.end_fills();
}
}
/// The parked line at `slot` ([`Self::park_text`]), or the open line at the slot after them.
fn line_at(&self, slot: usize) -> Option<&TextLine> {
match self.parked.get(slot) {
Some((line, _)) => Some(line),
None if slot == self.parked.len() => self.text.as_ref(),
None => None,
}
}
/// The glyph filled right after the one at `at` (a line's slot and its index among the line's
/// filled glyphs, as [`Self::next_fill`]): the next on its line, else the first of the line
/// after it.
fn after_fill(&self, (slot, i): (usize, usize)) -> (usize, usize) {
match self.line_at(slot) {
Some(line) if i.saturating_add(1) < line.filled_len() => (slot, i.saturating_add(1)),
_ => (slot.saturating_add(1), 0),
}
}
/// The first glyph filled after `after` that stroke `h` may go over
/// ([`TextLine::next_filled`]), as its line's slot ([`Self::line_at`]) and its index among
/// the line's filled glyphs: the lines in the order they were drawn, each line's glyphs in
/// the order they were filled. From the first glyph with no `after`.
fn next_fill(&self, after: Option<(usize, usize)>, h: &HeldStroke) -> Option<(usize, usize)> {
let first = after.map_or(0, |(slot, _)| slot);
(first..=self.parked.len()).find_map(|slot| {
let from = match after {
Some((s, i)) if s == slot => i.saturating_add(1),
_ => 0,
};
let i = self.line_at(slot)?.next_filled(from, h.font, h.at, h.opacity, &h.text, h.actual)?;
Some((slot, i))
})
}
/// The last glyph filled before `before` that stroke `h` may go over ([`Self::next_fill`]).
/// From the last glyph with no `before`.
fn last_fill(&self, before: Option<(usize, usize)>, h: &HeldStroke) -> Option<(usize, usize)> {
let last = before.map_or(self.parked.len(), |(slot, _)| slot);
(0..=last).rev().find_map(|slot| {
let until = match before {
Some((s, i)) if s == slot => i,
_ => usize::MAX,
};
let i = self.line_at(slot)?.last_filled(until, h.font, h.at, h.opacity, &h.text, h.actual)?;
Some((slot, i))
})
}
/// Hold stroke `h`, over a glyph filled on the open line or a parked one, until its stroke
/// pass ends ([`Self::settle_strokes`]). `false`: no glyph filled after those the strokes
/// held go over is one it may go over (the strokes held are matched first, and if it may go
/// over none then, it isn't held either: it goes over the line as it stands).
///
/// The reader fills all the glyphs of a text-showing operator, then strokes the same glyphs
/// in the same order (fill and stroke rendering, #8015). Which glyph a stroke goes over is
/// only told once the pass has ended: a `TJ` can draw the same glyph at the same place twice
/// (its kerning goes back), and an operator can fill and stroke a glyph where one filled
/// before it stands, which the device can't tell from a glyph the operator filled (#8543).
///
/// The first stroke after lines were finished beyond [`MAX_PARKED`] ([`Self::park_text`])
/// that may go over a glyph of theirs may be the start of their stroke pass, which no longer
/// finds its first glyphs: it ends the pass ([`Self::end_fills`]) and is type of its own, as
/// are the pass's strokes after it. Any other first stroke there is matched as ever: no
/// stroke pass is due over those lines once another stroke is drawn.
pub(super) fn hold_stroke(&mut self, mut h: HeldStroke) -> bool {
if self.lost.take().is_some_and(|lost| lost.may_stroke(h.font, h.at, h.opacity, &h.text, h.actual)) {
self.end_fills();
return false;
}
if self.held.len() >= MAX_HELD {
self.settle(false);
}
let mut first = self.next_fill(self.held.last().map(|l| l.first), &h);
if first.is_none() && !self.held.is_empty() {
self.settle_strokes();
first = self.next_fill(None, &h);
}
let Some(first) = first else { return false };
h.first = first;
self.held.push(h);
true
}
/// Match the strokes held ([`Self::hold_stroke`]) to the glyphs they go over, now that their
/// stroke pass has ended, and stroke them. The pass strokes the glyphs filled last, in the
/// order they were filled: each stroke goes over the last glyph it may go over that is filled
/// before the one the stroke after it goes over. So a `TJ` that draws a glyph twice at the
/// same place strokes each where it filled it, and a glyph filled and stroked where one
/// filled before it stands strokes the one filled last (#8015, #8543).
pub(super) fn settle_strokes(&mut self) {
self.settle(true);
}
/// The glyphs the strokes `held` go over when they are the start of a stroke pass that goes
/// on after them ([`MAX_HELD`]): the last glyphs filled one right after another that they
/// may go over, in order, with at least as many glyphs filled from the first of them on as
/// there are strokes held. The pass replays its operator's fill pass, the glyphs filled
/// last, one right after another, right before the pass, so the strokes don't go over a
/// glyph filled before those, nor skip one. The device isn't told where an operator starts:
/// an operator before it that filled the same glyphs at the same places stays unstroked, as
/// the first glyphs of the pass are the last such run the pass still has room for. `None`
/// when there are none, or beyond [`MAX_REPLAY_WORK`].
fn replayed(&self, held: &[HeldStroke]) -> Option<Vec<(usize, usize)>> {
let (head, rest) = held.split_first()?;
let mut work = 0usize;
// The glyphs filled from `at` on, up to as many as there are strokes held.
let left = |(slot, i): (usize, usize)| {
(slot..=self.parked.len())
.filter_map(|s| self.line_at(s).map(|line| line.filled_len().saturating_sub(if s == slot { i } else { 0 })))
.fold(0usize, |n, len| n.saturating_add(len).min(held.len()))
};
let mut start = self.last_fill(None, head);
while let Some(first) = start {
start = self.last_fill(Some(first), head);
work = work.saturating_add(1);
if work > MAX_REPLAY_WORK {
return None;
}
// Too few glyphs filled after it for the strokes held: not where the pass starts.
if left(first) < held.len() {
continue;
}
let mut places = Vec::with_capacity(held.len());
places.push(first);
let mut at = first;
for h in rest {
work = work.saturating_add(1);
if work > MAX_REPLAY_WORK {
return None;
}
at = self.after_fill(at);
if !self.line_at(at.0).is_some_and(|line| line.fills_at(at.1, h.font, h.at, h.opacity, &h.text, h.actual)) {
break;
}
places.push(at);
}
if places.len() == held.len() {
return Some(places);
}
}
None
}
/// [`Self::settle_strokes`], each stroke matched to the last glyph it may go over (`last`),
/// or, when too many are held ([`Self::hold_stroke`]), as the start of a pass that goes on
/// ([`Self::replayed`]).
fn settle(&mut self, last: bool) {
if self.held.is_empty() {
return;
}
let held = std::mem::take(&mut self.held);
let mut places = vec![];
if last {
let mut before = None;
for h in held.iter().rev() {
let Some(p) = self.last_fill(before, h) else { break };
places.push(p);
before = Some(p);
}
places.reverse();
} else if let Some(p) = self.replayed(&held) {
places = p;
}
// Each held stroke goes over the first glyph it may go over after the one before it
// does ([`Self::hold_stroke`]), so the last ones are found too: this is only a guard.
if places.len() != held.len() {
places = held.iter().map(|h| h.first).collect();
}
// The slots of the parked lines finished so far, which the later places count in.
let mut finished = 0usize;
for (h, (slot, index)) in held.into_iter().zip(places) {
let slot = slot.saturating_sub(finished);
let parked = self.parked.len();
// The lines before the one stroked are past the stroke pass: they are finished.
self.release_parked(slot);
finished = finished.saturating_add(slot.min(parked));
let target = match self.parked.first_mut() {
Some((line, glyphs)) if slot < parked => Some((line, glyphs)),
_ => self.text.as_mut().map(|line| (line, &mut self.text_glyphs)),
};
if let Some((line, glyphs)) = target
&& line.stroke_filled_at(index, h.stroke, h.overprint)
{
// Upright glyphs aren't kept as outlines (nor are those filled only): a vertical
// line that came in as its outlines would lose the ones filled only.
glyphs.extend(h.glyph);
}
}
}
/// Finish `line` of type, whose `glyphs` are its outlines ([`Self::keep_glyph`]). `true`:
/// it was kept as them ([`Self::end_text`]).
fn end_line(&mut self, mut line: TextLine, glyphs: Vec<GlyphRun>) -> bool {
let held = std::mem::take(&mut line.held);
// Type the file names itself (ActualText) is in reading order as it stands.
let checked = !glyphs.is_empty() && line.mapped() && !line.has_type3;
@@ -880,13 +1178,9 @@ impl<'p> Builder<'p> {
scale: f64,
overprint: bool,
) {
let Some((paint, stroke)) = drawn else { return };
let mut path = o.outline();
if path.elements().is_empty() {
return;
if let Some(g) = glyph_run(o, m, drawn, opacity, scale, overprint) {
self.text_glyphs.push(g);
}
path.apply_affine(m);
self.text_glyphs.push(GlyphRun { path, paint, opacity, stroke, scale, overprint });
}
fn type3_font_name(&mut self, key: u128) -> FontInfo {
@@ -1150,10 +1444,22 @@ impl<'p> Builder<'p> {
Some(top) => line.push_upright(&look, at, opacity, Upright { top }, &text),
None => line.push(&look, at, opacity, advance, &text),
};
let stroking = look.fill.is_none() && look.stroke.is_some();
// A stroke over a glyph filled before it, on the open line or one the same operator's
// kerning finished: matched once its stroke pass ends.
if let Some(s) = &look.stroke
&& stroking
{
let glyph = if top.is_none() { glyph_run(o, m, drawn.clone(), opacity, scale, overprint) } else { None };
let h = HeldStroke { font: key, at, opacity, text: text.clone(), stroke: s.clone(), overprint, glyph, actual: false, first: (0, 0) };
if self.hold_stroke(h) {
return true;
}
}
self.flush_glyphs();
// A stroke over the glyph just filled (fill and stroke rendering).
if let (Some(s), Some(line)) = (&look.stroke, &mut self.text)
&& look.fill.is_none()
&& stroking
&& line.stroke_filled(key, at, opacity, &text, s.clone(), overprint)
{
// Upright glyphs aren't kept as outlines (nor, below, are those filled only): a
@@ -1163,8 +1469,12 @@ impl<'p> Builder<'p> {
}
return true;
}
// Stroked type of its own ends the stroke pass of the glyphs filled before it.
if stroking {
self.end_fills();
}
if !self.text.as_mut().is_some_and(place) {
self.flush_text();
self.park_text(!stroking);
let mut line = TextLine::new(at, opacity);
place(&mut line);
self.text = Some(line);
@@ -1184,6 +1494,25 @@ impl<'p> Builder<'p> {
}
}
/// Glyph `o` placed by `m` and drawn with `drawn` as the outline it is kept as
/// ([`Builder::keep_glyph`]). Nothing for a glyph that shows nothing.
fn glyph_run(
o: &craft_pdf::interpret::font::OutlineGlyph,
m: Affine,
drawn: Option<(Paint, Option<StrokeProps>)>,
opacity: f32,
scale: f64,
overprint: bool,
) -> Option<GlyphRun> {
let (paint, stroke) = drawn?;
let mut path = o.outline();
if path.elements().is_empty() {
return None;
}
path.apply_affine(m);
Some(GlyphRun { path, paint, opacity, stroke, scale, overprint })
}
/// The characters of one glyph in the order they are drawn: a PDF names a ligature's characters
/// in logical order (lam then alef for لا), while a horizontal line of type is gathered glyph by
/// glyph in visual order and only then put back in logical order. Right-to-left characters are
+9 -1
View File
@@ -453,12 +453,20 @@ impl<'a> Device<'a> for Builder<'_> {
self.flush();
}
self.marked.pop();
self.actual.end();
// A span's glyphs are stroked within it: a stroke after it goes over none of them.
if self.actual.end() {
self.end_fills();
}
}
fn actual_text(&mut self, text: &[u8]) {
let active = self.actual.active();
if self.nested == 0 && self.text_as == crate::TextAs::Text && !self.actual.set(text) {
self.warn("ActualText beyond the import size or nesting limit was left to glyph mappings");
}
// Nor does a stroke in a span go over a glyph filled before it.
if !active && self.actual.active() {
self.end_fills();
}
}
}
+31
View File
@@ -58,6 +58,24 @@ pub(super) struct GlyphRun {
pub(super) overprint: bool,
}
/// A stroke over a glyph filled before it (fill and stroke rendering), held with the stroke pass
/// it is part of ([`Builder::hold_stroke`]): the glyph's font, placement, opacity and text, the
/// stroke, whether it overprints, the glyph's outline as drawn (kept as for a line of type kept
/// as outlines; none for a glyph set upright or one of an ActualText span), whether it is one of
/// an ActualText span, and the first glyph filled so it may go over, as its line's place among
/// the parked lines and the open one and its index in the line's filled glyphs.
pub(super) struct HeldStroke {
pub(super) font: u128,
pub(super) at: super::Placement,
pub(super) opacity: f32,
pub(super) text: String,
pub(super) stroke: TypeStroke,
pub(super) overprint: bool,
pub(super) glyph: Option<GlyphRun>,
pub(super) actual: bool,
pub(super) first: (usize, usize),
}
/// How often a tiling pattern was read, and the art (as its paints) each reading drew with the
/// swatch made for it.
pub(super) type PatternReadings = (u32, Vec<(Vec<Paint>, String)>);
@@ -94,6 +112,19 @@ pub(super) struct Builder<'p> {
/// kept as: what the line becomes when its type wouldn't draw as the file does
/// ([`super::reshaped`]).
pub(super) text_glyphs: Vec<GlyphRun>,
/// Lines of type a text-showing operator's fill pass finished (a `TJ`'s kerning starts a new
/// line part way through) that its stroke pass may still go over, oldest first, each with
/// its [`text_glyphs`](Self::text_glyphs): written before the open line, in this order
/// ([`Builder::park_text`]).
pub(super) parked: Vec<(TextLine, Vec<GlyphRun>)>,
/// The strokes of a text-showing operator's stroke pass over glyphs it filled on the
/// [`parked`](Self::parked) lines and the open one, held until the pass ends to be matched to
/// the glyphs it strokes ([`Builder::settle_strokes`]).
pub(super) held: Vec<HeldStroke>,
/// The glyphs of the lines a fill pass finished beyond the most kept for their stroke pass that
/// a stroke may still have gone over, until the first stroke after them
/// ([`Builder::hold_stroke`]) or a boundary of stroke passes ([`Builder::end_fills`]).
pub(super) lost: Option<crate::import_text::LostFills>,
pub(super) text_as: TextAs,
pub(super) actual: super::actual_text::ActualText,
pub(super) images: HashMap<String, ImageBlob>,
+171 -40
View File
@@ -233,10 +233,8 @@ pub(crate) struct TextLine {
slots: Vec<Option<Slot>>,
/// Per character: authored logical order must survive visual-to-logical reconstruction.
authored: Vec<bool>,
/// Fill callbacks in an authored span, for the reader's later stroke pass.
actual_fills: HashMap<(u128, u64, u64), Option<usize>>,
/// The glyphs filled without a stroke, in drawing order, for a stroke drawn over them later
/// ([`stroke_filled`](Self::stroke_filled)).
/// ([`stroke_filled`](Self::stroke_filled)), those of an ActualText span among them.
filled: Vec<Filled>,
/// The first of [`filled`](Self::filled) a stroke may still be drawn over: a stroke matches
/// glyphs in the order they were filled, and each at most once.
@@ -246,6 +244,10 @@ pub(crate) struct TextLine {
pending: Option<PendingStroke>,
/// The last glyph's placement.
last_at: Placement,
/// The last glyph was drawn before a boundary of stroke passes ([`end_fills`](Self::end_fills)):
/// no stroke drawn since goes over it, not even as the glyph just drawn
/// ([`stroke_last`](Self::stroke_last)).
last_closed: bool,
/// The first glyph was set vertically ([`Upright`]).
upright: Option<Upright>,
/// The glyphs make a column (vertical type), each below the last.
@@ -279,7 +281,9 @@ struct Slot {
}
/// A glyph filled without a stroke: its font and placement, and where its text is in the line's
/// runs (the run's index, the text's byte offset in it and its length).
/// runs (the run's index, the text's byte offset in it and its length). A glyph of an ActualText
/// span has `actual`: `Some(true)` for the glyph whose run holds the replacement text,
/// `Some(false)` for the glyphs after it, which add no text (`len` 0 for both).
#[derive(Clone, Copy, Debug)]
struct Filled {
font: u128,
@@ -287,6 +291,57 @@ struct Filled {
run: usize,
start: usize,
len: usize,
actual: Option<bool>,
}
/// Whether a stroke over glyph `text` drawn at `at` in `font` at `opacity` may be drawn over a
/// glyph `fill` filled (its font, placement, whether it is a glyph of an ActualText span, and its
/// text) on a line that is `opaque` or not ([`TextLine::fills_at`]).
fn may_stroke(fill: (u128, Placement, bool, Option<&str>), opaque: bool, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> bool {
let (g_font, g_at, g_actual, g_text) = fill;
if actual {
let same = |a: f64, b: f64| a.to_bits() == b.to_bits();
return g_actual && g_font == font && same(g_at.origin.x, at.origin.x) && same(g_at.origin.y, at.origin.y);
}
!g_actual && opacity >= 0.999 && opaque && g_font == font && g_at.same_as(&at) && g_text == Some(text)
}
/// The glyphs a stroke could still go over on lines of type finished before their stroke pass
/// could end: lines beyond the most a fill pass keeps for its stroke pass. The device isn't told
/// where an operator starts, so a stroke pass over such a line can't be told from one over the
/// glyphs kept: its first stroke, over a glyph finished so, may match one of them instead. Kept up
/// to [`MAX_LOST_FILLS`](Self::MAX_LOST_FILLS), beyond which any stroke may be over one.
#[derive(Clone, Debug, Default)]
pub(crate) struct LostFills {
/// Each glyph's font, placement, whether it is a glyph of an ActualText span, its text and
/// whether its line is opaque.
fills: Vec<(u128, Placement, bool, Option<String>, bool)>,
/// More glyphs than [`MAX_LOST_FILLS`](Self::MAX_LOST_FILLS) were finished so.
overflowed: bool,
}
impl LostFills {
/// The most glyphs kept, for bounded work and memory on hostile input.
pub const MAX_LOST_FILLS: usize = 4096;
/// Add the glyphs `line` filled that a stroke may still go over.
pub fn add(&mut self, line: &TextLine) {
let opaque = line.opacity >= 0.999;
for g in line.filled.get(line.stroked..).unwrap_or_default() {
if self.fills.len() >= Self::MAX_LOST_FILLS {
self.overflowed = true;
return;
}
self.fills.push((g.font, g.at, g.actual.is_some(), line.glyph_text(g).map(str::to_string), opaque));
}
}
/// Whether a stroke over glyph `text` drawn at `at` in `font` at `opacity` may be drawn over
/// one of the glyphs ([`TextLine::fills_at`]).
pub fn may_stroke(&self, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> bool {
self.overflowed
|| self.fills.iter().any(|(f, a, act, t, opaque)| may_stroke((*f, *a, *act, t.as_deref()), *opaque, font, at, opacity, text, actual))
}
}
/// Glyphs next to each other in one run that a stroke is drawn over, not yet restyled
@@ -331,11 +386,11 @@ impl TextLine {
text_bytes: 0,
slots: vec![],
authored: vec![],
actual_fills: HashMap::new(),
filled: vec![],
stroked: 0,
pending: None,
last_at: at,
last_closed: false,
upright: None,
column: false,
ink: vec![],
@@ -382,10 +437,10 @@ impl TextLine {
let Some((last, _, run)) = self.runs.last_mut() else {
self.runs.push((look.clone(), 0.0, text.to_string()));
self.last_start = 0;
self.record_actual_fill(look, at, content);
self.record_filled(look, at, content);
self.authored.extend(text.chars().map(|_| content.authored()));
(self.upright, self.next, self.last, self.last_at) = (Some(upright), at.origin + down * at.size, at.origin, at);
self.last_closed = false;
return true;
};
let across = (at.origin - self.at.origin).dot(self.at.dir);
@@ -420,12 +475,12 @@ impl TextLine {
self.runs.push((look.clone(), 0.0, text.to_string()));
self.last_start = 0;
}
self.record_actual_fill(look, at, content);
self.record_filled(look, at, content);
self.authored.extend(text.chars().map(|_| content.authored()));
self.next = at.origin + down * at.size;
self.last = at.origin;
self.last_at = at;
self.last_closed = false;
true
}
@@ -522,7 +577,6 @@ impl TextLine {
self.runs.push((look.clone(), 0.0, text.to_string()));
self.last_start = 0;
}
self.record_actual_fill(look, at, content);
self.record_filled(look, at, content);
self.text_bytes = self.text_bytes.saturating_add(text.len());
if !pen {
@@ -539,41 +593,38 @@ impl TextLine {
}
self.last = at.origin;
self.last_at = at;
self.last_closed = false;
self.last_dir = at.dir;
self.last_size = at.size;
self.baseline.push(at.origin);
true
}
fn record_actual_fill(&mut self, look: &Look, at: Placement, content: TextContent<'_>) {
if content.authored() && look.fill.is_some() {
let run = matches!(content, TextContent::Actual(_)).then(|| self.runs.len().saturating_sub(1));
self.actual_fills.insert((look.font, at.origin.x.to_bits(), at.origin.y.to_bits()), run);
}
}
/// Note glyph `content` just added to the last run, filled without a stroke, for a stroke
/// drawn over it later.
/// drawn over it later: a glyph of an ActualText span too, whose text is the replacement's
/// (the first glyph's) or none.
fn record_filled(&mut self, look: &Look, at: Placement, content: TextContent<'_>) {
let len = content.text().len();
if content.authored() || len == 0 || look.fill.is_none() || look.stroke.is_some() {
if look.fill.is_none() || look.stroke.is_some() {
return;
}
let run = self.runs.len().saturating_sub(1);
self.filled.push(Filled { font: look.font, at, run, start: self.last_start, len });
let (run, start) = (self.runs.len().saturating_sub(1), self.last_start);
let (start, len, actual) = match content {
TextContent::Mapped(text) if !text.is_empty() => (start, text.len(), None),
TextContent::Mapped(_) => return,
TextContent::Actual(_) => (0, 0, Some(true)),
TextContent::Pen => (0, 0, Some(false)),
};
self.filled.push(Filled { font: look.font, at, run, start, len, actual });
}
/// The reader fills a whole Tj/TJ before replaying its glyphs as strokes. A replay
/// must neither consume the replacement nor rewind the pen. Only the first glyph's
/// style belongs to the replacement; suppressed glyphs have no text to restyle.
/// style belongs to the replacement; suppressed glyphs have no text to restyle. The stroke
/// goes over the next glyph of the span filled in `font` at `at`, not stroked yet
/// ([`stroke_filled_at`](Self::stroke_filled_at)).
pub fn stroke_actual(&mut self, font: u128, at: Placement, stroke: TypeStroke, overprint: bool) -> bool {
self.flush_stroke();
let key = (font, at.origin.x.to_bits(), at.origin.y.to_bits());
let Some(run) = self.actual_fills.remove(&key) else { return false };
if let Some((look, ..)) = run.and_then(|i| self.runs.get_mut(i)) {
(look.stroke, look.overprint_stroke) = (Some(stroke), overprint);
}
true
let Some(index) = self.next_filled(0, font, at, 1.0, "", true) else { return false };
self.stroke_filled_at(index, stroke, overprint)
}
/// Has the baseline turned (more than about 3° from the first glyph to the last)?
@@ -625,21 +676,35 @@ impl TextLine {
// A stroke at another opacity than the fill's (`CA` and `ca` differ), or over a
// translucent fill, is type of its own.
let opaque = opacity >= 0.999 && self.opacity >= 0.999;
let rest = if opaque { self.filled.get(self.stroked..) } else { None };
let found = rest.and_then(|rest| {
rest.iter().position(|g| {
g.font == font
&& g.at.same_as(&at)
&& self.runs.get(g.run).and_then(|(.., t)| t.get(g.start..g.start.saturating_add(g.len))) == Some(text)
})
});
let Some(index) = found.map(|i| self.stroked.saturating_add(i)) else {
let Some(index) = self.next_filled(0, font, at, opacity, text, false) else {
// Stroked text of its own (stroke rendering): no later stroke goes back over the
// glyphs filled before it, so no stroke looks through them again.
self.stroked = self.filled.len();
// Nor does a translucent stroke join the glyph just filled.
return opaque && self.stroke_last(font, at, text, stroke, overprint);
};
self.stroke_filled_at(index, stroke, overprint)
}
/// A stroke over the glyph filled at `index` in [`filled`](Self::filled), not stroked yet
/// ([`next_filled`](Self::next_filled), [`last_filled`](Self::last_filled)): that glyph is
/// stroked as [`stroke_filled`](Self::stroke_filled) strokes the glyph it finds, and no later
/// stroke goes over the glyphs filled before it. `false`: there is no such glyph.
/// A glyph of an ActualText span restyles its replacement's run at once, if it holds it.
pub fn stroke_filled_at(&mut self, index: usize, stroke: TypeStroke, overprint: bool) -> bool {
if index < self.stroked || index >= self.filled.len() {
return false;
}
if let Some(g) = self.filled.get(index).copied()
&& let Some(owner) = g.actual
{
self.flush_stroke();
if let Some((look, ..)) = self.runs.get_mut(g.run).filter(|_| owner) {
(look.stroke, look.overprint_stroke) = (Some(stroke), overprint);
}
self.stroked = index.saturating_add(1);
return true;
}
let continues = self
.pending
.as_ref()
@@ -661,6 +726,68 @@ impl TextLine {
true
}
/// The first glyph from index `from` of [`filled`](Self::filled) on, not stroked yet, that a
/// stroke over glyph `text` drawn at `at` in `font` at `opacity` may be drawn over
/// ([`fills_at`](Self::fills_at)). `None` for a translucent fill or stroke.
pub fn next_filled(&self, from: usize, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> Option<usize> {
let from = from.max(self.stroked);
let i = self.filled.get(from..)?.iter().position(|g| self.fills(g, font, at, opacity, text, actual))?;
Some(from.saturating_add(i))
}
/// The last glyph before index `before` of [`filled`](Self::filled), not stroked yet, that a
/// stroke over glyph `text` drawn at `at` in `font` at `opacity` may be drawn over
/// ([`fills_at`](Self::fills_at)).
pub fn last_filled(&self, before: usize, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> Option<usize> {
let rest = self.filled.get(self.stroked..before.min(self.filled.len()))?;
let i = rest.iter().rposition(|g| self.fills(g, font, at, opacity, text, actual))?;
Some(self.stroked.saturating_add(i))
}
/// Whether the glyph filled at `index` in [`filled`](Self::filled), not stroked yet, is one a
/// stroke over glyph `text` drawn at `at` in `font` at `opacity` may be drawn over: opaque,
/// in the same font, with the same placement and text. With `actual`, a stroke over a glyph
/// of an ActualText span instead: a glyph of the span filled in the same font at the same
/// origin, at any opacity ([`stroke_actual`](Self::stroke_actual)): the span's replacement
/// text goes with the glyph filled first, so a translucent stroke kept apart from its fill
/// would be type with no text, and come in as nothing.
pub fn fills_at(&self, index: usize, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> bool {
index >= self.stroked && self.filled.get(index).is_some_and(|g| self.fills(g, font, at, opacity, text, actual))
}
/// How many glyphs the line filled for a stroke drawn over them later, stroked or not
/// ([`filled`](Self::filled)).
pub fn filled_len(&self) -> usize {
self.filled.len()
}
/// [`fills_at`](Self::fills_at) for glyph `g`.
fn fills(&self, g: &Filled, font: u128, at: Placement, opacity: f32, text: &str, actual: bool) -> bool {
let (fill, opaque) = ((g.font, g.at, g.actual.is_some(), self.glyph_text(g)), self.opacity >= 0.999);
may_stroke(fill, opaque, font, at, opacity, text, actual)
}
/// The text of filled glyph `g` in the line's runs.
fn glyph_text(&self, g: &Filled) -> Option<&str> {
self.runs.get(g.run).and_then(|(.., t)| t.get(g.start..g.start.saturating_add(g.len)))
}
/// Whether a stroke drawn later may still be drawn over a glyph of the line (fill and stroke
/// rendering): an opaque glyph filled and not stroked yet, or a filled glyph of an
/// ActualText span ([`stroke_actual`](Self::stroke_actual)).
pub fn awaits_stroke(&self) -> bool {
self.filled.get(self.stroked..).is_some_and(|rest| rest.iter().any(|g| g.actual.is_some() || self.opacity >= 0.999))
}
/// No stroke drawn from now on goes over a glyph the line filled so far: a stroke pass does
/// not go back past a stroke of its own (one over no glyph filled) or the start or end of an
/// ActualText span ([`stroke_filled`](Self::stroke_filled)). Nor does one restyle the glyph
/// drawn last ([`stroke_last`](Self::stroke_last)).
pub fn end_fills(&mut self) {
self.stroked = self.filled.len();
self.last_closed = true;
}
/// Restyle the glyphs gathered for a stroke ([`stroke_filled`](Self::stroke_filled)): their
/// text becomes a run of its own with the stroke, unless the run is stroked so already, and the
/// text before and after it in the run keeps its stroke. Text that comes right after a run
@@ -729,9 +856,6 @@ impl TextLine {
for g in self.filled.iter_mut().skip(from) {
(g.run, g.start) = moved(g.run, g.start);
}
for i in self.actual_fills.values_mut().flatten() {
*i = moved(*i, 0).0;
}
if last {
self.last_start = moved(run, self.last_start).1;
}
@@ -744,7 +868,14 @@ impl TextLine {
/// ([`Look::takes`]): then the glyph's text becomes a run of its own with this stroke, and
/// the glyphs before it stay unstroked (#7741). The line's text is the same either way, so
/// the characters' slots, gaps and authored flags, kept along the whole line, still line up.
///
/// Not a glyph drawn before a boundary of stroke passes ([`end_fills`](Self::end_fills)):
/// a stroke after the end of an ActualText span would otherwise stroke the span's replacement
/// text, and one after its start a glyph filled before the span (#8543).
fn stroke_last(&mut self, font: u128, at: Placement, glyph: &str, stroke: TypeStroke, overprint: bool) -> bool {
if self.last_closed {
return false;
}
self.flush_stroke();
let start = self.last_start;
let last_at = self.last_at;
+222
View File
@@ -346,3 +346,225 @@ fn glyphs_filled_and_stroked_one_by_one_stay_one_run() {
assert_eq!(type_runs(content), [vec![("ABC".to_string(), true, true)]], "{content}");
}
}
/// Fill and stroke rendering of a `TJ` whose kerning starts a new line part way through: the
/// reader fills every glyph of the operator before it strokes them, and each part comes in as
/// type filled and stroked, in the order drawn, not as each part filled and then each part
/// stroked over it (#8543). So too a `TJ` that jumps back to start a line before it and one whose
/// kerning starts two new lines. In a span with replacement text (`ActualText`) it stays one type
/// object, on the first glyph's line and in its style, filled and stroked; small kerning keeps
/// one line as before.
#[test]
fn a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked() {
// Each type object as its text, and whether all of it is filled and all of it stroked.
let objects = |content: &str| -> Vec<(String, bool, bool)> {
type_runs(content)
.into_iter()
.map(|runs| (runs.iter().map(|r| r.0.as_str()).collect(), runs.iter().all(|r| r.1), runs.iter().all(|r| r.2)))
.collect()
};
let both = |text: &str| (text.to_string(), true, true);
for mode in ["2", "6"] {
let cases = [
("/F1 48 Tf 20 80 Td [(AB) -3500 (CD)] TJ", vec![both("AB"), both("CD")]),
("/F1 24 Tf 20 80 Td [(AB) -3500 (CD) -3500 (EF)] TJ", vec![both("AB"), both("CD"), both("EF")]),
("/F1 24 Tf 200 80 Td [(AB) 6000 (CD)] TJ", vec![both("AB"), both("CD")]),
("/F1 48 Tf 20 80 Td [(AB) -100 (CD)] TJ", vec![both("ABCD")]),
// In a span with replacement text, which places all of its text with the first glyph.
("/F1 48 Tf 20 80 Td /Span << /ActualText (ABCD) >> BDC [(AB) -3500 (CD)] TJ EMC", vec![both("ABCD")]),
];
for (show, want) in cases {
let content = format!("BT {mode} Tr {show} 0 Tr ET");
assert_eq!(objects(&content), want, "{content}: {:?}", type_runs(&content));
}
}
}
/// Stroke rendering (modes 1 and 5) of a `TJ` whose kerning starts a new line stays stroke only,
/// one type object per line (#8543).
#[test]
fn a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only() {
for mode in ["1", "5"] {
let content = format!("BT {mode} Tr /F1 48 Tf 20 80 Td [(AB) -3500 (CD)] TJ 0 Tr ET");
let want = [vec![("AB".to_string(), false, true)], vec![("CD".to_string(), false, true)]];
assert_eq!(type_runs(&content), want, "{content}");
}
}
/// Translucent type filled and stroked by a `TJ` whose kerning starts a new line stays a filled
/// object and a stroked one for each part, in the order the file draws them (#8015, #8543).
#[test]
fn a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart() {
use vectorcraft_testkit::pdf::{PdfPage, pdf};
let resources = "/Font << /F1 << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >> >> /ExtGState << /G << /ca 0.5 /CA 0.5 >> >>";
let content = "/G gs 0 0 0 RG 1 1 0.8 rg 3 w BT 2 Tr /F1 48 Tf 20 80 Td [(AB) -3500 (CD)] TJ 0 Tr ET";
let bytes = pdf(&[PdfPage { resources: resources.into(), ..PdfPage::new(300.0, 200.0, content) }], None);
let d = import(&bytes).unwrap();
let mut types = vec![];
d.walk(|n| {
if let NodeKind::Text(t) = &n.kind {
let st = t.first_style();
types.push((t.plain_text(), n.opacity < 1.0, !st.fill.is_none(), !st.stroke.is_none()));
}
});
let part = |text: &str, fill: bool| (text.to_string(), true, fill, !fill);
assert_eq!(types, [part("AB", true), part("CD", true), part("AB", false), part("CD", false)], "{content}");
}
/// Fill and stroke rendering of a `TJ` whose kerning goes back to draw a glyph again where it
/// drew one before, on a line of its own: the reader strokes the glyphs in the order it filled
/// them, so each copy is filled and stroked, whether the copy drawn last ends the operator (the
/// open line) or a line after it does (a finished one), and however often it comes back
/// (#8543). A glyph filled and stroked by an operator of its own where one filled before stands
/// still strokes only the one filled last (#8015).
#[test]
fn a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy() {
let both = |text: &str| vec![(text.to_string(), true, true)];
// Helvetica at 48 points: A and B are 667 units wide, so 4834 back after B (3500 on from A)
// draws A again where the first A stands.
for mode in ["2", "6"] {
let cases = [
("[(A) -3500 (B) 4834 (A)] TJ", vec![both("A"), both("B"), both("A")]),
("[(A) -3500 (B) 4834 (A) -6000 (C)] TJ", vec![both("A"), both("B"), both("A"), both("C")]),
("[(A) -3500 (B) 4834 (A) -3500 (B)] TJ", vec![both("A"), both("B"), both("A"), both("B")]),
("[(A) -3500 (B) 4834 (A) -3500 (B) 4834 (A)] TJ", vec![both("A"), both("B"), both("A"), both("B"), both("A")]),
];
for (show, want) in cases {
let content = format!("BT {mode} Tr /F1 48 Tf 20 80 Td {show} 0 Tr ET");
assert_eq!(type_runs(&content), want, "{content}");
}
}
let content = "BT 0 Tr /F1 48 Tf 20 80 Td [(A) -3500 (B) 4834] TJ 2 Tr (A) Tj 0 Tr ET";
let want = [vec![("A".to_string(), true, false)], vec![("B".to_string(), true, false)], both("A")];
assert_eq!(type_runs(content), want, "{content}");
}
/// A stroke pass longer than the importer holds at once ([`MAX_HELD`] strokes) is matched to its
/// own operator's glyphs, in the order filled: an `A` filled by an operator of its own, then `A`
/// and 4,096 `B`s filled and stroked from the same place, strokes the second `A`, not the first
/// (#8543).
#[test]
fn a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before() {
let bs = "B".repeat(4096);
let content = format!("BT /F1 2 Tf 1 0 0 1 20 80 Tm 0 Tr (A) Tj 1 0 0 1 20 80 Tm 2 Tr (A{bs}) Tj 0 Tr ET");
let looks: Vec<Vec<(String, bool, bool)>> = type_runs(&content);
let want = [vec![("A".to_string(), true, false)], vec![(format!("A{bs}"), true, true)]];
assert!(looks == want, "{:?}", looks.iter().map(|t| t.iter().map(|r| (r.0.len(), r.1, r.2)).collect::<Vec<_>>()).collect::<Vec<_>>());
}
/// Stroked type of its own (a stroke over no glyph filled) ends the stroke pass of the glyphs
/// filled before it: an `A` filled, a `B` filled on a line of its own, a `C` stroked after the
/// `B`, then a stroke over the `A` is type of its own, drawn last, not a stroke joined to the
/// `A` drawn under the `B` and `C` (#8543).
#[test]
fn a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before() {
let content = "BT /F1 48 Tf 1 0 0 1 20 80 Tm 0 Tr (A) Tj 1 0 0 1 20 140 Tm (B) Tj 1 Tr (C) Tj 1 0 0 1 20 80 Tm (A) Tj 0 Tr ET";
let run = |text: &str, fill: bool, stroke: bool| (text.to_string(), fill, stroke);
let want = [vec![run("A", true, false)], vec![run("B", true, false), run("C", false, true)], vec![run("A", false, true)]];
assert_eq!(type_runs(content), want, "{content}");
}
/// A stroke in an ActualText span goes over a glyph that span filled, not one an earlier span
/// filled at the same place: each span's replacement text comes in (#8543).
#[test]
fn a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph() {
let content = "BT /F1 48 Tf 0 Tr /Span << /ActualText (First) >> BDC 1 0 0 1 20 80 Tm (A) Tj EMC 1 0 0 1 20 140 Tm (B) Tj \
/Span << /ActualText (Second) >> BDC 1 Tr 1 0 0 1 20 80 Tm (A) Tj EMC 0 Tr ET";
let run = |text: &str, fill: bool, stroke: bool| vec![(text.to_string(), fill, stroke)];
assert_eq!(type_runs(content), [run("First", true, false), run("B", true, false), run("Second", false, true)], "{content}");
}
/// Fill and stroke rendering of a `TJ` that draws a glyph again where it drew one, in an
/// ActualText span: the strokes go over the glyphs in the order filled, so the replacement text,
/// on the first glyph's line and in its style, is filled and stroked, not left to the copy drawn
/// last, which shows no text (#8543).
#[test]
fn a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement() {
for mode in ["2", "6"] {
for show in ["[(A) 667 (A)] TJ", "[(A) -500 (B) 1834 (A)] TJ", "[(A) -3500 (B) 4834 (A)] TJ"] {
let content = format!("BT {mode} Tr /F1 48 Tf 20 80 Td /Span << /ActualText (ABA) >> BDC {show} EMC 0 Tr ET");
assert_eq!(type_runs(&content), [vec![("ABA".to_string(), true, true)]], "{content}");
}
}
}
/// The lines of type one operator's fill pass finishes are kept for its stroke pass up to 64 at
/// a time: a `TJ` whose kerning starts 65 lines comes in as 65 type objects filled and stroked,
/// and one that starts 66 as a filled object and a stroked one for each part, the fills first,
/// as the file draws them (#8543).
#[test]
fn a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart() {
let content = |n: usize| format!("BT 2 Tr /F1 4 Tf 20 80 Td [{}] TJ 0 Tr ET", vec!["(A)"; n].join(" -3500 "));
let both = vec![("A".to_string(), true, true)];
assert_eq!(type_runs(&content(65)), vec![both; 65]);
let (fill, stroke) = (vec![("A".to_string(), true, false)], vec![("A".to_string(), false, true)]);
let want: Vec<_> = std::iter::repeat_n(fill, 66).chain(std::iter::repeat_n(stroke, 66)).collect();
assert_eq!(type_runs(&content(66)), want);
}
/// A `TJ` over more lines than are kept whose last part draws its first glyph again at the first
/// glyph's origin still comes in as a filled object and a stroked one for each part: the stroke
/// over the first glyph, whose line was finished, doesn't take the last part's fill (#8543).
#[test]
fn a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart() {
// Helvetica's A is 667 units wide: 65 As and 64 kerns of 3,500 back to the first A's origin.
let parts = vec!["(A)"; 65].join(" -3500 ");
let content = format!("BT 2 Tr /F1 4 Tf 20 80 Td [{parts} 267355 (A)] TJ 0 Tr ET");
let (fill, stroke) = (vec![("A".to_string(), true, false)], vec![("A".to_string(), false, true)]);
let want: Vec<_> = std::iter::repeat_n(fill, 66).chain(std::iter::repeat_n(stroke, 66)).collect();
assert_eq!(type_runs(&content), want);
}
/// Type filled and stroked right after a `TJ` over more lines than are kept is filled and
/// stroked as before, whether the `TJ` was filled and stroked or filled only (#8543).
#[test]
fn type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked() {
let parts = vec!["(A)"; 66].join(" -3500 ");
for mode in ["2", "0"] {
let content = format!("BT /F1 4 Tf 20 80 Td {mode} Tr [{parts}] TJ 2 Tr /F1 48 Tf 1 0 0 1 40 150 Tm (B) Tj 0 Tr ET");
let types = type_runs(&content);
assert_eq!(types.len(), if mode == "2" { 133 } else { 67 }, "{content}");
assert_eq!(types.last(), Some(&vec![("B".to_string(), true, true)]), "{content}");
}
}
/// The start and end of an ActualText span end the stroke pass of the glyphs filled before them,
/// for the stroke over the glyph filled last too: a stroke after the span over the glyph its
/// replacement text came with, or over a glyph filled before an empty span, is type of its own,
/// and the glyph keeps its fill only (#8543).
#[test]
fn a_stroke_after_an_actual_text_span_does_not_take_a_glyph_filled_before_it() {
let run = |text: &str, fill: bool, stroke: bool| vec![(text.to_string(), fill, stroke)];
let cases = [
"/Span << /ActualText (A) >> BDC 1 0 0 1 20 80 Tm (A) Tj EMC 1 Tr 1 0 0 1 20 80 Tm (A) Tj",
"1 0 0 1 20 80 Tm (A) Tj /Span << /ActualText (B) >> BDC EMC 1 Tr 1 0 0 1 20 80 Tm (A) Tj",
];
for show in cases {
let content = format!("BT /F1 48 Tf 0 Tr {show} 0 Tr ET");
assert_eq!(type_runs(&content), [run("A", true, false), run("A", false, true)], "{content}");
}
}
/// A glyph stroked twice where it was drawn, by stroke rendering or by fill and stroke rendering
/// then stroke rendering, is one type object, as before: a stroke over the glyph drawn last
/// restyles it when nothing ended its stroke pass (#7741, #8015).
#[test]
fn a_glyph_stroked_again_where_it_was_drawn_stays_one_type_object() {
for (show, fill) in [("1 Tr (A) Tj", false), ("2 Tr (A) Tj", true)] {
let content = format!("BT /F1 48 Tf {show} 1 Tr 1 0 0 1 20 80 Tm (A) Tj 0 Tr ET").replace("Tf ", "Tf 1 0 0 1 20 80 Tm ");
assert_eq!(type_runs(&content), [vec![("A".to_string(), fill, true)]], "{content}");
}
}
/// A stroke pass longer than the importer holds at once ([`MAX_HELD`] strokes) goes over its own
/// operator's glyphs, filled right before it, also when an operator before it filled the same
/// glyphs at the same places: `A` and 4,095 `B`s filled, then `A` and 4,096 `B`s filled and
/// stroked from the same place strokes the second operator's glyphs, not the first one's (#8543).
#[test]
fn a_long_stroke_pass_does_not_take_the_same_glyphs_filled_by_an_operator_before() {
let (before, now) = ("B".repeat(4095), "B".repeat(4096));
let content = format!("BT /F1 2 Tf 1 0 0 1 20 80 Tm 0 Tr (A{before}) Tj 1 0 0 1 20 80 Tm 2 Tr (A{now}) Tj 0 Tr ET");
let looks: Vec<Vec<(String, bool, bool)>> = type_runs(&content);
let want = [vec![(format!("A{before}"), true, false)], vec![(format!("A{now}"), true, true)]];
assert!(looks == want, "{:?}", looks.iter().map(|t| t.iter().map(|r| (r.0.len(), r.1, r.2)).collect::<Vec<_>>()).collect::<Vec<_>>());
}
+4 -3
View File
@@ -1,6 +1,6 @@
# File format parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (`.ai` and EPS import: a path or compound path whose art style fills it with a pattern comes in with that pattern fill where its drawn look places the pattern (#8239); scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; scores and estimates unchanged; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, not butt caps and miter joins, #7741; `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; `.ai` and EPS import: a top-object envelope whose mesh saves its sides' curves in pieces draws its contents along each whole curve, as its drawn art does, #7097; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: `.ai` and EPS import: type from the text document, type a PostScript program sets and legacy `.ai` type are set in an installed face of their font's PostScript name, exact name first, in the version a text document's record keeps; the `.ai` save writes a static font's version when its name alone gives another copy, #6983; `.ai` and EPS import: type keeps the manual kerning of its text document, #6899; `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, its strokes' miter tips and strokes a Transform effect moves included, after its glyphs grown by half its strokes' weight, #6824; `.ai` and EPS import: type filled or stroked with a pattern swatch keeps its pattern, from the art style its text document paint names, #6856; #6865: explicitly requested oversized editing artboard; PDF import: Indic type keeps its marks on their line, and a line whose type would not draw as the file does keeps the file's glyphs as outlines, #5235; previously: newly imported SVG/SVGZ titles are filtered and bounded without changing restored titles, #3626; `.ai` and EPS import, and what every export and `.ai` save draw: type's strokes in an envelope paint at their own weight along its bent outlines, Distort Appearance on or off, #6644; `.ai` and EPS import: centred and right-aligned lines of tracked type are aligned without the tracking after their last character, as the file's page aligns them, #6610; `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art, #6570; `.ai` save and open: layer colour presets Yellow, Magenta and Cyan keep their colour, as the `Lb` colour index now follows the file's numbering, #6502; `.ai` save: stroked type keeps its stroke's cap, join and miter limit in the text document, #6472; `.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke, #3179; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature thLine truncated
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (PDF import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF export writes the document language as the catalog's `/Lang`, #3644; PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; scores and estimates unchanged; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, not butt caps and miter joins, #7741; `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; `.ai` and EPS import: a top-object envelope whose mesh saves its sides' curves in pieces draws its contents along each whole curve, as its drawn art does, #7097; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: `.ai` and EPS import: type from the text document, type a PostScript program sets and legacy `.ai` type are set in an installed face of their font's PostScript name, exact name first, in the version a text document's record keeps; the `.ai` save writes a static font's version when its name alone gives another copy, #6983; `.ai` and EPS import: type keeps the manual kerning of its text document, #6899; `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, its strokes' miter tips and strokes a Transform effect moves included, after its glyphs grown by half its strokes' weight, #6824; `.ai` and EPS import: type filled or stroked with a pattern swatch keeps its pattern, from the art style its text document paint names, #6856; #6865: explicitly requested oversized editing artboard; PDF import: Indic type keeps its marks on their line, and a line whose type would not draw as the file does keeps the file's glyphs as outlines, #5235; previously: newly imported SVG/SVGZ titles are filtered and bounded without changing restored titles, #3626; `.ai` and EPS import, and what every export and `.ai` save draw: type's strokes in an envelope paint at their own weight along its bent outlines, Distort Appearance on or off, #6644; `.ai` and EPS import: centred and right-aligned lines of tracked type are aligned without the tracking after their last character, as the file's page aligns them, #6610; `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art, #6570; `.ai` save and open: layer colour presets Yellow, Magenta and Cyan keep their colour, as the `Lb` colour index now follows the file's numbering, #6502; `.ai` save: stroked type keeps its stroke's cap, join and miter limit in the text document, #6472; `.ai` and EPS import, PDF import: tracking and manual kerning in horizontally scaled type take the Horizontal Scale, as the file's page spaces such type; `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke, #3179; `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid, #3179; `.ai` and EPS import: stroked type keeps its stroke's cap, join and miter limit from the text document, #6472; `.ai` save: type in a variable font's named instance names its design-space setting, #6388; `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page, #3179; `.ai` and EPS import: a note for type in an envelope, #3179; `.ai` and EPS import: the live envelope and warped type check sees white art; PDF import: DeviceN images of one ink or of process plates keep their inks, #6348; `.ai` import: images in a spot ink's Separation space keep their ink, #6350; PDF import: Separation images keep their ink, #6314; PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; PDF import: image masks open colorized by the color they are painted in, #6313; EPS and `.ai` editing data: a ligature the page names by a private-use glyph matches its text object; EPS import: CIDFonts only named, oveLine truncated
>
> Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865).
@@ -370,8 +370,8 @@ Stop opacity on translated artboards remains outside this regression coverage.
- [ ] Exact redistribution of one replacement over several lines/styles, and general mixed-direction paragraph layout. Replacement uses the first placed glyph's line/style. Tags deeper than 128 and replacements over 64 KiB encoded (at most 192 KiB decoded) fall back to glyph mappings with a warning; an outer accepted owner survives deeper tags.
- [x] Stroked type (text rendering modes 1, 2, 5 and 6, with or without `ActualText`) keeps the line cap, line join and miter limit of the graphics state it is stroked with, as paths do; glyphs stroked with another cap, join or miter limit are a run of their own, also a glyph filled and then stroked otherwise than the run its fill joined (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`). The dash array is not carried to the characters yet.
- [x] Type filled and stroked by one text-showing operator (text rendering modes 2 and 6: the reader fills all of a `Tj` or `TJ`, every string of the array, before it strokes the same glyphs) comes in as one type object, filled and stroked, as it does glyph by glyph; a stroke over no filled glyph (modes 1 and 5, or stroked type of its own) stays stroke only (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Translucent type filled and stroked stays a filled object and a stroked one, as the file composites them apiece (`translucent_fill_and_stroke_text_stays_two_objects`). A glyph filled only right after one filled and stroked (`2 Tr (B) Tj 0 Tr (C) Tj`) joins the same type object filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`).
- [ ] PDF type filled and stroked at less than full opacity as one type object, and a `TJ` whose kerning starts a new line part way through, filled and stroked: both still come in as a filled object and a stroked one (#8015).
- [x] Type filled and stroked by one text-showing operator (text rendering modes 2 and 6: the reader fills all of a `Tj` or `TJ`, every string of the array, before it strokes the same glyphs) comes in as one type object, filled and stroked, as it does glyph by glyph; a stroke over no filled glyph (modes 1 and 5, or stroked type of its own) stays stroke only (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Translucent type filled and stroked stays a filled object and a stroked one, as the file composites them apiece (`translucent_fill_and_stroke_text_stays_two_objects`). A glyph filled only right after one filled and stroked (`2 Tr (B) Tj 0 Tr (C) Tj`) joins the same type object filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`). A `TJ` whose kerning starts a new line part way through (`[(AB) -3500 (CD)] TJ`) comes in as a type object filled and stroked for each part, also when it jumps back or starts two new lines, and when it draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`: each copy is stroked where it was filled), up to 65 lines in one operator (the 64 its fill pass finished, kept back, and the open one): past them each part stays a filled object and a stroked one, the fills first, as the file draws them (`a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`), also when its last part draws its first glyph again where it began (`a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`), and type filled and stroked after it still comes in filled and stroked (`type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`); in an `ActualText` span it stays one replacement type object, filled and stroked, on the first glyph's line and in its style, also when it draws a glyph again; stroked only (modes 1 and 5) it stays stroke only, and translucent it stays a filled object and a stroked one for each part (#8543, `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`). A stroke pass past the 4,096 strokes held at once still strokes its own operator's glyphs, also when an operator before it filled the same glyphs at the same places (`a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_long_stroke_pass_does_not_take_the_same_glyphs_filled_by_an_operator_before`). A stroke after stroked type of its own, in another `ActualText` span, or after a span starts or ends, goes over no glyph filled before it, the glyph drawn last included: it stays type of its own, drawn in order, and each span keeps its replacement text (`a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_stroke_after_an_actual_text_span_does_not_take_a_glyph_filled_before_it`).
- [ ] PDF type filled and stroked at less than full opacity as one type object: it still comes in as a filled object and a stroked one (#8015).
- [x] Place from bytes or unlinked paths, and PDF clipboard paste, keep the selected page's live text. Synthetic two-page regressions in `crates/engine/src/cmd/fileio/tests_pdffidelity.rs` cover both sources, page selection and explicit outlines. The single-page importer honors the same text choice as Open; existing PDF fallback rules are unchanged.
@@ -383,6 +383,7 @@ Stop opacity on translated artboards remains outside this regression coverage.
| Date | Change | Summary |
|---|---|---|
| 2026-11-18 | minor | PDF import (#8543): type filled and stroked (text rendering modes 2 and 6) by a `TJ` whose kerning starts a new line part way through came in as four type objects, each part filled only and each part stroked only over it: the reader fills every glyph of the operator before it strokes them, and the line the first part was gathered on was finished before the stroke pass came back to it. Lines an operator's fill pass finishes while a stroke may still be drawn over them are now kept (up to 64 besides the open line, so a `TJ` over up to 65 lines: one over more stays a filled object and a stroked one for each part, as before) until the stroke pass goes past them, and the pass's strokes are held (up to 4096: a longer pass is matched a part at a time, each part to glyphs filled one right after another, never to one an operator before it filled) until it ends, then matched to the glyphs filled last, in the order they were filled, so each stroke finds the glyph it was filled as, also where the `TJ` draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`). Each part comes in as one type object filled and stroked, in the order drawn; also a `TJ` that jumps back and one whose kerning starts two new lines. In an `ActualText` span (whose stroke was lost) the replacement text stays one type object on the first glyph's line and in its style, now filled and stroked, also where the `TJ` draws a glyph again: the span's strokes are matched the same way. A stroke over no filled glyph (stroked type of its own) and the start and end of an `ActualText` span end a stroke pass: no stroke after them goes over a glyph filled before them, so none is drawn under type drawn after it, and a later span keeps its own replacement text. Stroke rendering stays stroke only, and translucent type stays a filled object and a stroked one. Tests: `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`, `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`, `a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`, `type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`; scores and estimates unchanged. |
| 2026-11-18 | minor | PDF export (#3644): the document language chosen in Document Setup is written as the catalog's `/Lang` (BCP 47, `en-US` by default) and as XMP `dc:language`; a language without a tag writes none. Scores and estimates unchanged. |
| 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. |
| 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. |
+2 -2
View File
@@ -1,6 +1,6 @@
# Roadmap: milestones and what's next
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (M4: `.ai` and EPS import: a path or compound path whose art style fills it with a pattern comes in with that pattern fill, #8239; scores and estimates unchanged; previously: Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect GalleLine truncated
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell CheckLine truncated
>
> Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865).
>
@@ -168,7 +168,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule
| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 |
| M2 | Drawing tools + smart guides | ✅ mostly done (Eraser preserves fill outside fixed and varied tip sweeps and Alt-drag marquees on fill-only open paths and keeps their compound holes; clipping masks retain surviving contours or empty geometry in the same node; ordinary Group/Layer paints and evaluated gradient placements are preserved when the stored paint reproduces their appearance; hidden Rasterize and Along/Across stroke rows do not block visible gradients; replacement-art effects, plug-ins/Rasterize, along/across-stroke gradients and placements that cannot be reproduced keep their existing fitting; stroked open paths retain main behavior (#6582); #3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123) | 12–18 |
| M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel (its spectrum grows with a resized panel, #8005), Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416; native Lab entry and swatch libraries in the picker, Assign-row menus, #8031/#4028); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 |
| M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | Production Preflight checks fonts, overflow, links and image resolution with clickable findings and automatic rechecking (VectorCraft addition; estimates unchanged); PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300; estimates unchanged); PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) |
| M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | Production Preflight checks fonts, overflow, links and image resolution with clickable findings and automatic rechecking (VectorCraft addition; estimates unchanged); PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300; estimates unchanged); PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one, as the file composites them; estimates unchanged); PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) |
| M5 | Performance | 🟡 background render + caches + MT done; `vectorcraft-cli bench` and `vectorcraft-cli perf` (budget suite); opaque solid-fill knockout paths draw once in hard-edge/supersampled raster export, with analytical-AA compositing unchanged; file format v2 opens 3× faster (50k paths: 722 → 244 ms); raster effects (glows, shadows, blur, feather) no longer force the whole frame single-threaded (filtered offscreen per effect, verified equal to the single-threaded reference); Craquelure/Mosaic Tiles/Stained Glass distance searches optimized with pixel-invariance checks and the `texture_drag_perf` probe (#1257); effect-heavy demos need a clean-machine benchmark; dirty-region rendering, GPU backend spike pending | 15–25 |
| M6 | Path operations (Pathfinder, Shape Builder, offset…) | ✅ mostly done (live compound shapes: Make, Alt-click a Shape Mode, member modes, Release, Expand (#4522); single-result Pathfinder names and SVG IDs retained (#1293); Divide open-cutting-path geometry, appearance and history verified (#1307; existing segment cap remains); Simplify preview/counts and rewritten-path component selection verified (#1272; the slider opens at the Auto-Simplify level; a Direct Selection part of a path simplifies on its own); Compound appearance and member fill-rule edits verified (#1197); Boolean precision on almost-horizontal edges fixed and the property tests made deterministic; Shape Builder gap detection, large-offset bug open); Shape Builder Gap Detection shares Live Paint’s spatial gap finder and temporary merge bridges (#2526); Custom is capped at 72 pt in the existing options dialog | 3–6 |
| M7 | Type (point/area/path, editing, styles, OpenType, threading, glyphs) | Spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, the custom dictionary and Ignore All commands, Auto Spell Check with its right-click suggestions, Ignore All and Add to Dictionary, Spelling › Auto Spell Check in the context menu of type, the Edit Custom Dictionary dialog, and the modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `Cmd+I`, `ui.checkSpelling`, #4936); 🟡 Retype phase 1: `type.retype` turns outlined text that exactly matches an available font back into point text (#4934); Right-aligned area type sets the text after a line's last tab against the right edge, the text before it at its stops (#6147); A line a soft return ends is justified as a wrapped line is (#6137); Indian-language pattern hyphenation preserves syllables in both composers (#4947); 🟡 Hanging punctuation keeps its published amounts under Glyph Scaling, and Standard burasagari counts a hung line start as room; Fullwidth `!` / `?` keep an upright fallback in vertical type; Hyphenation… and Justification… per paragraph (#2310, #2755), Auto Leading also driving the Character panel's Leading, the Alt+↑/↓ leading nudge and Fill with Placeholder Text; Document-point character controls after object/group scaling (#1034; optional font-size preservation remains separate), Character/Paragraph Styles (explicit Auto-leading resets and local leading overrides), per-paragraph paragraph attributes, mixed paragraph alignment indication (headless regressions, full integration CI and visual review pass), Area Type Options (with Width/Height, Auto Size and Shrink Text to Fit; overflow reported to agents and vertical Align), type areas resized by their handles and reshaped with Direct Selection, threaded text, Fit Headline, Glyphs (feature-valued alternates and unencoded glyphs applied in one Undo step while keeping Arabic joining, #5514), OpenType panel (including font-defined Stylistic Sets), Find Font (Document, Recent and System replacement sources, #5217), installed system fonts in every font menu (fonts registered with Windows outside its font folders, the XDG and Flatpak host font folders on Linux, and fonts installed while the app runs, listed when it comes back to the front; searchable; the Character and Properties menus show each family's sample of the selected text, preview it live under the pointer or ↑/↓, show recently applied families first (#3515), filter by script and kind, list a family's styles, and star favourites; the Glyphs panel and Find Font's Replace With use the same menu without the live preview) and found by name on open/import (full-name aliases and Missing Fonts searches verified, #1258; Windows font-service QA pending), variable fonts' named instances as styles, CJK names in the UI, input methods (marked text in place, candidate window at the caret; Japanese IME), Text Wrap (offset, invert, both sides of an object; follows edits), Type on a Path effects and Options with draggable start/centre/end brackets (slide, flip), tab stops + Tabs panel (Above Text floats it over the selected text, its ruler at the canvas zoom so stops line up with the columns, #729), inline symbols in text (beyond parity), Hebrew/Arabic bidirectional text, Paragraph Direction, Every-line/Single-line Composer per object (ragged text too) done; paint-only Arabic harakat keep joining with GDEF-mark ownership and Insert Kashidas tatweels on the base letter's paint (`tests::harakat`); tab leaders, vertical type pending | 45–60 |
+6 -5
View File
@@ -1,6 +1,6 @@
# Parity with Adobe Illustrator
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Drawing tools and Type advanced rows drop the shipped Touch Type and Dimension tool from their missing items, and one Type advanced row replaces four duplicates (#8387); scores and hours unchanged; previously: Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it Line truncated
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, oLine truncated
>
> Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5).
>
@@ -69,6 +69,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
| Date | Change | Summary |
|---|---|---|
| 2026-11-18 | minor | PDF import (#8543): type filled and stroked (text rendering modes 2 and 6) by a `TJ` whose kerning starts a new line part way through came in as four type objects, each part filled only and each part stroked only over it: the reader fills every glyph of the operator before it strokes them, and the line the first part was gathered on was finished before the stroke pass came back to it. Lines an operator's fill pass finishes while a stroke may still be drawn over them are now kept (up to 64 besides the open line, so a `TJ` over up to 65 lines: one over more stays a filled object and a stroked one for each part, as before) until the stroke pass goes past them, and the pass's strokes are held (up to 4096: a longer pass is matched a part at a time, each part to glyphs filled one right after another, never to one an operator before it filled) until it ends, then matched to the glyphs filled last, in the order they were filled, so each stroke finds the glyph it was filled as, also where the `TJ` draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`). Each part comes in as one type object filled and stroked, in the order drawn; also a `TJ` that jumps back and one whose kerning starts two new lines. In an `ActualText` span (whose stroke was lost) the replacement text stays one type object on the first glyph's line and in its style, now filled and stroked, also where the `TJ` draws a glyph again: the span's strokes are matched the same way. A stroke over no filled glyph (stroked type of its own) and the start and end of an `ActualText` span end a stroke pass: no stroke after them goes over a glyph filled before them, so none is drawn under type drawn after it, and a later span keeps its own replacement text. Stroke rendering stays stroke only, and translucent type stays a filled object and a stroked one. Tests: `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`, `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`, `a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`, `type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`; scores and estimates unchanged. |
| 2026-11-18 | minor | Hardening: PDF export writes the document language (Document Setup) as the catalog's `/Lang` and XMP `dc:language` (#3644). Scores and estimates unchanged. |
| 2026-11-17 | minor | Distort & Transform › Twist: handles follow the rotation's derivative, so a strongly twisted path is a smooth spiral instead of pieces meeting at kinks (#7069; `twist_joins_its_pieces_smoothly` in `crates/effects/src/tests.rs`). Scores and estimates unchanged. |
| 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. |
@@ -286,9 +287,9 @@ dominate; 3D, graphs and automation are specialist). They sum to 105. Feature de
| Image Trace, graphs, image tools | 3 | 75% | graph Column designs, Image Trace Create Strokes depth (Create Object Mosaic is done; junction-returning piece survival has source-generated regressions in `image-trace-quality.md`; large images trace with a warning; Auto Color keeps rare distinct colours) | 5–8 | estimated (raised from 72%); quick presets reveal adjustment controls, Properties reopens them |
| Layers, artboards, document setup | 5 | 78% | Selected-artboard deletion is consistent across panel actions (all-selected retains artboard 1); history prunes removed indices while preserving valid multiselection; remaining: 30.0's artboard locking and colours and managing artboards from the canvas, Layers row menu commands beyond Collect for Export and menus on guide and blend spine rows (click-to-fit objects is done, #1227) | 5–8 | estimated (lowered from 82%: target moved); Artboard deletion keys keep artwork and the first of an all-selected set; Artboard Options' Show Center Mark and Show Cross Hairs draw on the canvas only (exports and print leave them out), regression-tested; Artboard Options' Show Video Safe Areas and Video Ruler Pixel Aspect Ratio (per artboard, native format) are done ([video display options](#evidence-what-ships-today-by-area)), score unchanged |
| View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged); document-tab artwork hover/copy and lossless transfer tested (2026-10-22; score/hours unchanged); cached canvas reprojection preserves scale during resize, rotation and DPI changes (regression and contributor original-file evidence below; scores/hours unchanged); cached canvas dimensions match the renderer limit before cache-key creation, view construction and worker submission (regression evidence below) |
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); DXF export's Include Placed Images and Include Fill Hatches options, off in CNC / CAM (`images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`; score, gaps and hours unchanged); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`; the distance from the path under Align to Path is measured from the top of each character's em box, half the height of the top of its H or the bottom of its font's bounding box (`tests_native::aligned_type_lies_as_far_from_its_path_as_the_file_lays_it_out`), and the fit under Gravity does not reproduce the file's layout), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. `.ai` and EPS import: a path or compound path whose art style fills it with a pattern comes in with that pattern fill where its drawn look places the pattern (#8239) (tests `a_path_with_a_style_pattern_fill_comes_in_as_the_path_with_it`, `a_style_pattern_fill_the_look_doesnt_paint_keeps_the_drawn_look`, `a_stack_with_one_pattern_twice_keeps_the_drawn_look`, `a_look_placing_a_stacks_pattern_twice_keeps_the_drawn_look`, `a_path_with_a_style_pattern_fill_under_an_effect_keeps_its_drawn_look` and `type_with_a_style_pattern_fill_takes_a_stroke_only_looks_placement` in `crates/eps/src/import/ai/tests.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` in `crates/pdf/src/tests/textstroke.rs`); score and hours unchanged. |
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, textures, map art and shading in 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. `.ai` and EPS import: a path or compound path whose art style fills it with a pattern comes in with that pattern fill where its drawn look places the pattern (#8239) (tests `a_path_with_a_style_pattern_fill_comes_in_as_the_path_with_it`, `a_style_pattern_fill_the_look_doesnt_paint_keeps_the_drawn_look`, `a_stack_with_one_pattern_twice_keeps_the_drawn_look`, `a_look_placing_a_stacks_pattern_twice_keeps_the_drawn_look`, `a_path_with_a_style_pattern_fill_under_an_effect_keeps_its_drawn_look` and `type_with_a_style_pattern_fill_takes_a_stroke_only_looks_placement` in `crates/eps/src/import/ai/tests.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` in `crates/pdf/src/tests/textstroke.rs`); score and hours unchanged. |
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity, or by a `TJ` whose kerning starts a new line part way through, comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Save refusal continuation (#6146): `READ_ONLY_LOCATION`, Save As on ordinary UI Save only; regression execution pending; score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. `.ai` and EPS import: a path or compound path whose art style fills it with a pattern comes in with that pattern fill where its drawn look places the pattern (#8239) (tests `a_path_with_a_style_pattern_fill_comes_in_as_the_path_with_it`, `a_style_pattern_fill_the_look_doesnt_paint_keeps_the_drawn_look`, `a_stack_with_one_pattern_twice_keeps_the_drawn_look`, `a_look_placing_a_stacks_pattern_twice_keeps_the_drawn_look`, `a_path_with_a_style_pattern_fill_under_an_effect_keeps_its_drawn_look` and `type_with_a_style_pattern_fill_takes_a_stroke_only_looks_placement` in `crates/eps/src/import/ai/tests.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not yet for type filled and stroked at less than full opacity, or a `TJ` whose kerning starts a new line part way through, which still come in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glLine truncated
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), no writing of Illustrator's editing data (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); DXF export's Include Placed Images and Include Fill Hatches options, off in CNC / CAM (`images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`; score, gaps and hours unchanged); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`; the distance from the path under Align to Path is measured from the top of each character's em box, half the height of the top of its H or the bottom of its font's bounding box (`tests_native::aligned_type_lies_as_far_from_its_path_as_the_file_lays_it_out`), and the fit under Gravity does not reproduce the file's layout), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543, `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` in `crates/pdf/src/tests/textstroke.rs`); score and hours unchanged. |
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, textures, map art and shading in 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543, `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` in `crates/pdf/src/tests/textstroke.rs`); score and hours unchanged. |
| File formats | 6 | 75% | `.ai` files open with a flattened or wrong layer structure in real cases (#951), a saved `.ai`'s editing copy without live effects on objects other than paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports, and with live objects other than grouped column, stacked column, line and area graphs the `.ai` reader reads back whole as their art (#868), FreeHand/CorelDRAW/DWG/HEIC import, 3D export; see [file-format-parity.md](file-format-parity.md); EPS legacy mesh/opacity-mask and raster comparison follow-up verified PDF marked-text batching covered by M4 evidence (#6309); cross-line/style ActualText layout (#6165) and styled-cluster limits remain.; PDF type filled and stroked at less than full opacity comes in as a filled object and a stroked one (#8015) | 10–20 | estimated (lowered from 85%: open issues); DXF control-point SPLINE import closure regression-tested (#1299 follow-up after #1320); PDF writer metadata, reader streaming and immutable backend checks in `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/reader_streaming.rs` and `xtask/src/pdf_deps.rs`; PDF Place and clipboard paste retain live text (synthetic regressions); SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; EPS ordinary Save retains the page frame and editable document (2026-10-26); `.ai`/EPS editing data checked against a user's files (2026-10-30): case setting (`ate::tests`, `tests_native::type_from_the_text_document_keeps_its_case_setting`), placed-file placements (`tests_native::a_small_placed_file_goes_where_it_draws_closer_to_the_page`), pages cropped to the art (`tests_native::type_on_the_copies_of_a_page_cropped_to_the_art_is_read_once`), mesh corner weights and state (`ai::mesh::tests::corners_with_handle_weights_of_zero_are_read`, `ai::tests::a_gradient_mesh_takes_the_transparency_written_after_it`), type on a path spacing (`tests_native::type_round_a_circle_is_spaced_as_the_file_lays_it_out`), blend state (`ai::tests::a_blends_transparency_follows_its_record`); scores and estimates unchanged. Graphs saved to `.ai` in either form open again as live graphs (`ai_editing::tests::graphs_are_written_with_their_records_and_open_live`, `legacy_ai::tests::graphs_are_written_with_their_records_and_open_live`, `cmd::graph::tests::a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns`); other graphs are still written as their art (`graphs_the_records_cant_keep_are_written_as_their_art`); score and hours unchanged. PDF ActualText preserved in editable import (#6165; bounded synthetic coverage below); score/hours unchanged. Save refusal continuation (#6146): `READ_ONLY_LOCATION`, Save As on ordinary UI Save only; regression execution pending; score/hours unchanged. Legacy `.ai` type keeps its manual kerning pairs (`Tk`, `TK`), discretionary hyphens (`T+`, `T-`) and hyphenation language (`XL`) when it opens, and legacy `.ai` saves write manual kerning as `Tk` and soft hyphens as `T+` (`import::ai::tests::legacy_manual_pair_kerning_is_kept`, `legacy_ai::tests::manual_kerning_and_soft_hyphens_are_written_and_read_back`); score, gaps and hours unchanged. PDF import: stroked type (text rendering modes 1, 2, 5 and 6) keeps the file's line cap, line join and miter limit, as paths do (#7741, `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`); score, gaps and hours unchanged. PDF import: type filled and stroked by one text-showing operator (rendering modes 2 and 6) comes in as one type object, filled and stroked, not a stroked copy over a filled one (#8015, `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`); not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one (`translucent_fill_and_stroke_text_stays_two_objects`); score and hours unchanged. PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543, `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`); score and hours unchanged. PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300, `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` in `crates/pdf/src/tests/textstroke.rs`); score and hours unchanged. |
| View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged); document-tab artwork hover/copy and lossless transfer tested (2026-10-22; score/hours unchanged); cached canvas reprojection preserves scale during resize, rotation and DPI changes (regression and contributor original-file evidence below; scores/hours unchanged) |
| View & navigation | 3 | 70% | multiple windows and the rest of Arrange (Cascade, Float in Window, Float All in Windows) | 9–14 | estimated; Window › Arrange › Tile and Consolidate All Windows done (score/hours unchanged) |
| Guides, grids, smart guides, snapping, rulers | 3 | 80% | "intersect" smart guides for a moved selection's anchors (drawn points and dragged anchors snap to intersections, #1658) | 4–7 | estimated (lowered from 85%: target moved); Control bar snapping quick access includes Snap to Glyph and Alignment Guides (#6164); new ruler-guide Alt orientation implemented; global/artboard ruler modes (`view.globalRulers`) and video rulers (View › Rulers › Show Video Rulers, #2849) done; status-bar X/Y uses the active ruler origin and General units; score unchanged |
@@ -617,7 +618,7 @@ since 2026-10-01.
- **PDF authored replacement text (#6165):** `crates/pdf/src/tests/actual_text.rs` covers replacement once with suffix placement, PDF text-string decoding, empty and nested owners, sibling spans, page reset, multiple text-show operations, style/line changes, fill-and-stroke, reader windows and bounded input. Authored logical-order stretches are protected while adjacent ordinary text still undergoes reconstruction. The replacement takes its first placed glyph's style and line; its characters are not redistributed over later lines/styles. Exact mixed-direction paragraph layout is not claimed. No export changes; scores and hours stay at 75% / 10–20 h.
- **PDF stroked type (#7741):** `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs` covers round, projecting and butt caps, round, bevel and miter joins and a miter limit of 3 on type stroked in rendering modes 1, 2, 5 and 6, shown as a word, a glyph at a time and under `ActualText`; glyphs stroked with another join as runs of their own; and a glyph filled and stroked after one stroked otherwise, which keeps the join of the glyph before it. Synthetic PDFs written in the test (standard Helvetica, not embedded); no fonts or fixtures added. The dash array is not yet carried to the characters.
- **PDF type filled then stroked (#8015):** `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs` covers a word shown at once, a `TJ` array of two strings with kerning between them, a line over two `Tj` and a glyph at a time, also under `ActualText`, in text rendering modes 0, 1, 2, 4, 5 and 6: modes 2 and 6 come in as one type object `WAVE` filled #ffffcc with a 3 pt black stroke, round cap and join, modes 1 and 5 stroke only, 0 and 4 fill only; a Type 3 font is filled once in every mode (the reader paints Type 3 glyphs as their procedures draw them); a stroke join that changes between two operators keeps a run each; and filled type with stroked type of its own below it stays two objects. `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs` covers a vertical column in modes 2 and 6. `a_stroke_at_another_size_does_not_go_over_the_filled_glyph` and `a_stroke_over_one_glyph_of_a_filled_word_strokes_only_that_glyph` (also in `textstroke.rs`) cover a word filled and then its first glyph stroked from the same origin: at another size it stays type of its own, and at the same size only that glyph is stroked. `translucent_fill_and_stroke_text_stays_two_objects` (in `textstroke.rs`) covers type filled and stroked at the same opacity: at 0.5 it stays a filled object and a stroked one, as the file composites them apiece, and opaque it is one. `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled` in `crates/pdf/src/tests/reshaped.rs` covers a vertical line of Devanagari with one glyph filled and stroked: every glyph comes in filled. `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` (#8300, in `textstroke.rs`) covers a glyph filled only right after one filled and stroked, also after a glyph filled only and before another filled and stroked: it joins the same type object filled only, not stroked; `glyphs_filled_and_stroked_one_by_one_stay_one_run` covers fill and stroke rendering glyph by glyph and a word filled whole then stroked whole at the same place: one run, filled and stroked. Not covered: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Synthetic PDFs written in the tests; no fonts or fixtures added.
- **PDF type filled then stroked (#8015):** `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs` covers a word shown at once, a `TJ` array of two strings with kerning between them, a line over two `Tj` and a glyph at a time, also under `ActualText`, in text rendering modes 0, 1, 2, 4, 5 and 6: modes 2 and 6 come in as one type object `WAVE` filled #ffffcc with a 3 pt black stroke, round cap and join, modes 1 and 5 stroke only, 0 and 4 fill only; a Type 3 font is filled once in every mode (the reader paints Type 3 glyphs as their procedures draw them); a stroke join that changes between two operators keeps a run each; and filled type with stroked type of its own below it stays two objects. `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs` covers a vertical column in modes 2 and 6. `a_stroke_at_another_size_does_not_go_over_the_filled_glyph` and `a_stroke_over_one_glyph_of_a_filled_word_strokes_only_that_glyph` (also in `textstroke.rs`) cover a word filled and then its first glyph stroked from the same origin: at another size it stays type of its own, and at the same size only that glyph is stroked. `translucent_fill_and_stroke_text_stays_two_objects` (in `textstroke.rs`) covers type filled and stroked at the same opacity: at 0.5 it stays a filled object and a stroked one, as the file composites them apiece, and opaque it is one. `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled` in `crates/pdf/src/tests/reshaped.rs` covers a vertical line of Devanagari with one glyph filled and stroked: every glyph comes in filled. `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked` (#8300, in `textstroke.rs`) covers a glyph filled only right after one filled and stroked, also after a glyph filled only and before another filled and stroked: it joins the same type object filled only, not stroked; `glyphs_filled_and_stroked_one_by_one_stay_one_run` covers fill and stroke rendering glyph by glyph and a word filled whole then stroked whole at the same place: one run, filled and stroked. `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked` (#8543, in `textstroke.rs`) covers a `TJ` whose kerning starts a new line part way through (`[(AB) -3500 (CD)] TJ`), one that jumps back, and one whose kerning starts two new lines, in modes 2 and 6: each part one type object, filled and stroked, in the order drawn; small kerning stays one object, and in an `ActualText` span the replacement text stays one type object, filled and stroked, on the first glyph's line and in its style. `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy` covers a `TJ` that draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`, with the copy drawn last ending the operator or followed by another line, and with A and B drawn again): each copy one type object, filled and stroked; a glyph filled and stroked by an operator of its own where one filled before stands still strokes only the one filled last. `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only` covers modes 1 and 5 (stroke only), and `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart` covers it at 0.5 opacity: a filled object and a stroked one for each part, as the file draws them. `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before` covers a stroke pass past the 4,096 strokes held at once (an `A` filled, then `A` and 4,096 `B`s filled and stroked from the same place): the second `A` is stroked, not the first; `a_long_stroke_pass_does_not_take_the_same_glyphs_filled_by_an_operator_before` covers `A` and 4,095 `B`s filled, then `A` and 4,096 `B`s filled and stroked from the same place: the second operator's glyphs are stroked, not the first one's. `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before` covers a stroke over a glyph filled two lines back after stroked type of its own: it stays type of its own, drawn last. `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph` covers a stroke in an `ActualText` span over a glyph an earlier span filled: each span's replacement text comes in. `a_stroke_after_an_actual_text_span_does_not_take_a_glyph_filled_before_it` covers a stroke after a span over the glyph its replacement text came with, and over a glyph filled before an empty span: type of its own, the glyph filled only; `a_glyph_stroked_again_where_it_was_drawn_stays_one_type_object` covers a glyph stroked again where it was drawn: one type object. `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement` covers `[(A) -3500 (B) 4834 (A)] TJ` in an `ActualText` span: one replacement type object, filled and stroked. `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart` covers the limit: a `TJ` over 65 lines comes in as 65 type objects filled and stroked, one over 66 as a filled object and a stLine truncated
- **PDF Indic type (#5235, #6906):** `crates/pdf/src/tests/reshaped.rs` covers a vowel sign the file draws before its consonant (the line keeps the file's glyphs as outlines, with a note), text in reading order (stays type), a mark with no advance (stays on its line, not vertical type of its own), outlined glyphs stroked with different dashes and translucent outlined glyphs (each keeps its own path). Synthetic font only; one real Gujarati file checked by eye on page 1. Indic type in an uninstalled font keeps the file's glyphs as outlines; reordering signs so more lines stay editable is not done. Scores and hours stay at 75% / 10-20 h.