Compare commits

..

No commits in common. "e60d3021a782c5977cf7de726682e19ae89abeb3" and "efdb75558f20543af39f75fb88b3bae59b20e2e8" have entirely different histories.

6 changed files with 6 additions and 8 deletions

View File

@ -361,7 +361,7 @@ pub struct FontArgs {
/// Ensures system fonts won't be searched, unless explicitly included via
/// `--font-path`.
#[arg(long, env = "TYPST_IGNORE_SYSTEM_FONTS")]
#[arg(long)]
pub ignore_system_fonts: bool,
}

View File

@ -210,9 +210,7 @@ impl World for SystemWorld {
}
fn font(&self, index: usize) -> Option<Font> {
// comemo's validation may invoke this function with an invalid index. This is
// impossible in typst-cli but possible if a custom tool mutates the fonts.
self.fonts.get(index)?.get()
self.fonts[index].get()
}
fn today(&self, offset: Option<i64>) -> Option<Datetime> {

View File

@ -97,7 +97,7 @@ impl World for TestWorld {
}
fn font(&self, index: usize) -> Option<Font> {
self.base.fonts.get(index).cloned()
Some(self.base.fonts[index].clone())
}
fn today(&self, _: Option<i64>) -> Option<Datetime> {

View File

@ -4,5 +4,5 @@ equation = Rovnice
bibliography = Bibliografie
heading = Kapitola
outline = Obsah
raw = Výpis
raw = Seznam
page = strana

View File

@ -498,7 +498,7 @@ impl World for DocWorld {
}
fn font(&self, index: usize) -> Option<Font> {
FONTS.1.get(index).cloned()
Some(FONTS.1[index].clone())
}
fn today(&self, _: Option<i64>) -> Option<Datetime> {

View File

@ -67,7 +67,7 @@ impl World for TestWorld {
}
fn font(&self, index: usize) -> Option<Font> {
self.base.fonts.get(index).cloned()
Some(self.base.fonts[index].clone())
}
fn today(&self, _: Option<i64>) -> Option<Datetime> {