Draw mathcal letters from cmsy10
This commit is contained in:
1 parent
66ceabad0e
commit
e229809581
7 files changed
+114
-8
No files matched your search
@@ -4189,6 +4189,29 @@ mod tests {
|
||||
assert_eq!(faces, vec![FontFace::Bold]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mathcal_paints_with_the_cmsy_face() {
|
||||
use crate::render::{DisplayItem, FontFace};
|
||||
let document = Document::new(
|
||||
1_000_000,
|
||||
vec![Unit::math(
|
||||
1,
|
||||
crate::math::parse_math("\\mathcal{A}"),
|
||||
&Cmr10Metrics::Math,
|
||||
)],
|
||||
);
|
||||
let engine = Engine::layout(&document);
|
||||
let list = engine.pages()[0].display_list();
|
||||
assert!(list.items.iter().any(|item| matches!(
|
||||
item,
|
||||
DisplayItem::Text {
|
||||
text,
|
||||
font: FontFace::MathSymbol,
|
||||
..
|
||||
} if text == "A"
|
||||
)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn edit_on_second_page_only_rebuilds_second_page() {
|
||||
let mut document = document();
|
||||
|
||||
Reference in new issue
Block a user