tests: add base and font tests
This commit is contained in:
0
tests/citations.bib
Normal file
0
tests/citations.bib
Normal file
4
tests/citations.typ
Normal file
4
tests/citations.typ
Normal file
@@ -0,0 +1,4 @@
|
||||
// todo: add citations
|
||||
|
||||
#pagebreak(weak: true)
|
||||
#bibliography("citations.bib", title: "Bibliography - CZ", style: "../template/tul_citace.csl")
|
59
tests/fonts.typ
Normal file
59
tests/fonts.typ
Normal file
@@ -0,0 +1,59 @@
|
||||
#let display_font(family, weight) = {
|
||||
if type(family) == type(none) {
|
||||
block(
|
||||
spacing: 2em,
|
||||
text("Příšerně žluťoučký kůn úpěl ďábelské ódy. " + lorem(25), weight: weight)
|
||||
)
|
||||
} else {
|
||||
block(
|
||||
spacing: 2em,
|
||||
text("Příšerně žluťoučký kůn úpěl ďábelské ódy. " + lorem(25), font: family, weight: weight)
|
||||
)
|
||||
}
|
||||
}
|
||||
#show heading.where(level: 1): it => {
|
||||
v(3em);
|
||||
it;
|
||||
}
|
||||
|
||||
= #highlight[TUL Mono]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("tul mono", "regular")
|
||||
|
||||
= #highlight[Inter]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("inter", "regular")
|
||||
|
||||
== Light
|
||||
|
||||
#display_font("inter", "light")
|
||||
|
||||
== Bold
|
||||
|
||||
#display_font("inter", "bold")
|
||||
|
||||
#pagebreak()
|
||||
|
||||
= #highlight[Default]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font(none, "regular")
|
||||
|
||||
= #highlight[Merriweather]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("merriweather", "regular")
|
||||
|
||||
== Light
|
||||
|
||||
#display_font("merriweather", "light")
|
||||
|
||||
== Bold
|
||||
|
||||
#display_font("merriweather", "bold")
|
6
tests/make.mk
Normal file
6
tests/make.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
.PHONY: test_%
|
||||
test_%: tests/%.pdf
|
||||
xdg-open $<
|
||||
|
||||
tests/%.pdf: tests/%.typ
|
||||
typst compile --root . --font-path template/fonts $<
|
Reference in New Issue
Block a user