Set operator names upright and declare new ones

This commit is contained in:
gloamxun committed 2026-10-26 01:24:46 +08:00
1 parent a4c4864d2b
commit 7ba66392ea
6 files changed
+120 -32

No files matched your search

+18
View File
@@ -794,6 +794,24 @@ impl Page {
});
}
}
MathAtom::OperatorName { name, .. } => {
let roman = crate::cmr10::Cmr10Metrics::Roman;
let mut cursor = x;
for character in name.chars() {
if character == ' ' {
cursor += roman.space();
continue;
}
list.push(DisplayItem::Text {
font: FontFace::Roman,
x: cursor,
y: baseline,
size,
text: character.to_string(),
});
cursor += roman.width(character);
}
}
MathAtom::Text(text) => {
let mut cursor = x;
for character in text.chars() {