mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
chore: fonts - remove unused fonts, add mono fonts for cjk
feat: more fontconfig parameters
This commit is contained in:
@@ -43,10 +43,10 @@
|
|||||||
history = 10000;
|
history = 10000;
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
bold = {family = "JetBrainsMono Nerd Font";};
|
bold = {family = "Maple Mono NF CN";};
|
||||||
italic = {family = "JetBrainsMono Nerd Font";};
|
italic = {family = "Maple Mono NF CN";};
|
||||||
normal = {family = "JetBrainsMono Nerd Font";};
|
normal = {family = "Maple Mono NF CN";};
|
||||||
bold_italic = {family = "JetBrainsMono Nerd Font";};
|
bold_italic = {family = "Maple Mono NF CN";};
|
||||||
size =
|
size =
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin
|
||||||
then 14
|
then 14
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
term = "foot"; # or "xterm-256color" for maximum compatibility
|
term = "foot"; # or "xterm-256color" for maximum compatibility
|
||||||
font = "JetBrainsMono Nerd Font:size=14";
|
font = "Maple Mono NF CN:size=14";
|
||||||
dpi-aware = "yes";
|
dpi-aware = "yes";
|
||||||
|
|
||||||
# Spawn a nushell in login mode via `bash`
|
# Spawn a nushell in login mode via `bash`
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
settings = {
|
settings = {
|
||||||
theme = "catppuccin-mocha";
|
theme = "catppuccin-mocha";
|
||||||
|
|
||||||
font-family = "JetBrainsMono Nerd Font";
|
font-family = "Maple Mono NF CN";
|
||||||
font-size = 13;
|
font-size = 13;
|
||||||
|
|
||||||
background-opacity = 0.93;
|
background-opacity = 0.93;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
# and it's installed by home-manager if `theme` is specified.
|
# and it's installed by home-manager if `theme` is specified.
|
||||||
themeFile = "Catppuccin-Mocha";
|
themeFile = "Catppuccin-Mocha";
|
||||||
font = {
|
font = {
|
||||||
name = "JetBrainsMono Nerd Font";
|
name = "Maple Mono NF CN";
|
||||||
# use different font size on macOS
|
# use different font size on macOS
|
||||||
size =
|
size =
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ on-touch=dismiss
|
|||||||
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
||||||
|
|
||||||
# STYLE OPTIONS
|
# STYLE OPTIONS
|
||||||
font=JetBrains Mono 10
|
font=Maple Mono NF CN
|
||||||
width=300
|
width=300
|
||||||
height=100
|
height=100
|
||||||
margin=10
|
margin=10
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* {
|
* {
|
||||||
/* https://docs.gtk.org/gtk3/css-overview.html#colors */
|
/* https://docs.gtk.org/gtk3/css-overview.html#colors */
|
||||||
color: @text;
|
color: @text;
|
||||||
font-family: "JetBrainsMono Nerd Font";
|
font-family: "Maple Mono NF CN";
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -149,4 +149,3 @@ tooltip label {
|
|||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/** ********** Fonts ********** **/
|
/** ********** Fonts ********** **/
|
||||||
* {
|
* {
|
||||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
font-family: "Maple Mono NF CN", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
transition: 200ms ease;
|
transition: 200ms ease;
|
||||||
font-family: "JetBrainsMono Nerd Font";
|
font-family: "Maple Mono NF CN";
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
background-color: @bg-col;
|
background-color: @bg-col;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* anyrun's ouput matches entries - Base */
|
/* anyrun's output matches entries - Base */
|
||||||
#match {
|
#match {
|
||||||
color: @fg-col;
|
color: @fg-col;
|
||||||
background: @bg-col;
|
background: @bg-col;
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
|
|
||||||
julia-mono
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,29 +10,6 @@
|
|||||||
material-design-icons
|
material-design-icons
|
||||||
font-awesome
|
font-awesome
|
||||||
|
|
||||||
# Noto 是 Google 开发的开源字体家族
|
|
||||||
# 名字的含义是「没有豆腐」(no tofu),因为缺字时显示的方框或者方框被叫作 tofu
|
|
||||||
#
|
|
||||||
# Noto 系列字族只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。
|
|
||||||
noto-fonts # 大部分文字的常见样式,不包含汉字
|
|
||||||
noto-fonts-color-emoji # 彩色的表情符号字体
|
|
||||||
# Noto CJK 为「思源」系列汉字字体,由 Adobe + Google 共同开发
|
|
||||||
# Google 以 Noto Sans/Serif CJK SC/TC/HK/JP/KR 的名称发布该系列字体。
|
|
||||||
# noto-fonts-cjk-sans # 思源黑体
|
|
||||||
# noto-fonts-cjk-serif # 思源宋体
|
|
||||||
|
|
||||||
# Adobe 以 Source Han Sans/Serif 的名称发布此系列字体
|
|
||||||
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3,以及带字重的变体(VF)
|
|
||||||
source-serif # 衬线字体,不含汉字。字族名叫 Source Serif 4,以及带字重的变体
|
|
||||||
# Source Hans 系列汉字字体由 Adobe + Google 共同开发
|
|
||||||
# 这俩跟 noto-fonts-cjk-xxx 实际为同一字体,只是分别由 Adobe/Google 以自己的品牌名发布
|
|
||||||
source-han-sans # 思源黑体
|
|
||||||
source-han-serif # 思源宋体
|
|
||||||
|
|
||||||
# 文泉驿是旅美学者房骞骞(FangQ)于 2004 年创建的开源汉字字体项目
|
|
||||||
wqy_zenhei # 文泉驿正黑
|
|
||||||
wqy_microhei # 文泉驿微米黑
|
|
||||||
|
|
||||||
# nerdfonts
|
# nerdfonts
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
||||||
nerd-fonts.symbols-only # symbols icon only
|
nerd-fonts.symbols-only # symbols icon only
|
||||||
@@ -40,35 +17,72 @@
|
|||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
|
|
||||||
julia-mono
|
# Noto 是 Google 开发的开源字体家族
|
||||||
# sarasa-gothic # 更纱黑体,一种基于 Inter、Iosevka 和 Source Han Sans 的 CJK 复合字体
|
# 名字的含义是「没有豆腐」(no tofu),因为缺字时显示的方框或者方框被叫作 tofu
|
||||||
|
#
|
||||||
|
# Noto 系列字族只支持西文,命名规则是 Noto + Sans 或 Serif + 文字名称。
|
||||||
|
noto-fonts # 大部分文字的常见样式,不包含汉字
|
||||||
|
noto-fonts-color-emoji # 彩色的表情符号字体
|
||||||
|
# Noto CJK 为「思源」系列汉字字体,由 Adobe + Google 共同开发
|
||||||
|
# Google 以 Noto Sans/Serif CJK SC/TC/HK/JP/KR 的名称发布该系列字体。
|
||||||
|
# 这俩跟 noto-fonts-cjk-sans/serif 实际为同一字体,只是分别由 Adobe/Google 以自己的品牌名发布
|
||||||
|
# noto-fonts-cjk-sans # 思源黑体
|
||||||
|
# noto-fonts-cjk-serif # 思源宋体
|
||||||
|
|
||||||
|
# Adobe 以 Source Han Sans/Serif 的名称发布此系列字体
|
||||||
|
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3,以及带字重的变体(VF)
|
||||||
|
source-serif # 衬线字体,不含汉字。字族名叫 Source Serif 4,以及带字重的变体
|
||||||
|
# Source Hans 系列汉字字体由 Adobe + Google 共同开发
|
||||||
|
source-han-sans # 思源黑体
|
||||||
|
source-han-serif # 思源宋体
|
||||||
|
source-han-mono # 思源等宽
|
||||||
|
|
||||||
|
# 霞鹜文楷屏幕阅读版
|
||||||
|
# https://github.com/lxgw/LxgwWenKai-Screen
|
||||||
|
lxgw-wenkai-screen
|
||||||
|
|
||||||
|
# Maple Mono NF CN (连字 未微调版,适用于高分辨率屏幕)
|
||||||
|
# Full version, embed with nerdfonts icons, Chinese and Japanese glyphs
|
||||||
|
# https://github.com/subframe7536/maple-font
|
||||||
|
maple-mono.NF-CN-unhinted
|
||||||
];
|
];
|
||||||
|
|
||||||
# User defined default fonts
|
fontconfig = {
|
||||||
fontconfig.defaultFonts = {
|
# User defined default fonts
|
||||||
serif = [
|
# https://catcat.cc/post/2021-03-07/
|
||||||
# 英文: 衬线字体
|
defaultFonts = {
|
||||||
"Source Sans 3"
|
serif = [
|
||||||
# 中文: 宋体/明体
|
# 西文: 衬线字体(笔画末端有修饰(衬线)的字体,通常用于印刷。)
|
||||||
"Source Han Serif SC"
|
"Source Sans 3"
|
||||||
"Source Han Serif TC"
|
# 中文: 宋体(港台称明體)
|
||||||
];
|
"Source Han Serif SC" # 思源宋体
|
||||||
# SansSerif 也简写做 Sans, Sans 在法语中就是「without」或者「无」的意思
|
"Source Han Serif TC"
|
||||||
sansSerif = [
|
];
|
||||||
# 英文: 无衬线字体
|
# SansSerif 也简写做 Sans, Sans 在法语中就是「without」或者「无」的意思
|
||||||
"Source Serif 4"
|
sansSerif = [
|
||||||
# 中文: 黑体
|
# 西文: 无衬线字体(指笔画末端没有修饰(衬线)的字体,通常用于屏幕显示)
|
||||||
"Source Han Sans SC"
|
"Source Serif 4"
|
||||||
"Source Han Sans TC"
|
# 中文: 黑体
|
||||||
];
|
"LXGW WenKai Screen" # 霞鹜文楷 屏幕阅读版
|
||||||
# 等宽字体
|
"Source Han Sans SC" # 思源黑体
|
||||||
monospace = [
|
"Source Han Sans TC"
|
||||||
# 英文
|
];
|
||||||
"JetBrainsMono Nerd Font"
|
# 等宽字体
|
||||||
# 中文
|
monospace = [
|
||||||
"WenQuanYi Micro Hei Mono"
|
# 中文
|
||||||
];
|
"Maple Mono NF CN" # 中英文宽度完美 2:1 的字体
|
||||||
emoji = ["Noto Color Emoji"];
|
"Source Han Mono SC" # 思源等宽
|
||||||
|
"Source Han Mono TC"
|
||||||
|
# 西文
|
||||||
|
"JetBrainsMono Nerd Font"
|
||||||
|
];
|
||||||
|
emoji = ["Noto Color Emoji"];
|
||||||
|
};
|
||||||
|
antialias = true; # 抗锯齿
|
||||||
|
hinting.enable = false; # 禁止字体微调 - 高分辨率下没这必要
|
||||||
|
subpixel = {
|
||||||
|
rgba = "rgb"; # IPS 屏幕使用 rgb 排列
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,15 +94,14 @@
|
|||||||
# including full unicode support, and when the video card supports drm should be much faster.
|
# including full unicode support, and when the video card supports drm should be much faster.
|
||||||
enable = true;
|
enable = true;
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
|
{
|
||||||
|
name = "Maple Mono NF CN";
|
||||||
|
package = maple-mono.NF-CN-unhinted;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "JetBrainsMono Nerd Font";
|
name = "JetBrainsMono Nerd Font";
|
||||||
package = nerd-fonts.jetbrains-mono;
|
package = nerd-fonts.jetbrains-mono;
|
||||||
}
|
}
|
||||||
# CJK font
|
|
||||||
{
|
|
||||||
name = "WenQuanYi Micro Hei Mono";
|
|
||||||
package = wqy_microhei;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
extraOptions = "--term xterm-256color";
|
extraOptions = "--term xterm-256color";
|
||||||
extraConfig = "font-size=14";
|
extraConfig = "font-size=14";
|
||||||
|
|||||||
Reference in New Issue
Block a user