explicitly set fonts used
This commit is contained in:
parent
b1022bf6ec
commit
6068889397
9 changed files with 44 additions and 22 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -20,6 +20,7 @@
|
||||||
"nixfmt",
|
"nixfmt",
|
||||||
"nixos",
|
"nixos",
|
||||||
"nixpkgs",
|
"nixpkgs",
|
||||||
|
"noto",
|
||||||
"opentype",
|
"opentype",
|
||||||
"pagebreak",
|
"pagebreak",
|
||||||
"pinit",
|
"pinit",
|
||||||
|
@ -42,7 +43,6 @@
|
||||||
"editor.defaultFormatter": "myriad-dreamin.tinymist"
|
"editor.defaultFormatter": "myriad-dreamin.tinymist"
|
||||||
},
|
},
|
||||||
"tinymist.formatterMode": "typstyle",
|
"tinymist.formatterMode": "typstyle",
|
||||||
"tinymist.exportPdf": "onSave",
|
|
||||||
|
|
||||||
"[jsonc]": {
|
"[jsonc]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
|
11
devenv.nix
vendored
11
devenv.nix
vendored
|
@ -3,8 +3,8 @@
|
||||||
let
|
let
|
||||||
fontsOverlay = import (
|
fontsOverlay = import (
|
||||||
builtins.fetchTarball {
|
builtins.fetchTarball {
|
||||||
url = "https://github.com/pompydev/nix-google-fonts-overlay/archive/dfb84823efeb84314f8186cb2014edf05136b527.tar.gz";
|
url = "https://github.com/pompydev/nix-google-fonts-overlay/archive/fc0690302d895d6813a51bcd918442f7dc9db49a.tar.gz";
|
||||||
sha256 = "sha256:01cpfyzd4xl3a462jyn2xn22hn6i1my1svyag7926r3r2vmck24y";
|
sha256 = "sha256:1mvhxl20vbccwzcr55ghlxnr8fnanbzh3jy7l4k2mzin4vmz4qan";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
@ -15,13 +15,16 @@ in
|
||||||
nixd
|
nixd
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
|
||||||
|
# fonts
|
||||||
font-awesome_6
|
font-awesome_6
|
||||||
|
google-fonts-noto-serif
|
||||||
|
google-fonts-noto-serif-kr
|
||||||
];
|
];
|
||||||
|
|
||||||
scripts.compile.exec = ''
|
scripts.compile.exec = ''
|
||||||
find src/ -name '*.typ' | while read file; do
|
find src/ -name '*.typ' | while read file; do
|
||||||
echo "Compiling $file"
|
echo "Compiling $file"
|
||||||
typst compile --root . "$file"
|
typst compile --ignore-system-fonts --root . "$file"
|
||||||
done
|
done
|
||||||
echo Done!
|
echo Done!
|
||||||
'';
|
'';
|
||||||
|
@ -31,6 +34,8 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
fontPaths = [
|
fontPaths = [
|
||||||
"${pkgs.font-awesome_6}/share/fonts/opentype"
|
"${pkgs.font-awesome_6}/share/fonts/opentype"
|
||||||
|
"${pkgs.google-fonts-noto-serif}/share/fonts/truetype"
|
||||||
|
"${pkgs.google-fonts-noto-serif-kr}/share/fonts/truetype"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
src/_lib/const.typ
Normal file
5
src/_lib/const.typ
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#let page_width = 90mm
|
||||||
|
#let page_height = 140mm
|
||||||
|
#let page_margin = 5mm
|
||||||
|
#let default_font = ("Noto Serif", "Noto Serif KR")
|
||||||
|
#let default_font_size = 10pt
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Chemistry", slug: "math")
|
#cover(name: "Chemistry", slug: "math")
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Computer Science", slug: "cs")
|
#cover(name: "Computer Science", slug: "cs")
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Electrical Engineering", slug: "ee")
|
#cover(name: "Electrical Engineering", slug: "ee")
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
#import "@preview/fletcher:0.5.7"
|
#import "@preview/fletcher:0.5.7"
|
||||||
#import fletcher: diagram, node, edge
|
#import fletcher: diagram, node, edge
|
||||||
#import "@preview/pinit:0.2.2": *
|
#import "@preview/pinit:0.2.2": *
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Mathematics", slug: "math")
|
#cover(name: "Mathematics", slug: "math")
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Neuroscience", slug: "neuro")
|
#cover(name: "Neuroscience", slug: "neuro")
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import "../_lib/const.typ": *
|
||||||
#import "../_lib/cover.typ": cover
|
#import "../_lib/cover.typ": cover
|
||||||
|
|
||||||
#set page(
|
#set page(
|
||||||
width: 90mm,
|
width: page_width,
|
||||||
height: 140mm,
|
height: page_height,
|
||||||
margin: 5mm,
|
margin: page_margin,
|
||||||
numbering: "1",
|
numbering: "1",
|
||||||
)
|
)
|
||||||
|
#set text(font: default_font, size: default_font_size)
|
||||||
#set list(marker: "•")
|
#set list(marker: "•")
|
||||||
|
|
||||||
#cover(name: "Physics", slug: "phy")
|
#cover(name: "Physics", slug: "phy")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue