mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-19 03:12:07 +02:00
Merge branch 'add-prefix' of https://github.com/morrme/nerd-fonts into morrme-add-prefix
This commit is contained in:
commit
6796385627
@ -9,7 +9,7 @@
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
cd ../../patched-fonts/ || {
|
||||
echo >&2 "# Could not find patched fonts directory"
|
||||
echo >&2 "$LINE_PREFIX Could not find patched fonts directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import sys
|
||||
from fontTools import ttLib
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("[fpfix.py] ERROR: Please enter a path to the font file")
|
||||
sys.stderr.write("# [Nerd Fonts] [fpfix.py] ERROR: Please enter a path to the font file")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
@ -21,9 +21,9 @@ try:
|
||||
post = tt["post"].__dict__
|
||||
post["isFixedPitch"] = 1
|
||||
tt.save(sys.argv[1])
|
||||
print("[fpfix.py]: '" + sys.argv[1] + "' fixed pitch setting was changed to 1 in the post table")
|
||||
print("# [Nerd Fonts] [fpfix.py]: '" + sys.argv[1] + "' fixed pitch setting was changed to 1 in the post table")
|
||||
except Exception as e:
|
||||
sys.stderr.write("[fpfix.py] ERROR: Unable to update the font isFixedPitch setting. " + str(e))
|
||||
sys.stderr.write("# [Nerd Fonts] [fpfix.py] ERROR: Unable to update the font isFixedPitch setting. " + str(e))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
@ -13,9 +13,10 @@ downloadarchive="https://github.com/ryanoasis/nerd-fonts/releases/download/v#{ve
|
||||
sha256sum=":no_check"
|
||||
appcast="https://github.com/ryanoasis/nerd-fonts/releases.atom"
|
||||
appcastcheckpoint=$(curl --compressed --location --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36' "https://github.com/ryanoasis/nerd-fonts/releases.atom" | sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256 | head -c 64)
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
cd $patched_parent_dir || {
|
||||
echo >&2 "# Could not find patched fonts directory"
|
||||
echo >&2 "$LINE_PREFIX Could not find patched fonts directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -66,7 +67,7 @@ function write_body {
|
||||
|
||||
done
|
||||
else
|
||||
echo "# Did not find TTF or OTF"
|
||||
echo "$LINE_PREFIX Did not find TTF or OTF"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -104,7 +105,7 @@ do
|
||||
|
||||
formattedbasename=$(echo "$basename" | tr "[:upper:]" "[:lower:]")
|
||||
|
||||
echo "# Generating cask for: $fontdir"
|
||||
echo "$LINE_PREFIX Generating cask for: $fontdir"
|
||||
|
||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
||||
|
||||
|
@ -7,6 +7,7 @@ source ./lib/i_all.sh
|
||||
output_css_file="../../css/nerd-fonts-generated.css"
|
||||
header_css_file="./css-header.txt"
|
||||
output_cheat_sheet_file="../../temp/nerd-fonts-generated-cheat-sheet.txt"
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
# clear files
|
||||
> "$output_css_file" 2> /dev/null
|
||||
@ -16,7 +17,7 @@ output_cheat_sheet_file="../../temp/nerd-fonts-generated-cheat-sheet.txt"
|
||||
$header_css_file > "$output_css_file"
|
||||
|
||||
# describe how the classes were established
|
||||
printf "\n/* The following is generated from the build script: */\n" > "$output_css_file"
|
||||
printf "\n/*$LINE_PREFIX The following is generated from the build script: */\n" > "$output_css_file"
|
||||
|
||||
echo;
|
||||
|
||||
|
@ -10,9 +10,10 @@ parent_dir="${PWD}/../../"
|
||||
unpatched_parent_dir="../../src/unpatched-fonts/"
|
||||
to="$parent_dir/10-nerd-font-symbols.conf"
|
||||
symbolfont="Symbols Nerd Font"
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
cd $unpatched_parent_dir || {
|
||||
echo >&2 "# Could not find patched fonts directory"
|
||||
echo >&2 "$LINE_PREFIX Could not find patched fonts directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -43,7 +44,7 @@ do
|
||||
then
|
||||
familyname=$(fc-query --format='%{family}' "${FONTS[0]}")
|
||||
|
||||
echo "# Generating fontconfig for: $familyname"
|
||||
echo "$LINE_PREFIX Generating fontconfig for: $familyname"
|
||||
|
||||
# add to the file
|
||||
{
|
||||
|
@ -4,9 +4,11 @@
|
||||
# used for debugging
|
||||
#set -x
|
||||
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
# Check for Fontforge
|
||||
type fontforge >/dev/null 2>&1 || {
|
||||
echo >&2 "# FontForge must be installed before running this script."
|
||||
echo >&2 "$LINE_PREFIX FontForge must be installed before running this script."
|
||||
echo >&2 "# Please see installation instructions at"
|
||||
echo >&2 "# http://designwithfontforge.com/en-US/Installing_Fontforge.html"
|
||||
exit 1
|
||||
@ -31,14 +33,14 @@ max_parallel_process=64
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
like_pattern=$1
|
||||
echo "# Parameter given, limiting search and patch to pattern '$like_pattern' given"
|
||||
echo "$LINE_PREFIX Parameter given, limiting search and patch to pattern '$like_pattern' given"
|
||||
fi
|
||||
|
||||
# simple second param option to allow to regenerate font info without re-patching
|
||||
if [ $# -eq 2 ]
|
||||
then
|
||||
info_only=$2
|
||||
echo "# 'Info Only' Parameter given, only generating font info (not patching)"
|
||||
echo "$LINE_PREFIX 'Info Only' Parameter given, only generating font info (not patching)"
|
||||
fi
|
||||
|
||||
# correct way to output find results into an array (when files have space chars, etc)
|
||||
@ -49,7 +51,7 @@ source_fonts=()
|
||||
done < <(find "$source_fonts_dir" -name "$like_pattern*.[o,t]tf" -type f -print0)
|
||||
|
||||
# print total number of source fonts found
|
||||
echo "# Total source fonts found: ${#source_fonts[*]}"
|
||||
echo "$LINE_PREFIX Total source fonts found: ${#source_fonts[*]}"
|
||||
|
||||
|
||||
function patch_font {
|
||||
@ -157,7 +159,7 @@ function generate_info {
|
||||
# if first time with this font then re-build parent dir readme, else skip:
|
||||
if [[ $config_parent_dir != "$last_parent_dir" && (! $is_unpatched_fonts_root) ]];
|
||||
then
|
||||
echo "Re-generate parent directory readme"
|
||||
echo "$LINE_PREFIX Re-generate parent directory readme"
|
||||
generate_readme "$patched_font_dir/.."
|
||||
fi
|
||||
|
||||
@ -184,7 +186,7 @@ function generate_readme {
|
||||
then
|
||||
cat "$patched_font_dir/font-info.md" >> "$combinations_filename"
|
||||
else
|
||||
echo "# Could not append font-info.md (file not found). Was standardize script run? It should be executed first"
|
||||
echo "$LINE_PREFIX Could not append font-info.md (file not found). Was standardize script run? It should be executed first"
|
||||
echo "# looked for: $font_info"
|
||||
fi
|
||||
|
||||
@ -219,7 +221,7 @@ then
|
||||
# for now set a 'wait' for each X set of processes:
|
||||
if [[ $(($i % $max_parallel_process)) == 0 ]];
|
||||
then
|
||||
echo "complete_variation_count after max parallel proc is $complete_variation_count"
|
||||
echo "$LINE_PREFIX complete_variation_count after max parallel proc is $complete_variation_count"
|
||||
wait
|
||||
fi
|
||||
done
|
||||
@ -243,7 +245,7 @@ dt3=$(echo "$dt2-3600*$dh" | bc)
|
||||
dm=$(echo "$dt3/60" | bc)
|
||||
ds=$(echo "$dt3-60*$dm" | bc)
|
||||
|
||||
printf "# Total runtime: %d:%02d:%02d:%02d\n" "$dd" "$dh" "$dm" "$ds"
|
||||
printf "$LINE_PREFIX Total runtime: %d:%02d:%02d:%02d\n" "$dd" "$dh" "$dm" "$ds"
|
||||
|
||||
printf "# All fonts patched to sub-directories in \t\t\t'%s'\n" "$patched_parent_dir"
|
||||
printf "# The total number of font typefaces patched was \t\t'%s'\n" "$font_typefaces_count"
|
||||
|
@ -3,9 +3,11 @@
|
||||
# calls the necessary scripts in the necessary order to prepare for a release
|
||||
|
||||
#set -x
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
if [ ! $# -eq 1 ]
|
||||
then
|
||||
echo "# No release version given, must give semver release versionin format: #.#.#, e.g. 1.1.0"
|
||||
echo "$LINE_PREFIX No release version given, must give semver release versionin format: #.#.#, e.g. 1.1.0"
|
||||
fi
|
||||
|
||||
release=$1
|
||||
|
@ -7,9 +7,10 @@
|
||||
infofilename="font-info.md"
|
||||
unpatched_parent_dir="src/unpatched-fonts"
|
||||
patched_parent_dir="patched-fonts"
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
cd ../../src/unpatched-fonts/ || {
|
||||
echo >&2 "# Could not find source fonts directory"
|
||||
echo >&2 "$LINE_PREFIX Could not find source fonts directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -36,7 +37,7 @@ do
|
||||
MD=( $(find "$searchdir" -type f -iname 'readme.md') )
|
||||
outputdir=$PWD/../../patched-fonts/$filename/
|
||||
|
||||
echo "# Generating readme for: $filename"
|
||||
echo "$LINE_PREFIX Generating readme for: $filename"
|
||||
|
||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
||||
|
||||
@ -45,7 +46,7 @@ do
|
||||
then
|
||||
for i in "${RST[@]}"
|
||||
do
|
||||
echo "## Found RST"
|
||||
echo "#$LINE_PREFIX Found RST"
|
||||
|
||||
from="$PWD/$i"
|
||||
to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename"
|
||||
@ -63,7 +64,7 @@ do
|
||||
then
|
||||
for i in "${TXT[@]}"
|
||||
do
|
||||
echo "## Found TXT"
|
||||
echo "#$LINE_PREFIX Found TXT"
|
||||
|
||||
from="$PWD/$i"
|
||||
to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename"
|
||||
@ -81,7 +82,7 @@ do
|
||||
then
|
||||
for i in "${MD[@]}"
|
||||
do
|
||||
echo "## Found MD"
|
||||
echo "#$LINE_PREFIX Found MD"
|
||||
|
||||
from="$PWD/$i"
|
||||
to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename"
|
||||
@ -96,7 +97,7 @@ do
|
||||
cat "$PWD/../../src/readme-per-directory-addendum.md" >> "$to"
|
||||
done
|
||||
else
|
||||
echo "# Did not find RST nor TXT"
|
||||
echo "$LINE_PREFIX Did not find RST nor TXT"
|
||||
fi
|
||||
|
||||
done
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
# uncomment to debug:
|
||||
#set -x
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
cd ../../archives/ || {
|
||||
echo >&2 "# Could not find archives directory"
|
||||
echo >&2 "$LINE_PREFIX Could not find archives directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -17,11 +18,10 @@ if [ -f "$private_config" ]
|
||||
then
|
||||
source "$private_config"
|
||||
else
|
||||
echo >&2 "# Could not source private config"
|
||||
echo >&2 "$LINE_PREFIX Could not source private config"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
TOKEN=$github_access_token
|
||||
OWNER="ryanoasis"
|
||||
REPO="nerd-fonts"
|
||||
|
@ -6,9 +6,11 @@
|
||||
# todo take some ideas from: https://github.com/fsaintjacques/semver-tool
|
||||
|
||||
#set -x
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
|
||||
if [ ! $# -eq 1 ]
|
||||
then
|
||||
echo "# No release version given, must give semver release versionin format: #.#.#, e.g. 1.1.0"
|
||||
echo "$LINE_PREFIX No release version given, must give semver release versionin format: #.#.#, e.g. 1.1.0"
|
||||
fi
|
||||
|
||||
release=$1
|
||||
|
Loading…
x
Reference in New Issue
Block a user