Lay out inline math in paragraphs

This commit is contained in:
gloamxun committed 2026-10-24 21:13:06 +08:00
1 parent aae046a2f0
commit e008741aa5
7 files changed
+346 -13

No files matched your search

+11
View File
@@ -529,6 +529,17 @@ impl Page {
for item in line {
match item {
HorizontalItem::Box(box_) => {
if let Some(math) = &box_.math {
let math_font = Cmr10Metrics::default();
Self::paint_math(
math,
&math_font,
x,
baseline,
size,
&mut list.items,
);
}
if let Some(character) = box_.character {
list.push(DisplayItem::Text {
font: box_.font.map_or(face, paragraph_face),