Advance native LaTeX execution and preview
This commit is contained in:
1 parent
91f9d76b16
commit
2741546ca8
414 files changed
+99872
-933
No files matched your search
@@ -0,0 +1,23 @@
|
||||
//! Native CLI tests explicitly supply real font resources; runtime lookup has
|
||||
//! no installed-distribution or bundled-font fallback.
|
||||
use std::{path::PathBuf, process::Command, sync::OnceLock};
|
||||
pub fn command() -> Command {
|
||||
static MAP: OnceLock<PathBuf> = OnceLock::new();
|
||||
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let map = MAP.get_or_init(|| {
|
||||
let r = Command::new("kpsewhich")
|
||||
.arg("pdftex.map")
|
||||
.output()
|
||||
.expect("reference font map required");
|
||||
assert!(r.status.success());
|
||||
PathBuf::from(String::from_utf8(r.stdout).unwrap().trim())
|
||||
.parent()
|
||||
.unwrap()
|
||||
.to_owned()
|
||||
});
|
||||
let mut c = Command::new(env!("CARGO_BIN_EXE_texrra"));
|
||||
c.env("TFMFONTS", root.join("crates/texrra-tex-core/assets"));
|
||||
c.env("T1FONTS", root.join("assets/fonts"));
|
||||
c.env("TEXFONTMAPS", map);
|
||||
c
|
||||
}
|
||||
Reference in new issue
Block a user