1 # Copyright 2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit font check-reqs
8 DESCRIPTION="Nerd Fonts is a project that patches developer targeted fonts with glyphs"
9 HOMEPAGE="https://github.com/ryanoasis/nerd-fonts"
10 COMMON_URI="https://github.com/ryanoasis/${PN}/releases/download/v${PV}"
66 3270? ( "${COMMON_URI}/3270.zip" )
67 agave? ( "${COMMON_URI}/Agave.zip" )
68 anonymouspro? ( "${COMMON_URI}/AnonymousPro.zip" )
69 arimo? ( "${COMMON_URI}/Arimo.zip" )
70 aurulentsansmono? ( "${COMMON_URI}/AurulentSansMono.zip" )
71 bigblueterminal? ( "${COMMON_URI}/BigBlueTerminal.zip" )
72 bitstreamverasansmono? ( "${COMMON_URI}/BitstreamVeraSansMono.zip" )
73 cascadiacode? ( "${COMMON_URI}/CascadiaCode.zip" )
74 codenewroman? ( "${COMMON_URI}/CodeNewRoman.zip" )
75 cousine? ( "${COMMON_URI}/Cousine.zip" )
76 daddytimemono? ( "${COMMON_URI}/DaddyTimeMono.zip" )
77 dejavusansmono? ( "${COMMON_URI}/DejaVuSansMono.zip" )
78 droidsansmono? ( "${COMMON_URI}/DroidSansMono.zip" )
79 fantasquesansmono? ( "${COMMON_URI}/FantasqueSansMono.zip" )
80 firacode? ( "${COMMON_URI}/FiraCode.zip" )
81 firamono? ( "${COMMON_URI}/FiraMono.zip" )
82 go-mono? ( "${COMMON_URI}/Go-Mono.zip" )
83 gohu? ( "${COMMON_URI}/Gohu.zip" )
84 hack? ( "${COMMON_URI}/Hack.zip" )
85 hasklig? ( "${COMMON_URI}/Hasklig.zip" )
86 heavydata? ( "${COMMON_URI}/HeavyData.zip" )
87 hermit? ( "${COMMON_URI}/Hermit.zip" )
88 ia-writer? ( "${COMMON_URI}/iA-Writer.zip" )
89 ibmplexmono? ( "${COMMON_URI}/IBMPlexMono.zip" )
90 inconsolata? ( "${COMMON_URI}/Inconsolata.zip" )
91 inconsolatago? ( "${COMMON_URI}/InconsolataGo.zip" )
92 inconsolatalgc? ( "${COMMON_URI}/InconsolataLGC.zip" )
93 iosevka? ( "${COMMON_URI}/Iosevka.zip" )
94 jetbrainsmono? ( "${COMMON_URI}/JetBrainsMono.zip" )
95 lekton? ( "${COMMON_URI}/Lekton.zip" )
96 liberationmono? ( "${COMMON_URI}/LiberationMono.zip" )
97 meslo? ( "${COMMON_URI}/Meslo.zip" )
98 monofur? ( "${COMMON_URI}/Monofur.zip" )
99 monoid? ( "${COMMON_URI}/Monoid.zip" )
100 mononoki? ( "${COMMON_URI}/Mononoki.zip" )
101 mplus? ( "${COMMON_URI}/MPlus.zip" )
102 noto? ( "${COMMON_URI}/Noto.zip" )
103 opendyslexic? ( "${COMMON_URI}/OpenDyslexic.zip" )
104 overpass? ( "${COMMON_URI}/Overpass.zip" )
105 profont? ( "${COMMON_URI}/ProFont.zip" )
106 proggyclean? ( "${COMMON_URI}/ProggyClean.zip" )
107 robotomono? ( "${COMMON_URI}/RobotoMono.zip" )
108 sharetechmono? ( "${COMMON_URI}/ShareTechMono.zip" )
109 sourcecodepro? ( "${COMMON_URI}/SourceCodePro.zip" )
110 spacemono? ( "${COMMON_URI}/SpaceMono.zip" )
111 terminus? ( "${COMMON_URI}/Terminus.zip" )
112 tinos? ( "${COMMON_URI}/Tinos.zip" )
113 ubuntu? ( "${COMMON_URI}/Ubuntu.zip" )
114 ubuntumono? ( "${COMMON_URI}/UbuntuMono.zip" )
115 victormono? ( "${COMMON_URI}/VictorMono.zip" )
126 UbuntuFontLicense-1.0"
128 KEYWORDS="amd64 ~x86"
130 DEPEND="app-arch/unzip"
131 RDEPEND="media-libs/fontconfig"
133 CHECKREQS_DISK_BUILD="3G"
134 CHECKREQS_DISK_USR="4G"
136 IUSE_FLAGS=(${FONTS[*],,})
137 IUSE="${IUSE_FLAGS[*]}"
138 REQUIRED_USE="X || ( ${IUSE_FLAGS[*]} )"
142 "${FILESDIR}"/10-nerd-font-symbols.conf
151 declare -A font_filetypes
152 local otf_file_number ttf_file_number
154 otf_file_number=$(ls ${S} | grep -i otf | wc -l)
155 ttf_file_number=$(ls ${S} | grep -i ttf | wc -l)
157 if [[ ${otf_file_number} != 0 ]]; then
161 if [[ ${ttf_file_number} != 0 ]]; then
165 FONT_SUFFIX="${!font_filetypes[@]}"
171 einfo "Installing font-patcher via an ebuild is hard, because paths are hardcoded differently"
172 einfo "in .sh files. You can still get it and use it by git cloning the nerd-font project and"
173 einfo "running it from the cloned directory."
174 einfo "https://github.com/ryanoasis/nerd-fonts"
176 elog "You might have to enable 50-user.conf and 10-nerd-font-symbols.conf by using"
177 elog "eselect fontconfig"