Draw mathbb letters from msbm10

This commit is contained in:
gloamxun committed 2026-10-24 12:14:54 +08:00
1 parent e229809581
commit cb40cc4634
7 files changed
+122 -1

No files matched your search

+23
View File
@@ -4212,6 +4212,29 @@ mod tests {
)));
}
#[test]
fn mathbb_paints_with_the_msbm_face() {
use crate::render::{DisplayItem, FontFace};
let document = Document::new(
1_000_000,
vec![Unit::math(
1,
crate::math::parse_math("\\mathbb{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::MathBlackboard,
..
} if text == "A"
)));
}
#[test]
fn edit_on_second_page_only_rebuilds_second_page() {
let mut document = document();