home/fonts: use symbols only nerd font

This commit is contained in:
Guanran Wang 2024-03-21 00:23:18 +08:00
parent d9925b5709
commit 1493848136
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
3 changed files with 29 additions and 20 deletions

View file

@ -16,7 +16,7 @@ configuration {
@import "~/.config/rofi/colors.rasi"
* {
font: "JetBrainsMono Nerd Font SemiBold 14";
font: "JetBrains Mono SemiBold 14";
separatorcolor: transparent;
border: 0;
margin: 0;

View file

@ -1,15 +1,29 @@
{pkgs, ...}: {
# Fontconfig
# WARN: I don't know fontconfig and I have no idea what am I doing. Please do not use as reference.
xdg.configFile = {
"fontconfig/fonts.conf".source = ./fonts.conf;
"fontconfig/conf.d/web-ui-fonts.conf".source = pkgs.fetchurl {
"fontconfig/conf.d/10-web-ui-fonts.conf".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/web-ui-fonts.conf";
hash = "sha256-A4DcV6HTW/IRxXN3NaI1GUfoFdalwgFLpCjgbWENdZU=";
};
"fontconfig/conf.d/source-han-for-noto-cjk.conf".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/source-han-for-noto-cjk.conf";
hash = "sha256-jcdDr5VW1qZXbApgfT5FZgxonpRnLs9AY0QagfdL8ic=";
"fontconfig/conf.d/10-source-han-for-noto-cjk.conf".source = pkgs.substitute {
src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/source-han-for-noto-cjk.conf";
hash = "sha256-jcdDr5VW1qZXbApgfT5FZgxonpRnLs9AY0QagfdL8ic=";
};
substitutions = [
"--replace-warn"
"Source Han Sans"
"Source Han Sans VF"
"--replace-warn"
"Source Han Serif"
"Source Han Serif VF"
];
};
"fontconfig/conf.d/10-nerd-font-symbols.conf".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/${pkgs.nerdfonts.version}/10-nerd-font-symbols.conf";
hash = "sha256-XwJMkcDtGlI+LFMrjCl/gicAnoBWnq3p9adrmieNZwU=";
};
};
@ -26,23 +40,18 @@
};
# HM managed fonts
#
# The reason I use Source Han instead of Noto CJK,
# is because I heard from #archlinux-cn, Adobe packages font better.
# You can 100% use noto-fonts-cjk-{sans,serif} if you prefer consistency/other reason.
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
### Inter
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
inter
### JetBrains Mono Nerd Font
(nerdfonts.override {fonts = ["JetBrainsMono"];})
### Adobe Source Han
# The reason I use Source Han instead of Noto CJK,
# is because I heard from #archlinux-cn, Adobe packages font better.
# You can 100% use noto-fonts-cjk-{sans,serif} if you prefer consistency/other reason.
source-han-sans-vf-otf
source-han-serif-vf-otf
### Noto Fonts
jetbrains-mono
noto-fonts
noto-fonts-color-emoji
source-han-sans-vf-otf
source-han-serif-vf-otf
];
}

View file

@ -37,7 +37,7 @@
<alias binding="strong">
<family>monospace</family>
<prefer>
<family>JetBrainsMono Nerd Font</family>
<family>JetBrains Mono</family>
<family>Source Han Sans SC VF</family>
<family>Noto Color Emoji</family>
</prefer>