Paint monospace paragraphs with the embedded mono face

This commit is contained in:
gloamxun committed 2026-10-20 21:35:37 +08:00
1 parent 6dd4f6bf83
commit 1633e441de
4 files changed
+19 -2

No files matched your search

+1
View File
@@ -367,6 +367,7 @@ impl Page {
ParagraphFont::Roman => FontFace::Roman,
ParagraphFont::Bold => FontFace::Bold,
ParagraphFont::Italic => FontFace::Italic,
ParagraphFont::Mono => FontFace::Mono,
};
let lines = paragraph.lines.len().max(1) as i64;
let line_height = (paragraph.height / lines).max(1);