Order native PDF link continuations with shipout effects
This commit is contained in:
1 parent
e95d1264da
commit
af19a26c23
5 files changed
+274
-140
No files matched your search
@@ -886,20 +886,22 @@ impl NativeBox {
|
||||
|
||||
pub(super) fn visit_shipout_font_uses(
|
||||
&self,
|
||||
mut emit: impl FnMut(usize, &std::sync::Arc<crate::native_font::NativeFont>, u8),
|
||||
mut emit: impl FnMut(usize, usize, &std::sync::Arc<crate::native_font::NativeFont>, u8),
|
||||
) -> Result<(), String> {
|
||||
use crate::math_engine_tex::MathItem;
|
||||
let mut output_count = 0;
|
||||
let mut paint_count = 0;
|
||||
self.walk(0, 0, &mut |_, _, node| match node {
|
||||
BoxPaint::Output(_) => output_count += 1,
|
||||
BoxPaint::Box(b) => {
|
||||
if let Some(geometry) = &b.math_geometry {
|
||||
for item in &geometry.items {
|
||||
if let MathItem::NativeGlyph { font, slot, .. } = &item.item {
|
||||
emit(output_count, font, *slot);
|
||||
emit(output_count, paint_count, font, *slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
paint_count += 1;
|
||||
}
|
||||
_ => {}
|
||||
})?;
|
||||
|
||||
Reference in new issue
Block a user