Skip to content

Commit

Permalink
fix: change Inter from ttf to woff2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaasrud committed Feb 21, 2022
2 parents 75633da + 6adfb4a commit 7725129
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pkgs.rustPlatform.buildRustPackage {
];
nativeBuildInputs = [ rust-toolchain ];

cargoSha256 = "sha256-uJ00tGiKtcYghFUh0fcYg4nZc/o8yhvlVs+6/aRNY5s=";
cargoSha256 = "sha256-r4HXd1lSk6Tb3Aw8TL9/jqgVvm8w71ScgTLqQc14F9U=";
}
23 changes: 12 additions & 11 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/renderer/mdzk_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ fn fix_link(dest: CowStr) -> CowStr {
}

const FONTS: [(&str, &[u8]); 62] = [
("Inter.ttf", include_bytes!("theme/css/fonts/Inter.ttf")),
("Inter.var.woff2", include_bytes!("theme/css/fonts/Inter.var.woff2")),
(
"Source_Code_Pro_v11_All_Charsets_500.woff2",
include_bytes!("theme/css/fonts/Source_Code_Pro_v11_All_Charsets_500.woff2"),
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/theme/css/fonts.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@font-face {
font-family: Inter;
src: url("fonts/Inter.ttf") format("truetype");
font-family: 'Inter';
font-weight: 100 900;
font-display: swap;
font-style: oblique 0deg 10deg;
src: url("Inter.var.woff2?v=3.19") format("woff2");
}

@font-face {
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/theme/css/fonts/Inter.ttf

This file was deleted.

3 changes: 3 additions & 0 deletions src/renderer/theme/css/fonts/Inter.var.woff2
Git LFS file not shown

0 comments on commit 7725129

Please sign in to comment.