Embed Computer Modern Type1 outlines in route-D PDFs

This commit is contained in:
gloamxun committed 2026-10-24 03:28:10 +08:00
1 parent 6eef2f7a54
commit 5f5fc393a4
6 files changed
+295 -10

No files matched your search

+4 -3
View File
@@ -11,7 +11,9 @@ use std::sync::{Mutex, OnceLock};
use texrra_tex_core::cmr10::Cmr10Metrics;
use texrra_tex_core::math::{MathAtom, parse_math, split_math_lines};
use texrra_tex_core::pdf::{PageOrigin, display_lists_to_pdf_with_paper};
use texrra_tex_core::pdf::{
PageOrigin, display_lists_to_pdf_with_cm_type1, display_lists_to_pdf_with_paper,
};
use texrra_tex_core::{Document, Engine, ParagraphFont, ParagraphStyle, Unit};
const SCALE: i64 = 65_536;
@@ -587,7 +589,7 @@ pub fn pdf_bytes(source: &str) -> Result<Vec<u8>, String> {
list
})
.collect();
Ok(display_lists_to_pdf_with_paper(
Ok(display_lists_to_pdf_with_cm_type1(
&pages,
document.paper_width,
document.paper_height,
@@ -2034,7 +2036,6 @@ mod inline_tests {
assert_eq!(runs[1], (ParagraphFont::Sans, " and text".to_string()));
}
#[test]
#[test]
fn declaration_groups_switch_the_face() {
let runs = inline_runs("{\\bfseries bold} normal", ParagraphFont::Roman).expect("runs");