Integrate native repeat boxes and PDF bookmarks
This commit is contained in:
1 parent
5163fc9854
commit
38e4822370
33 files changed
+1208
-143
No files matched your search
@@ -194,6 +194,12 @@ impl Collector {
|
||||
self.material(o).geometry_items += g.items.len();
|
||||
}
|
||||
}
|
||||
fn leader_pattern(&mut self, leader: &LeaderGlue, o: Ownership) {
|
||||
match &leader.pattern {
|
||||
LeaderPattern::Box(b) => self.native_box(b, o),
|
||||
LeaderPattern::Rule(_) => self.material(o).geometry_items += 1,
|
||||
}
|
||||
}
|
||||
pub fn text(&mut self, nodes: &[TextNode], o: Ownership) {
|
||||
self.material(o).horizontal_nodes += nodes.len();
|
||||
for n in nodes {
|
||||
@@ -213,6 +219,7 @@ impl Collector {
|
||||
TextNode::Adjustment(value) => self.vertical(&value.nodes, o),
|
||||
TextNode::Insertion(n) => self.vertical(&n.nodes, o),
|
||||
TextNode::Output(v) => self.output(v),
|
||||
TextNode::Leaders(leader) => self.leader_pattern(leader, o),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -229,6 +236,7 @@ impl Collector {
|
||||
NativeVerticalNode::Mark(m) => self.shared_tokens(&m.tokens),
|
||||
NativeVerticalNode::Insertion(n) => self.vertical(&n.nodes, o),
|
||||
NativeVerticalNode::Output(v) => self.output(v),
|
||||
NativeVerticalNode::Leaders(leader) => self.leader_pattern(leader, o),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -264,6 +272,7 @@ impl Collector {
|
||||
MathNode::Adjustment(value) => self.vertical(&value.nodes, o),
|
||||
MathNode::Insertion(n) => self.vertical(&n.nodes, o),
|
||||
MathNode::Output(v) => self.output(v),
|
||||
MathNode::Leaders(leader) => self.leader_pattern(leader, o),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -292,6 +301,9 @@ impl Collector {
|
||||
for n in nodes {
|
||||
match n {
|
||||
D::Box(b) => self.diagnostics(&b.nodes, o),
|
||||
D::Leaders { pattern, .. } => {
|
||||
self.diagnostics(std::slice::from_ref(pattern.as_ref()), o)
|
||||
}
|
||||
D::Discretionary { pre, post, .. } => {
|
||||
self.diagnostics(pre, o);
|
||||
self.diagnostics(post, o);
|
||||
|
||||
Reference in new issue
Block a user