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
@@ -5,6 +5,7 @@ mod tail;
|
||||
pub(super) use tail::TailNodeRef;
|
||||
mod leaders;
|
||||
mod legacy_fonts;
|
||||
mod native_words;
|
||||
pub use leaders::{LeaderGlue, LeaderMode, LeaderPattern};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
|
||||
@@ -617,7 +618,7 @@ pub(super) fn hpack(
|
||||
span: Span,
|
||||
state: &State,
|
||||
) -> Result<NativeBox, String> {
|
||||
hpack_with_direction_report(nodes, spec, span, state).map(|(packed, _)| packed)
|
||||
hpack_with_direction_report(nodes, spec, span, state, None).map(|(packed, _)| packed)
|
||||
}
|
||||
|
||||
pub(super) fn hpack_with_direction_report(
|
||||
@@ -625,7 +626,12 @@ pub(super) fn hpack_with_direction_report(
|
||||
spec: PackSpec,
|
||||
span: Span,
|
||||
state: &State,
|
||||
shaping_budget: Option<(&mut usize, usize)>,
|
||||
) -> Result<(NativeBox, (usize, usize)), String> {
|
||||
if state.input_profile() == InputProfile::XeTeX {
|
||||
let glyph_metrics = state.parameter(Parameter::XeTeXuseglyphmetrics).width() > 0;
|
||||
native_words::rejoin(&mut nodes, glyph_metrics, shaping_budget)?;
|
||||
}
|
||||
let direction_problems = super::direction::complete_box(&mut nodes);
|
||||
let (mut width, mut height, mut depth) = (0, 0, 0);
|
||||
let (mut stretch, mut shrink) = ([0; 4], [0; 4]);
|
||||
|
||||
Reference in new issue
Block a user