# Conflicts:
#	crates/compose/src/tests.rs
This commit is contained in:
Brandon Thomas
2026-10-14 22:33:58 -04:00
3 changed files with 22 additions and 0 deletions
+1
View File
@@ -142,6 +142,7 @@ Newest first.
- **2026-10-15** · IDML: ruler guides import and export (they were dropped). Each page's guides come in measured from the document's ruler origin (spread, page or spine), with Fit to Page, Locked and their layer, parent pages' included, and go out again under their pages. No readiness percentage change.
- **2026-10-15** · Find Font no longer reports a style missing when it differs from the installed one only in spacing or case (InDesign files can name `Regular ` with a trailing space); the text was already drawn in the right face. No readiness percentage change.
- **2026-10-15** · A line of text is set when its baseline fits in the frame, as in InDesign: descenders may hang below the frame's bottom. A frame sized to the cap height of a big heading (103 pt in a 2.77 cm frame, as Zero2Graphic's magazine tutorial draws them) no longer oversets. No readiness percentage change.
- **2026-10-15** · A story that ends with a return is no longer overset when only its empty last paragraph doesn't fit, as in InDesign (Preflight said "Overset text: 0 characters" for a caption InDesign shows with no errors). No readiness percentage change.
- **2026-10-13** · Object › Fitting has InDesign's shortcuts: Fill Frame Proportionally ⌘⌥⇧C, Fit Content Proportionally ⌘⌥⇧E, Fit Frame to Content ⌘⌥C, Fit Content to Frame ⌘⌥E, Center Content ⌘⇧E. No readiness percentage change.
- **2026-10-13** · Gradients between process colours blend as inks, as InDesign shows them: magenta to cyan passes through C 50 M 50 (a light lilac) on screen instead of the darker RGB mix, and a midpoint between CMYK or grey stops no longer turns the PDF shading RGB. No readiness percentage change.
- **2026-10-14** · The Swatches panel has InDesign's header: a Fill/Stroke proxy, Formatting Affects Container/Text and the Tint of the colour in front (a tint alone keeps each object's own swatch). Clicking a swatch applies it to the fill or stroke in front (of the text, when formatting affects text), and the bottom row has New Color Group, New Swatch and Delete Swatch. No readiness percentage change.
+5
View File
@@ -966,6 +966,11 @@ fn compose_with_db(doc: &Document, story: &Story, frames: &[FrameSpec], opts: &C
pi = j;
continue 'paras;
}
// An empty last paragraph (the story ends with a return) isn't overset text, as in
// InDesign: nothing of it is left to show.
if prange.is_empty() && prange.start >= story.text.len() {
break 'paras;
}
out.overset_at = Some(glyphs.get(g0).map(|g| g.byte).unwrap_or(prange.start));
// The part of the paragraph that fits keeps its shading and border.
para_box_decos(&mut out, pi, &pp);
+16
View File
@@ -4241,3 +4241,19 @@ fn spaces_at_the_end_of_a_paragraph_take_no_room() {
assert_eq!(&text[first.range.clone()].trim_end(), &"2 VOOR", "{text:?}");
}
}
/// A story that ends with a return isn't overset when only its empty last paragraph doesn't fit,
/// as in InDesign (Montilla Design's file: a caption fitted to its three lines, "No errors"). Text
/// that doesn't fit still is.
#[test]
fn an_empty_last_paragraph_isnt_overset() {
// 12 pt, 14.4 leading: two lines fit in 35 pt, a third (baseline ~40) doesn't.
let (d, sid, _) = doc_with("One\nTwo\n", Rect::new(0.0, 0.0, 200.0, 35.0), ParaAttrs::default());
let cs = compose_story(&d, sid, &ComposeOptions::default());
assert_eq!(all_lines(&cs).len(), 2);
assert!(!cs.is_overset(), "only the empty paragraph after the last return is left");
let (d, sid, _) = doc_with("One\nTwo\nThree", Rect::new(0.0, 0.0, 200.0, 35.0), ParaAttrs::default());
assert!(compose_story(&d, sid, &ComposeOptions::default()).is_overset());
let (d, sid, _) = doc_with("One\nTwo\n\n", Rect::new(0.0, 0.0, 200.0, 35.0), ParaAttrs::default());
assert!(compose_story(&d, sid, &ComposeOptions::default()).is_overset(), "an empty paragraph before the last one is text");
}