mirror of
https://github.com/typst/typst
synced 2025-08-15 23:48:32 +08:00
Compare commits
No commits in common. "e60d3021a782c5977cf7de726682e19ae89abeb3" and "efdb75558f20543af39f75fb88b3bae59b20e2e8" have entirely different histories.
e60d3021a7
...
efdb75558f
@ -361,7 +361,7 @@ pub struct FontArgs {
|
|||||||
|
|
||||||
/// Ensures system fonts won't be searched, unless explicitly included via
|
/// Ensures system fonts won't be searched, unless explicitly included via
|
||||||
/// `--font-path`.
|
/// `--font-path`.
|
||||||
#[arg(long, env = "TYPST_IGNORE_SYSTEM_FONTS")]
|
#[arg(long)]
|
||||||
pub ignore_system_fonts: bool,
|
pub ignore_system_fonts: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,9 +210,7 @@ impl World for SystemWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn font(&self, index: usize) -> Option<Font> {
|
fn font(&self, index: usize) -> Option<Font> {
|
||||||
// comemo's validation may invoke this function with an invalid index. This is
|
self.fonts[index].get()
|
||||||
// impossible in typst-cli but possible if a custom tool mutates the fonts.
|
|
||||||
self.fonts.get(index)?.get()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn today(&self, offset: Option<i64>) -> Option<Datetime> {
|
fn today(&self, offset: Option<i64>) -> Option<Datetime> {
|
||||||
|
@ -97,7 +97,7 @@ impl World for TestWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn font(&self, index: usize) -> Option<Font> {
|
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> {
|
fn today(&self, _: Option<i64>) -> Option<Datetime> {
|
||||||
|
@ -4,5 +4,5 @@ equation = Rovnice
|
|||||||
bibliography = Bibliografie
|
bibliography = Bibliografie
|
||||||
heading = Kapitola
|
heading = Kapitola
|
||||||
outline = Obsah
|
outline = Obsah
|
||||||
raw = Výpis
|
raw = Seznam
|
||||||
page = strana
|
page = strana
|
@ -498,7 +498,7 @@ impl World for DocWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn font(&self, index: usize) -> Option<Font> {
|
fn font(&self, index: usize) -> Option<Font> {
|
||||||
FONTS.1.get(index).cloned()
|
Some(FONTS.1[index].clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn today(&self, _: Option<i64>) -> Option<Datetime> {
|
fn today(&self, _: Option<i64>) -> Option<Datetime> {
|
||||||
|
@ -67,7 +67,7 @@ impl World for TestWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn font(&self, index: usize) -> Option<Font> {
|
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> {
|
fn today(&self, _: Option<i64>) -> Option<Datetime> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user