diff --git a/Output/JetBrainsMonoNerdFont-Regular.ttf b/Output/JetBrainsMonoNerdFont-Regular.ttf index ccd876a..142ce9a 100644 Binary files a/Output/JetBrainsMonoNerdFont-Regular.ttf and b/Output/JetBrainsMonoNerdFont-Regular.ttf differ diff --git a/README.md b/README.md index 05e0b11..89ef715 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,6 @@ You can just download `JetBrainsMonoNerdFont-Regular.ttf` from [the latest relea winget install --id FontForge.FontForge --force # UAC prompt may occur Add-PathToCurrentProcessEnvPath -Path "C:\Program Files (x86)\FontForgeBuilds\bin" - pip install gftools fonttools[woff] - . ".\build.ps1" ``` @@ -69,7 +67,6 @@ You can just download `JetBrainsMonoNerdFont-Regular.ttf` from [the latest relea cd JetBrainsMonoNerdFonts sudo apt install fontforge - pip install gftools fonttools[woff] - + . "./build.ps1" ``` \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 72a48ee..95c55af 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,19 +1,20 @@ +pip install -r "${PSScriptRoot}/requirements.txt" -q + $guid = [guid]::NewGuid().ToString() $temp_path = "${Home}/tmp/$guid" $font_to_be_pathced = "JetBrainsMono-Regular.ttf" $font_patched = "JetBrainsMonoNerdFont-Regular.ttf" New-Item $temp_path -ItemType Directory -Force -$main_pwd = Get-Location ## Build JetBrainsMono git submodule update --init --recursive # check the submodule `JetBrainsMono` as latest release version git submodule foreach 'git reset --hard && git checkout master && git pull' # should be master instead of main -Set-Location './JetBrainsMono' +Set-Location "${PSScriptRoot}/JetBrainsMono" git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) --force -Set-Location $main_pwd -Copy-Item "./gftools_builder_config.yaml" -Destination "./JetBrainsMono/sources/config.yaml" -Force +Set-Location $PSScriptRoot +Copy-Item "$PSScriptRoot/gftools_builder_config.yaml" -Destination "$PSScriptRoot/JetBrainsMono/sources/config.yaml" -Force -gftools builder "./JetBrainsMono/sources/config.yaml" +gftools builder "$PSScriptRoot/JetBrainsMono/sources/config.yaml" ## Install FontPatcher and prepare target font that will be patched $repoUrl = "https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest" # Send a GET request to the GitHub API to get the latest release information @@ -28,12 +29,12 @@ if ($fontPatcherAsset) { } Expand-Archive -Path "$temp_path/FontPatcher.zip" -DestinationPath "$temp_path/FontPatcher" -Force -Copy-Item -LiteralPath "./JetBrainsMono/fonts/ttf/$font_to_be_pathced" -Destination "$temp_path/FontPatcher/$font_to_be_pathced" -Force +Copy-Item -LiteralPath "$PSScriptRoot/JetBrainsMono/fonts/ttf/$font_to_be_pathced" -Destination "$temp_path/FontPatcher/$font_to_be_pathced" -Force Set-Location "$temp_path/FontPatcher" fontforge -script font-patcher "./$font_to_be_pathced" -out "./" --complete --careful --quiet -Set-Location $main_pwd -Copy-Item -LiteralPath "$temp_path/FontPatcher/$font_patched" -Destination "./Output/$font_patched" -Force +Set-Location $PSScriptRoot +Copy-Item -LiteralPath "$temp_path/FontPatcher/$font_patched" -Destination "$PSScriptRoot/Output/$font_patched" -Force # reset submodule git submodule foreach 'git reset --hard && git checkout master && git pull' \ No newline at end of file