Fonts/zh-cn: Difference between revisions
Created page with "要安装来自 Nerd Fonts 仓库 的所有字体,只需将所有独立的包添加到 NixOS 配置中即可。以下代码行通过搜索 `nerd-fonts` 属性下的所有派生,精确实现这一目的:{{file|||<nowiki> { fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); }" |
Created page with "并非所有字体都有 Nerd Fonts 变体,但幸运的是,您可以轻松地自行打补丁。 {{File|3=(pkgs.scientifica.overrideAttrs (o: { nativeBuildInputs = [ pkgs.nerd-font-patcher ]; postInstall = '' mkdir -p $out/share/fonts/truetype/{scientifica,scientifica-nerd} mv $out/share/fonts/truetype/*.ttf $out/share/fonts/truetype/scientifica/ for f in $out/share/fonts/truetype/scientifica/*.ttf; do nerd-font-patcher --complete --outputdir $ou..." Tags: Mobile edit Mobile web edit |
||
| Line 80: | Line 80: | ||
=== 将 nerdfonts 补丁应用到字体中 === | === 将 nerdfonts 补丁应用到字体中 === | ||
并非所有字体都有 Nerd Fonts 变体,但幸运的是,您可以轻松地自行打补丁。 | |||
{{File|3=(pkgs.scientifica.overrideAttrs (o: { | {{File|3=(pkgs.scientifica.overrideAttrs (o: { | ||
nativeBuildInputs = [ pkgs.nerd-font-patcher ]; | nativeBuildInputs = [ pkgs.nerd-font-patcher ]; | ||
| Line 92: | Line 91: | ||
''; | ''; | ||
}))|name=/etc/nixos/configuration.nix|lang=nix}} | }))|name=/etc/nixos/configuration.nix|lang=nix}} | ||
<span lang="en" dir="ltr" class="mw-content-ltr">=== Let Fontconfig know the fonts within your Nix profile ===</span> | <span lang="en" dir="ltr" class="mw-content-ltr">=== Let Fontconfig know the fonts within your Nix profile ===</span> | ||