Set operator names upright and declare new ones
This commit is contained in:
1 parent
a4c4864d2b
commit
7ba66392ea
6 files changed
+120
-32
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user