Add a pdfLaTeX oracle and clamp justification glue
This commit is contained in:
1 parent
1e2d4afd6b
commit
9726f5f736
6 files changed
+379
-18
No files matched your search
@@ -1,7 +1,9 @@
|
||||
//! End-to-end route-D smoke test: layout, display lists, PDF bytes, and an
|
||||
//! incremental paragraph edit.
|
||||
|
||||
use texrra_tex_core::{Document, Engine, ParagraphStyle, Unit, pdf::display_lists_to_pdf};
|
||||
use texrra_tex_core::{
|
||||
Document, Engine, ParagraphFont, ParagraphStyle, Unit, pdf::display_lists_to_pdf,
|
||||
};
|
||||
|
||||
fn paragraph(id: u64, marker: &str) -> Unit {
|
||||
let text = format!("{} {}", marker, "alpha beta gamma delta ".repeat(80));
|
||||
@@ -550,10 +552,13 @@ fn route_d_multiline_bands_track_pdftex() {
|
||||
found
|
||||
}
|
||||
|
||||
let text = "The quick brown fox jumps over the lazy dog while a second sentence keeps wrapping across several lines so that the baseline grid can be compared with a real TeX paragraph built from exactly the same words and the same measure.";
|
||||
// The 150pt fixture is the one whose line breaks the oracle already
|
||||
// verifies word for word against pdfLaTeX, so ink bands can be compared
|
||||
// without a break-model difference in the way.
|
||||
let text = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu";
|
||||
|
||||
let style = ParagraphStyle {
|
||||
line_width: 360 * 65_536,
|
||||
line_width: 150 * 65_536,
|
||||
left_skip: 0,
|
||||
right_skip: 0,
|
||||
centered: false,
|
||||
@@ -567,7 +572,12 @@ fn route_d_multiline_bands_track_pdftex() {
|
||||
};
|
||||
let document = Document::new(
|
||||
700 * 65_536,
|
||||
vec![Unit::paragraph_with_style(1, text, style)],
|
||||
vec![Unit::paragraph_with_style_and_face(
|
||||
1,
|
||||
text,
|
||||
style,
|
||||
ParagraphFont::Roman,
|
||||
)],
|
||||
);
|
||||
let engine = Engine::layout(&document);
|
||||
let pages: Vec<_> = engine
|
||||
@@ -594,7 +604,7 @@ fn route_d_multiline_bands_track_pdftex() {
|
||||
\headsep=0pt
|
||||
\pdfpagewidth=612bp
|
||||
\pdfpageheight=792bp
|
||||
\textwidth=360pt
|
||||
\textwidth=150pt
|
||||
\textheight=700pt
|
||||
\topskip=10pt
|
||||
\parindent=0pt
|
||||
|
||||
Reference in new issue
Block a user