fonts
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
[!TIP|label:references:]
format:
ttf
:TrueType Font
otf
:OpenType Font
woff
:Web Open Font Format
|
| | |
| |
|
[!TIP|label:references:]
# osx
$ brew install fontforge
# ubuntu
$ sudo apt install python3-fontforge
# install font-patcher v3.2.1.1
$ [[ -d /opt/FontPatcher ]] || mkdir -p /opt/FontPatcher
$ curl -o /opt/FontPatcher/FontPatcher.zip \
-fsSL https://github.com/marslo/fonts/raw/fonts/FontPatcher.v3.2.1.1.zip
$ unzip -o /opt/FontPatcher/FontPatcher.zip /opt/FontPatcher
# setup completion
## osx
$ cp /opt/FontPatcher/completion/font-patcher.sh $(brew --prefix)/etc/bash_completion.d/
## centos/rhel/ubuntu/wsl
$ cp /opt/FontPatcher/completion/font-patcher.sh /usr/share/bash-completion/completions/
## centos/rhel
$ cp /opt/FontPatcher/completion/font-patcher.sh /etc/bash_completion.d/
# setup environment
$ cat >> ~/.bashrc << EOF
FONT_PATCHER='/opt/FontPatcher'
test -d "${FONT_PATCHER}" && PATH+=":${FONT_PATCHER}"
export $PATH
EOF
mono
$ font-patcher RecMonoSemicasual-Regular-1.085.ttf --mono --complete --quiet -ext ttf -out .
# or patch for folders
$ while read -r _f; do
for _e in otf ttf; do
outpath="$(dirname $(dirname $_f))_NF/$(basename $(dirname $_f))/${_e}";
[[ -d "${outpath}" ]] || mkdir -p "${outpath}";
echo ".. ${_e} » $(basename ${_f}) » ${outpath}";
/opt/FontPatcher/font-patcher $(realpath "${_f}") --mono --complete --quiet -ext ${_e} -out "${outpath}";
done;
done < <(fd -u -tf -e ttf -e otf --full-path /path/to/folder)
san
with name
$ font-patcher --complete --progressbars --outputdir . --name 'Recursive Mono Casual Static Italic Nerd Font' /path/to/font.ttf 2>/dev/null
# using name dynamically
$ font='/path/to/font.ttf'
$ fontfamily="$(fc-query -f '%{family}' "$(realpath "${font}")" | awk -F, '{print $1}')";
$ style="$(fc-query -f '%{style}' "$(realpath "${font}")" | awk -F, '{print $1}')";
$ name="${fontfamily} ${style} Nerd Font";
$ font-patcher --complete --quiet --outputdir . --name "${name}" "${font}" 2>/dev/null
[!NOTE|label:references:]
list installed fonts
$ fc-list | sed -re 's/^.+\/([^:]+):\s?([^,:]+),?:?.*$/\1 : \2/g' | column -t -s: -o: | sort -t: -k2
# or
$ fc-list | awk '{$1=""}1' | sed -re 's/^\s*([^:,]+:?,?[^,:]+).*$/\1/' | column -t -s:
i.e.:
$ fc-list | sed -re 's/^.+\/([^:]+):\s?([^,:]+),?:?.*$/\1 : \2/g' | column -t -s: -o: | sort -t: -k2 | grep operator
OperatorProNerdFont-Italic.ttf : Operator Pro Nerd Font
OperatorProNerdFont-Regular.ttf : Operator Pro Nerd Font
OperatorMonoNerdFontMono-Light.ttf : OperatorMono Nerd Font Mono
OperatorMonoNerdFontMono-LightItalic.ttf : OperatorMono Nerd Font Mono
OperatorMonoLigNerdFontMono-Light.otf : OperatorMonoLig Nerd Font Mono
OperatorMonoLigNerdFontMono-LightItalic.otf : OperatorMonoLig Nerd Font Mono
OperatorProNerdFont-Light.ttf : OperatorPro Nerd Font
OperatorProNerdFont-LightItalic.ttf : OperatorPro Nerd Font
list fonts properties
$ fc-query /path/to/font.ttf
i.e.:
i.e.:
[!NOTE|label:references:]
fc-scan format - fcpatternformat
$ fc-scan --format "%-40{family}%{style}\n" Meslo-LG-M-Regular-for-Powerline.ttf Meslo LG M for Powerline Regular
fullname & fullnamelang
$ fc-scan --format "%{fullname}\n%{fullnamelang}" chinese.msyh.ttf
Microsoft YaHei,微软雅黑
en,zh-cn
$ fc-scan --format "%{fullname[0]}\n%{fullname[1]}" chinese.msyh.ttf
Microsoft YaHei
微软雅黑
get index of lang
$ lang="en"
$ sed -E "s/^(.*)${lang}.*/\1/;s/[^,]//g" <<< "$(fc-scan --format "%{fullnamelang}\n" chinese.msyh.ttf)" | wc -c
1
$ lang="zh-cn"
$ sed -E "s/^(.*)${lang}.*/\1/;s/[^,]//g" <<< "$(fc-scan --format "%{fullnamelang}\n" chinese.msyh.ttf)" | wc -c
2
show font by lang
$ lang="zh-cn"
$ font="chinese.msyh.ttf"
$ fc-scan --format "%{fullname[$(( $(sed -E "s/^(.*)${lang}.*/\1/;s/[^,]//g" <<<"$(fc-scan --format "%{fullnamelang}\n" "${font}")" | wc -c) -1 ))]}\n" "${font}"
微软雅黑
$ lang='en'
$ fc-scan --format "%{fullname[$(( $(sed -E "s/^(.*)${lang}.*/\1/;s/[^,]//g" <<<"$(fc-scan --format "%{fullnamelang}\n" "${font}")" | wc -c) -1 ))]}\n" "${font}"
Microsoft YaHei
platformID
1
: Unicode
2
: Macintosh
3
: Windows
platEncID
0
: Unicode
1
: Roman
2
: ShiftJIS
3
: PRC
4
: Big5
5
: Wansung
6
: Johab
langID
0x0
: Unicode
0x409
: English (US)
0x804
: Chinese (PRC)
0x804
: Chinese (Taiwan)
0x411
: Japanese
0x412
: Korean
0x804
: Chinese (Hong Kong)
0xC04
: Chinese (Singapore)
unicode
True
: Unicode
False
: non-Unicode
nameID
5
: Version
6
: PostScript name
7
: Trademark
8
: Manufacturer
9
: Designer
10
: Description
11
: URL Vendor
12
: URL Designer
13
: License
14
: License URL
# -- install --
$ pip install fonttools
$ brew install fonttools
# -- check --
$ ttx -o - -t name LXGWWenKaiMono-Regular.ttf | sed -n '/<namerecord nameID="5"/,/<\/namerecord>/p'
Dumping "LXGWWenKaiMono-Regular.ttf" to "<stdout>"...
Dumping 'name' table...
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Version 1.520; June 14, 2025
</namerecord>
$ ttx -o - -t name LXGWWenKaiMonoNerdFontMono-Regular.otf | sed -n '/<namerecord nameID="5"/,/<\/namerecord>/p'
Dumping "LXGWWenKaiMonoNerdFontMono-Regular.otf" to "<stdout>"...
Dumping 'name' table...
<namerecord nameID="5" platformID="1" platEncID="0" langID="0x0" unicode="True">
Version 1.520; June 14, 2025;Nerd Fonts 3.4.0.1
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Version 1.520; June 14, 2025;Nerd Fonts 3.4.0.1
</namerecord>
postscriptname
show font fullname
$ fd --glob *.ttf -tf --color=never /path/to/font |
while read -r _f; do
echo -n ">> $(basename "${_f}") : "; fc-scan --format "%{fullname}\n" "${_f}";
done
$ while read -r _f; do
echo ">> $_f <<";
name="$(fc-scan --format "%{postscriptname}" "$_f").ttf";
mv "${_f}" "${name}";
done < <(ls -1 --color=never)
# or
$ fd --glob *.ttf -tf --color=never /path/to/font |
while read -r _f; do
mv "${_f}" "$(fc-scan --format "%{postscriptname}" "$_f").ttf";
done
[!NOTE|label:references:]
windows
Add-Type -AssemblyName PresentationCore;
$font = New-Object -TypeName Windows.Media.GlyphTypeface -ArgumentList 'xxxx.ttf';
$font.VersionStrings.Values
# --- or ---
# Requires AutoHotkey v2.0
fontPath := A_WinDir . '\Fonts\Arial.ttf'
command := "Add-Type -AssemblyName PresentationCore;"
. "$font = New-Object -TypeName Windows.Media.GlyphTypeface -ArgumentList '" . fontPath . "';"
. "$font.VersionStrings.Values"
MsgBox CmdRet('powershell -Command "' . command . '"')
CmdRet(sCmd, callBackFunc := '', encoding := '') {
static flags := [HANDLE_FLAG_INHERIT := 0x1, CREATE_NO_WINDOW := 0x8000000], STARTF_USESTDHANDLES := 0x100
(encoding = '' && encoding := 'cp' . DllCall('GetOEMCP', 'UInt'))
DllCall('CreatePipe', 'PtrP', &hPipeRead := 0, 'PtrP', &hPipeWrite := 0, 'Ptr', 0, 'UInt', 0)
DllCall('SetHandleInformation', 'Ptr', hPipeWrite, 'UInt', flags[1], 'UInt', flags[1])
STARTUPINFO := Buffer(size := A_PtrSize*9 + 4*8, 0)
NumPut('UInt', size, STARTUPINFO)
NumPut('UInt', STARTF_USESTDHANDLES, STARTUPINFO, A_PtrSize*4 + 4*7)
NumPut('Ptr', hPipeWrite, 'Ptr', hPipeWrite, STARTUPINFO, size - A_PtrSize*2)
PROCESS_INFORMATION := Buffer(A_PtrSize*2 + 4*2, 0)
if !DllCall('CreateProcess', 'Ptr', 0, 'Str', sCmd, 'Ptr', 0, 'Ptr', 0, 'UInt', true, 'UInt', flags[2]
, 'Ptr', 0, 'Ptr', 0, 'Ptr', STARTUPINFO, 'Ptr', PROCESS_INFORMATION)
{
DllCall('CloseHandle', 'Ptr', hPipeRead)
DllCall('CloseHandle', 'Ptr', hPipeWrite)
throw OSError('CreateProcess is failed')
}
DllCall('CloseHandle', 'Ptr', hPipeWrite)
temp := Buffer(4096, 0), output := ''
while DllCall('ReadFile', 'Ptr', hPipeRead, 'Ptr', temp, 'UInt', 4096, 'UIntP', &size := 0, 'UInt', 0) {
output .= stdOut := StrGet(temp, size, encoding)
( callBackFunc && callBackFunc(stdOut) )
}
DllCall('CloseHandle', 'Ptr', NumGet(PROCESS_INFORMATION, 'Ptr'))
DllCall('CloseHandle', 'Ptr', NumGet(PROCESS_INFORMATION, A_PtrSize, 'Ptr'))
DllCall('CloseHandle', 'Ptr', hPipeRead)
return output
}
[!TIP|label:references:]
style
Gothic
UI
Mono
Term
Fixed
serif
slab serif
old style
transitional serif
字体衬线
orthography
CL
- Classic
SC
- Simplified Chinese
TC
- TW
HC
- Hong Kong
J
- Japan
汉字字形
weight
Light
Regular
Medium
Bold
Black
[!TIP|label:references:]
|
[!NOTE|label:references:]
|
|
| |
[!TIP]
fontsPath
:
osx:
~/Library/Fonts
or/System/Fonts
Linux:
~/.fonts
or~/.local/share/fonts
or/usr/share/fonts
[!NOTE] THE BEST ALWAYS !
Powerline
[!TIP|label:tips:]
iMarslo Recursive support both
otf
andttf
format
# RecMonoCasual
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoCasual/RecMonoCasualNerdFontMono-Regular.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoCasual/RecMonoCasualNerdFontMono-Italic.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoCasual/RecMonoCasualNerdFontMono-Bold.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoCasual/RecMonoCasualNerdFontMono-BoldItalic.otf
# RecMonoLinear
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoLinear/RecMonoLinearNerdFontMono-Regular.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoLinear/RecMonoLinearNerdFontMono-Italic.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoLinear/RecMonoLinearNerdFontMono-Bold.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoLinear/RecMonoLinearNerdFontMono-BoldItalic.otf
# RecMonoSemicasual
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoSemicasual/RecMonoSmCasualNerdFontMono-Regular.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoSemicasual/RecMonoSmCasualNerdFontMono-Italic.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoSemicasual/RecMonoSmCasualNerdFontMono-Bold.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoSemicasual/RecMonoSmCasualNerdFontMono-BoldItalic.otf
# RecMonoDuotone
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoDuotone/RecMonoDuotoneNerdFontMono-Regular.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoDuotone/RecMonoDuotoneNerdFontMono-Italic.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoDuotone/RecMonoDuotoneNerdFontMono-Bold.otf \
https://github.com/marslo/fonts/raw/fonts/Recursive/Recursive_Code_NF/RecMonoDuotone/RecMonoDuotoneNerdFontMono-BoldItalic.otf
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/arrowtype/recursive/raw/main/fonts/ArrowType-Recursive-1.085/Recursive_Code/RecMonoCasual/RecMonoCasual-Regular-1.085.ttf \
https://github.com/arrowtype/recursive/raw/main/fonts/ArrowType-Recursive-1.085/Recursive_Code/RecMonoDuotone/RecMonoDuotone-Regular-1.085.ttf \
https://github.com/arrowtype/recursive/raw/main/fonts/ArrowType-Recursive-1.085/Recursive_Code/RecMonoLinear/RecMonoLinear-Regular-1.085.ttf \
https://github.com/arrowtype/recursive/raw/main/fonts/ArrowType-Recursive-1.085/Recursive_Code/RecMonoSemicasual/RecMonoSemicasual-Regular-1.085.ttf &&
fc-cache -f -v
# or
$ version=1.085
$ url='https://github.com/arrowtype/recursive/raw/main/fonts/ArrowType-Recursive-1.085/Recursive_Code/'
$ while read -r _t; do
curl --create-dirs -O --output-dir "${fontsPath}" \
"${url}"/"RecMono${_t}/RecMono${_t}-Regular-1.085.ttf"
done < <( echo 'Casual Duotone Linear Semicasual' | fmt -1 )
$ fc-cache -f -v
[!NOTE|label:references:]
[!NOTE|label:references:]
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Agave/AgaveNerdFontMono-Regular.ttf
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Agave/AgaveNerdFontMono-Bold.ttf
[!NOTE|label:referencess:]
|
|
ligatures:
patched via Nerd Fonts Patcher v3.2.1.1 (4.13.1) (ff 20230101)
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Operator/OperatorMono/OperatorMono-Light.otf \
https://github.com/marslo/fonts/raw/fonts/Operator/OperatorMono/OperatorMono-LightItalic.otf
# Mono NF otf
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/40huo/Patched-Fonts/raw/master/operator-mono-nerd-font/Operator%20Mono%20Light%20Italic%20Nerd%20Font%20Complete.otf \
https://github.com/40huo/Patched-Fonts/raw/master/operator-mono-nerd-font/Operator%20Mono%20Light%20Italic%20Nerd%20Font%20Complete.otf
# Mono NF ttf
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/xiyaowong/Operator-Fonts/raw/master/Operator%20Mono%20Nerd%20Font/Operator%20Mono%20Light%20Italic%20Nerd%20Font%20Complete.ttf \
https://github.com/xiyaowong/Operator-Fonts/raw/master/Operator%20Mono%20Nerd%20Font/Operator%20Mono%20Light%20Italic%20Nerd%20Font%20Complete.ttf
# Pro NF
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/xiyaowong/Operator-Fonts/raw/master/Operator%20Pro%20Nerd%20Font/Operator%20Pro%20Light%20Italic%20Nerd%20Font%20Complete.ttf \
https://github.com/xiyaowong/Operator-Fonts/raw/master/Operator%20Pro%20Nerd%20Font/Operator%20Pro%20Light%20Nerd%20Font%20Complete.ttf
$ showfonts | grep -e ': Operator.*Nerd Font'
Operator Mono Light Nerd Font Complete.otf : OperatorMono Nerd Font
Operator Pro Light Italic Nerd Font Complete.ttf : OperatorPro Nerd Font
Operator Pro Light Nerd Font Complete.ttf : OperatorPro Nerd Font
Operator Mono Light Italic Nerd Font Complete.otf : OperatorMono Nerd Font
ligatures
$ ext='otf' # or ext='ttf'
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/marslo/fonts/raw/fonts/Operator/OperatorMonoLigNF/OperatorMonoLigNerdFontMono-Light."${ext}" \
https://github.com/marslo/fonts/raw/fonts/Operator/OperatorMonoLigNF/OperatorMonoLigNerdFontMono-LightItalic."${ext}"
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/beichensky/Font/raw/master/Operator%20Mono%20Lig/OperatorMonoLig-Light.otf \
https://github.com/beichensky/Font/raw/master/Operator%20Mono%20Lig/OperatorMonoLig-LightItalic.otf
$ showfonts | grep -e ': operator.*lig'
OperatorMonoLig-LightItalic.otf : Operator Mono Lig
OperatorMonoLig-Light.otf : Operator Mono Lig
vim configure
Plug 'morhetz/gruvbox' " ╮
Plug 'sainnhe/gruvbox-material' " ├ theme
Plug 'luisiacc/gruvbox-baby', { 'branch': 'main' } " ╯
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
set go= " hide everything (go = guioptions)
set cpoptions+=n
set guifont=OperatorMono\ Nerd\ Font\ Mono:h29 " ╭ nerd font ╮ keep only one
set guifont=OperatorMonoLig\ Nerd\ Font\ Mono:h29 " ╰ ligatures ╯
set renderoptions=type:directx,renmode:5
if has( 'gui_running' ) || 'xterm-256color' == $TERM
set background=dark
colorscheme gruvbox-material " sainnhe/gruvbox-material
endif
$ curl --create-dirs -O --output-dir "${fontsPath}" \
-fsSL --remote-name-all \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Gohu/uni-14/GohuFontuni14NerdFontMono-Regular.ttf \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Gohu/uni-11/GohuFontuni11NerdFontMono-Regular.ttf \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Gohu/14/GohuFont14NerdFontMono-Regular.ttf \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Gohu/11/GohuFont11NerdFontMono-Regular.ttf &&
fc-cache -f -v
[!NOTE|label:references:]
[!NOTE|label:refereces:]
Nerd Font Mono
(a strictly monospaced variant, created with--mono
)
Nerd Font
(a somehow monospaced variant, maybe)
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Agave/AgaveNerdFontMono-Regular.ttf &&
fc-cache -f -v
CodeNewRoman another Monaco
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/CodeNewRoman/Regular/CodeNewRomanNerdFontMono-Regular.otf &&
fc-cache -f -v
DejaVuSansMono another Monaco
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DejaVuSansMono/Regular/DejaVuSansMNerdFontMono-Regular.ttf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/BigBlueTerminal/BigBlueTerm437NerdFontMono-Regular.ttf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Monofur/Regular/MonofurNerdFontMono-Regular.ttf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/ComicShannsMono/ComicShannsMonoNerdFontMono-Regular.otf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DaddyTimeMono/DaddyTimeMonoNerdFontMono-Regular.ttf &&
fc-cache -f -v
- [Hermit](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Hermit)
```bash
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hermit/Regular/HurmitNerdFontMono-Regular.otf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/NerdFontsSymbolsOnly/SymbolsNerdFontMono-Regular.ttf &&
fc-cache -f -v
JetBrains |
|
| |
[!NOTE|label:references:]
~
windows
install via package tool
# debian
$ sudo apt-get install fonts-powerline
# centos/rhel
$ sudo dnf install powerline-fonts
install via cmd
[!TIP|label:fonts path in different system:]
linux:
$HOME/.local/share/fonts
osx :
$HOME/Library/Fonts
via powershell
&&
&&
[!NOTE|label:references:]
[!NOTE|label:references:]
[!NOTE|label:references:]
[!TIP|label:references:]
CloudFonts:
osx:
~/Library/Group Containers/UBF8T346G9.Office/FontCache/4/CloudFonts
windows:
%LOCALAPPDATA%\Microsoft\FontCache\4\CloudFonts
Default Fonts:
osx:
outlook:
/Applications/Microsoft Outlook.app/Contents/Resources/DFonts
OfficeFonts:
osx:
~/Library/Fonts
windows:
%LOCALAPPDATA%\Microsoft\Windows\Fonts
Nerd Font Propo
(a not monospaced variant, created with --variable-width-glyphs
)$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/powerline/fonts/raw/master/Monofur/Monofur%20for%20Powerline.ttf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/powerline/fonts/raw/master/Monofur/Monofur%20Italic%20for%20Powerline.ttf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/powerline/fonts/raw/master/Monofur/Monofur%20Bold%20for%20Powerline.ttf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/Twixes/SF-Mono-Powerline/raw/master/SF-Mono-Powerline-Regular.otf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/Twixes/SF-Mono-Powerline/raw/master/SF-Mono-Powerline-RegularItalic.otf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/Twixes/SF-Mono-Powerline/raw/master/SF-Mono-Powerline-Bold.otf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/Twixes/SF-Mono-Powerline/raw/master/SF-Mono-Powerline-BoldItalic.otf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/benbusby/anomaly-mono/raw/master/AnomalyMono-Powerline.otf &&
fc-cache -f -v
/Applications/Microsoft Word.app/Contents/Resources/DFonts
$ fc-query Operator/OperatorMonoLigNF/OperatorMonoLigNerdFontMono-Light.ttf | grep -E 'family|style|fullname|weight|slant|spacing|file'
family: "OperatorMonoLig Nerd Font Mono"(s) "OperatorMonoLig Nerd Font Mono Light"(s)
familylang: "en"(s) "en"(s)
style: "Light"(s) "Regular"(s)
stylelang: "en"(s) "en"(s)
fullname: "OperatorMonoLig Nerd Font Mono Light"(s)
fullnamelang: "en"(s)
slant: 0(i)(s)
weight: 50(f)(s)
spacing: 100(i)(s)
file: "Operator/OperatorMonoLigNF/OperatorMonoLigNerdFontMono-Light.ttf"(s)
$ fc-query -f '%{family}\n' /path/to/font.ttf
$ fc-query -f '%{family}\n%{style}\n%{fullname}' Recursive/Recursive_Desktop/RecursiveSansCslSt-LtItalic.ttf
Recursive Sans Casual Static,Recursive Sn Csl St Lt
Light Italic,Italic
Recursive Sn Csl St Lt Italic
$ fc-query -f '%{family}\n%{style}\n%{fullname}' Recursive/Recursive_Desktop/RecursiveSansCslSt-LtItalic.ttf | awk -F, '{print $1}'
Recursive Sans Casual Static
Light Italic
Recursive Sn Csl St Lt Italic
字体粗细
suffix
ttf
- TrueType Font
otf
- OpenType Font
woff
- Web Open Font Format
后缀
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/FantasqueSansMono/Regular/FantasqueSansMNerdFontMono-Regular.ttf &&
fc-cache -f -v
$ fontPath=$HOME/Library/Fonts
$ fontPath=$HOME/.local/share/fonts
> Invoke-WebRequest -Uri "https://dtinth.github.io/comic-mono-font/ComicMono.ttf" -OutFile "ComicMono.ttf"; Invoke-WebRequest -Uri "https://dtinth.github.io/comic-mono-font/ComicMono-Bold.ttf" -OutFile "ComicMono-Bold.ttf"; $fonts = (New-Object -ComObject Shell.Application).Namespace(0x14); Get-ChildItem -include ComicMono* | % { $fonts.CopyHere($_.fullname) }
# regular
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://dtinth.github.io/comic-mono-font/ComicMono.ttf &&
curl --create-dirs -O --output-dir "${fontsPath}" \
https://dtinth.github.io/comic-mono-font/ComicMono-Bold.ttf &&
fc-cache -f -v
# for powerline/vim-airline
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/marslo/mytools/raw/master/others/fonts/monospace/Comic-Mono-for-Powerline.ttf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/marslo/mytools/raw/master/others/fonts/monospace/Monaco-for-Powerline.otf &&
fc-cache -f -v
$ curl --create-dirs -O --output-dir "${fontsPath}" \
https://github.com/marslo/mytools/raw/master/others/fonts/monospace/Menlo-Regular.ttf &&
fc-cache -f -v