download: Allow patched and unpatched name to differ with blanks

[why]
We detect if a font has a reserved font name RFN by comparing unpatched
and patched names.

In the patched names we remove blanks from the original name, example
"BigBlue Terminal" -> "BigBlueTerminal Nerd Font"

In the fonts.json database we store "BigBlueTerminal" as `.patchedName`.
For our RFN detection we need to set the `.unpatchedName` also to
"BigBlueTerminal", which is strictly speaking not correct.

[how]
Compare `.unpatchedName` and `.patchedName` without taking the blanks into
account: Remove them before comparing.

[note]
This is needed to finally have the correct original names in the
database, which will be used for the Casks creation.

[note]
Also unify the shell commands (remove whitespaces).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-11-26 11:07:34 +01:00
parent 29d411e502
commit 76ebfee144

View file

@ -14,7 +14,9 @@ page: font-downloads
<div class="item"> <div class="item">
<a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.folderName }}.zip" class="font-preview" style="background-image: url('/assets/img/previews/{{ font.imagePreviewFont }}.svg')"> <a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.folderName }}.zip" class="font-preview" style="background-image: url('/assets/img/previews/{{ font.imagePreviewFont }}.svg')">
</a> </a>
{% if font.unpatchedName != font.patchedName %}<div><strong>&bull; Reserved Font Name:</strong> {{ font.unpatchedName }}</div>{% endif %} {% assign upN = font.unpatchedName | split: " " | join: "" %}
{% assign pN = font.patchedName | split: " " | join: "" %}
{% if upN != pN %}<div><strong>&bull; Reserved Font Name:</strong> {{ font.unpatchedName }}</div>{% endif %}
<div><strong>&bull; Info:</strong> {{ font.description }}</div> <div><strong>&bull; Info:</strong> {{ font.description }}</div>
<div class="nerd-font-buttons-wrapper"> <div class="nerd-font-buttons-wrapper">
<a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.folderName }}.zip" class="inlineblock bg-green border-white text-white nerd-font-button nf-fa-download">Download</a> <a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.folderName }}.zip" class="inlineblock bg-green border-white text-white nerd-font-button nf-fa-download">Download</a>
@ -41,8 +43,8 @@ brew install --cask font-<FONT NAME>-nerd-font
<h3 class="center"> :// curl </h3> <h3 class="center"> :// curl </h3>
<div markdown="1"> <div markdown="1">
```sh ```sh
curl -fLo "<FONT NAME> Nerd Font Complete.otf" \ curl -fLo "<FONT NAME> Nerd Font Complete.otf" \
https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/<FONT_PATH>/complete/<FONT_NAME>%20Nerd%20Font%20Complete.otf https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/<FONT_PATH>/complete/<FONT_NAME>%20Nerd%20Font%20Complete.otf
``` ```
</div> </div>
<h3 class="center"> <span></span> Bash Install Script </h3> <h3 class="center"> <span></span> Bash Install Script </h3>