Skip to content

Commit

Permalink
chore: fix roboto font now that the PR has been merged.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 1, 2025
1 parent dfb5f8c commit 99cc571
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
12 changes: 6 additions & 6 deletions flake.lock

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

24 changes: 1 addition & 23 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,11 @@
# Change here to typst-dev if needed
typst = pkgs.nixpkgs-unstable.typst;

robotoFixed = pkgs.roboto.overrideAttrs (finalAttrs: {
nativeBuildInputs = [
pkgs.python3Packages.fonttools
];

installPhase = ''
runHook preInstall
for file in RobotoCondensed*; do
fontname=$(echo $file | sed 's/\.ttf//')
ttx -v -o $fontname.xml $file
substituteInPlace $fontname.xml \
--replace-fail "<usWidthClass value=\"5\"/>" "<usWidthClass value=\"3\"/>"
ttx $fontname.xml -o $fontname.ttf
done
install -Dm644 *.ttf -t $out/share/fonts/truetype
runHook postInstall
'';
});

fontsConf = pkgs.symlinkJoin {
name = "typst-fonts";
paths = with pkgs; [
font-awesome
robotoFixed
roboto
newcomputermodern
];
};
Expand Down

0 comments on commit 99cc571

Please sign in to comment.