mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-02-06 12:35:00 +02:00
standardize: Use fonts.json as RFN info source
[why] When creating the readmes the config.cfg are checked for details on a possible RFN renaming. There are specific variables that need to be filled in these cases: config_rfn and config_rfn_substitue. The same RFN information is already stored in the fonts.json database. Having the information stored in two locations is always problematic and can easily lead to inconsistencies. [how] Remove information from config.cfg file and use data stored in fonts.json instead. Drop config.cfg files that are empty afterwards. Also fix some patchedName in fonts.json en passant. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
4be86d4d60
commit
850b8b422f
@ -23,7 +23,7 @@
|
||||
{
|
||||
"unpatchedName": "Anonymous Pro",
|
||||
"RFN": true,
|
||||
"patchedName": "Anonymice",
|
||||
"patchedName": "AnonymicePro",
|
||||
"folderName": "AnonymousPro",
|
||||
"imagePreviewFont": "Anonymice Nerd Font",
|
||||
"linkPreviewFont": false,
|
||||
@ -73,7 +73,7 @@
|
||||
{
|
||||
"unpatchedName": "Cascadia Code",
|
||||
"RFN": true,
|
||||
"patchedName": "Caskaydia Cove",
|
||||
"patchedName": "CaskaydiaCove",
|
||||
"folderName": "CascadiaCode",
|
||||
"imagePreviewFont": "Caskaydia Cove Nerd Font",
|
||||
"linkPreviewFont": "cascadia-code",
|
||||
@ -83,7 +83,7 @@
|
||||
{
|
||||
"unpatchedName": "IBM Plex Mono",
|
||||
"RFN": true,
|
||||
"patchedName": "Blex Mono",
|
||||
"patchedName": "BlexMono",
|
||||
"folderName": "IBMPlexMono",
|
||||
"imagePreviewFont": "BlexMono Nerd Font",
|
||||
"linkPreviewFont": false,
|
||||
@ -173,7 +173,7 @@
|
||||
{
|
||||
"unpatchedName": "Go Mono",
|
||||
"RFN": false,
|
||||
"patchedName": "Go-Mono",
|
||||
"patchedName": "GoMono",
|
||||
"folderName": "Go-Mono",
|
||||
"imagePreviewFont": "GoMono Nerd Font",
|
||||
"linkPreviewFont": "go-mono",
|
||||
@ -233,7 +233,7 @@
|
||||
{
|
||||
"unpatchedName": "iA Writer",
|
||||
"RFN": true,
|
||||
"patchedName": "iM Writing",
|
||||
"patchedName": "iMWriting",
|
||||
"folderName": "iA-Writer",
|
||||
"imagePreviewFont": "iMWritingMonoS Nerd Font",
|
||||
"linkPreviewFont": "ia-writer-mono",
|
||||
@ -311,7 +311,7 @@
|
||||
"description": "Very light and thin characters, sharp m's, `0` and `O` very similar"
|
||||
},
|
||||
{
|
||||
"unpatchedName": "Liberation",
|
||||
"unpatchedName": "Liberation Mono",
|
||||
"RFN": true,
|
||||
"patchedName": "LiterationMono",
|
||||
"folderName": "LiberationMono",
|
||||
|
@ -9,6 +9,7 @@ infofilename="font-info.md"
|
||||
unpatched_parent_dir="src/unpatched-fonts"
|
||||
patched_parent_dir="patched-fonts"
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
fonts_info="../../bin/scripts/lib/fonts.json"
|
||||
|
||||
cd ../../src/unpatched-fonts/ || {
|
||||
echo >&2 "$LINE_PREFIX Could not find source fonts directory"
|
||||
@ -68,14 +69,20 @@ do
|
||||
then
|
||||
searchdir=$dirname
|
||||
else
|
||||
# source the font config file if exists:
|
||||
# reset the variables
|
||||
unset config_rfn
|
||||
unset config_rfn_substitue
|
||||
if [ -f "$searchdir/config.cfg" ]
|
||||
fontdata=$(cat ${fonts_info} | jq ".fonts[] | select(.folderName == \"${base_directory}\")")
|
||||
if [ "$(echo $fontdata | jq .RFN)" = "true" ]
|
||||
then
|
||||
# shellcheck source=/dev/null
|
||||
source "$searchdir/config.cfg"
|
||||
config_rfn=$(echo $fontdata | jq -r .unpatchedName)
|
||||
config_rfn_substitue=$(echo $fontdata | jq -r .patchedName)
|
||||
if [ "${config_rfn}" = "${config_rfn_substitue}" ]
|
||||
then
|
||||
# Only the case with Mononoki which is RFN but we do not rename (we got the permission to keep the name)
|
||||
unset config_rfn
|
||||
unset config_rfn_substitue
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
config_rfn="Anonymous Pro"
|
||||
config_rfn_substitue="Anonymice Pro"
|
@ -1,3 +1 @@
|
||||
config_rfn="Cascadia Code"
|
||||
config_rfn_substitue="Caskaydia Cove"
|
||||
config_patch_flags="--makegroups 4"
|
||||
|
@ -1,4 +1,2 @@
|
||||
config_has_powerline=1
|
||||
config_rfn=Hasklig
|
||||
config_rfn_substitue=Hasklug
|
||||
config_patch_flags="--makegroups 2"
|
||||
|
@ -1,3 +1 @@
|
||||
config_has_powerline=1
|
||||
config_rfn=Hermit
|
||||
config_rfn_substitue=Hurmit
|
||||
|
@ -1,3 +1 @@
|
||||
#config_has_powerline=1
|
||||
config_rfn="IBM Plex"
|
||||
config_rfn_substitue=Blex
|
||||
|
@ -1,2 +0,0 @@
|
||||
config_rfn=Liberation
|
||||
config_rfn_substitue=Literation
|
@ -1,2 +0,0 @@
|
||||
config_rfn=Share
|
||||
config_rfn_substitue=Shure
|
@ -1,4 +1,2 @@
|
||||
config_has_powerline=1
|
||||
config_rfn=Source
|
||||
config_rfn_substitue=Sauce
|
||||
config_patch_flags="--makegroups 4"
|
||||
|
@ -1,2 +0,0 @@
|
||||
config_rfn=Terminus
|
||||
config_rfn_substitue=Terminess
|
@ -1,2 +0,0 @@
|
||||
config_rfn="iA Writer"
|
||||
config_rfn_substitue="iM Writing"
|
Loading…
x
Reference in New Issue
Block a user