Rejoin XeTeX OpenType word fragments while packing horizontal boxes
This commit is contained in:
1 parent
fa27e0985f
commit
3e9a639f1d
6 files changed
+156
-4
No files matched your search
@@ -1082,6 +1082,7 @@ fn pack(
|
||||
direction_stack: &[super::direction::Region],
|
||||
state: &mut State,
|
||||
span: Span,
|
||||
shaping_budget: (&mut usize, usize),
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<(Paragraph, NativeBox, super::marks::MigratingMaterial, bool), String> {
|
||||
let left = p[&Parameter::Leftskip].glue();
|
||||
@@ -1119,15 +1120,16 @@ fn pack(
|
||||
if p[&Parameter::Pdfadjustspacing].width() > 0 && state.fonts.has_expansion() {
|
||||
expansion::pack(state, &mut material, target, files)?;
|
||||
}
|
||||
let shrinking = material.iter().map(width).sum::<i64>() > target;
|
||||
let mut b = super::boxes::hpack(
|
||||
let (mut b, _) = super::boxes::hpack_with_direction_report(
|
||||
material,
|
||||
super::boxes::PackSpec::To(
|
||||
i32::try_from(target).map_err(|_| "native line width overflow")?,
|
||||
),
|
||||
span,
|
||||
state,
|
||||
Some(shaping_budget),
|
||||
)?;
|
||||
let shrinking = b.setting.sign < 0 || b.excess > 0;
|
||||
b.shift = indent;
|
||||
let paragraph = Paragraph {
|
||||
lines: vec![b.horizontal_items().unwrap()],
|
||||
@@ -1338,6 +1340,7 @@ pub(super) fn finish(
|
||||
&direction_stack,
|
||||
state,
|
||||
b.span,
|
||||
(steps, step_limit),
|
||||
files,
|
||||
)?;
|
||||
packed_diagnostic.push(line_box.diagnostic_eligible);
|
||||
|
||||
Reference in new issue
Block a user