[why]
Sometimes the shortest Family is not a meaningful name, for example
iMWritingDuo
iMWritingDuospace
iMWritingMono
iMWritingQuattro
Obviously the shortest name is not adequate.
[how]
Instead we find the shortest word stem of the name. The common beginning
of all names. In the example above that is `iMWriting`.
If we have such a case we show in the name that there are multiple
families in the cask, by adding "families" to the name.
[note]
Also always capitalize the font name. Some fonts have a
all-small-letters name, but that seems a bit out of place and has been
changed with the manual naming (previously) already to Capitalized Name.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some fonts have different and not consistent Family names set,
especially (only) if the `--makegroups` option has not been used for
patching.
Example:
$ fc-query --format='%{family}\n' patched-fonts/Hasklig/Black/complete/Hasklug\ Black\ Nerd\ Font\ Complete.otf
Hasklug Nerd Font,Hasklig Black
See also previous commit's message, bottom.
[how]
We want to use only one of the Family names (fc-query reports all as
csv, unless we specify an index), so query one by one.
Check that it is 'our' name (that contains "Nerd") and not a leftover
from uncomplete patching.
[note]
Also whitespace change: One tab to spaces.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The code takes the FamilyName out of the first patched font file and
puts that into the cask name field.
This has two problems:
After we joined Mono and non-Mono fonts into one cask the first font
might be a "Nerd Font Complete Mono" and we certainly do not want that
FamilyName in a cask that also contains the non-Mono variants.
We have some fonts with more than one Family, for example
CaskaydiaCove Nerd Font SemiLight
CaskaydiaCove Nerd Font Light
CaskaydiaCove Nerd Font
CaskaydiaCove Nerd Font ExtraLight
Taking the first encountered Family name is most certainly not want we
want.
[how]
Examine all patched fonts and collect their FamilyName and use the
shortest of them, as that usually is the base stem.
This still fails for somem fonts, like Hasklug
Hasklig Black
Hasklig ExtraLight
Hasklig Light
Hasklig Medium
Hasklig Semibold
Hasklug Nerd Font
But that font's FamilyName is broken anyhow, note that the RFN renaming
does not really work consistently. It would be fixed by using
`font-patcher` with option `--makegroups`, which should become the
default soon.
This will be tackled by the next commit.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We want to replace the existing casks. But they do not have a consistent
way to name the casks. Sometimes blanks are preserved (as dashes):
"unpatchedName": "DejaVu Sans Mono",
"patchedName": "DejaVuSansMono",
"caskName": "dejavu-sans-mono",
The above looks like cask-name == unpatched-name.
Here they introduce blanks out of thin air (the original name does not
have blanks):
"unpatchedName": "DaddyTimeMono",
"patchedName": "DaddyTimeMono",
"caskName": "daddy-time-mono",
Here they add something to the name??!:
"unpatchedName": "Gohu",
"patchedName": "Gohu",
"caskName": "gohufont",
Here the cask-name follows the RFN renaming:
"unpatchedName": "Hasklig",
"patchedName": "Hasklug",
"caskName": "hasklug",
Here they do not follow the RFN renaming:
"unpatchedName": "Liberation",
"patchedName": "LiterationMono",
"caskName": "liberation",
And there are a lot more ... strangenesses.
I guess the casks have been created by different people following
different ideas.
[how]
All these inconsistencies makes setting up rules how to determine the
cask name from the other names very complicated and brittle.
If we want to preserve the existing cask names the simplest and most
stable approach is to explicitely specify them in the fonts.json
database:
Introduce a new data field "caskName", like shown above.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The existing Casks _all_ contain both the Mono and non-Mono variants.
I believe splitting would be a good idea, but that would break existing
uses.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
People might want to know how the original/unpatched font really is
called. This is done for most current casks.
[how]
Utilize jq and the fonts.json database to retrieve the name (which is
stored nowhere else). Put it in the parens in the name field.
Update some `unpatchedName`s.
[note]
Examples from current casks:
homebrew-cask-fonts/Casks$ find . -name '*nerd-font*' -exec grep " name" {} \; | sort
name "3270 Nerd Font (3270)"
name "Agave Nerd Font (Agave)"
name "Anonymice Nerd Font (Anonymous Pro)"
name "Arimo Nerd Font (Arimo)"
name "AurulentSansMono Nerd Font (Aurulent Sans Mono)"
name "BigBlue_Terminal Nerd Font families (BigBlue Terminal)"
name "BitstreamVeraSansMono Nerd Font (Bitstream Vera Sans Mono)"
name "BlexMono Nerd Font (IBM Plex Mono)"
name "CaskaydiaCove Nerd Font (Caskaydia code)"
name "CodeNewRoman Nerd Font (Code New Roman)"
name "Cousine Nerd Font (Cousine)"
name "DaddyTimeMono Nerd Font (DaddyTimeMono)"
name "DejaVuSansMono Nerd Font (DejaVu Sans Mono)"
name "DroidSansMono Nerd Font (Droid Sans Mono)"
name "FantasqueSansMono Nerd Font (Fantasque Sans Mono)"
name "FiraCode Nerd Font (Fira Code)"
name "FiraMono Nerd Font (Fira)"
name "GohuFont Nerd Font (Gohu)"
name "GoMono Nerd Font (Go)"
name "Hack Nerd Font (Hack)"
name "Hasklug Nerd Font (Hasklig)"
name "HeavyData Nerd Font (Heavy Data)"
name "Hurmit Nerd Font (Hermit)"
name "iMWriting Nerd Font families (iA Writer)"
name "InconsolataGo Nerd Font (Inconsolata Go)"
name "InconsolataLGC Nerd Font (Inconsolata LGC)"
name "Inconsolata Nerd Font (Inconsolata)"
name "Iosevka Nerd Font (Iosevka)"
name "JetBrainsMono Nerd Font (JetBrains Mono)"
name "Lekton Nerd Font (Lekton)"
name "Literation Nerd Font families (Liberation)"
name "MesloLG Nerd Font families (Meslo LG)"
name "Monofur Nerd Font (Monofur)"
name "Monoid Nerd Font (Monoid)"
name "Mononoki Nerd Font (Mononoki)"
name "mplus Nerd Font (M+)"
name "Nerd Font Symbols Template (Symbols Only)"
name "Noto Nerd Font families (Noto)"
name "OpenDyslexic Nerd Font families (OpenDyslexic)"
name "Overpass Nerd Font (Overpass)"
name "ProFont Nerd Font families (ProFont)"
name "ProggyCleanTT Nerd Font families (ProggyCleanTT)"
name "RobotoMono Nerd Font (RobotoMono)"
name "SauceCodePro Nerd Font (Source Code Pro)"
name "ShureTechMono Nerd Font (Share Tech Mono)"
name "SpaceMono Nerd Font (Space Mono)"
name "TerminessTTF Nerd Font (Terminus)"
name "Tinos Nerd Font (Tinos)"
name "UbuntuMono Nerd Font (Ubuntu Mono)"
name "Ubuntu Nerd Font (Ubuntu)"
name "VictorMono Nerd Font (Victor Mono)"
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
* Remove appcast
* Process fonts in alphabetical order
* Skip fonts where no checksum can be determined
* Add livecheck
* Add description
* Fail generation on any error in the script
[notes]
* The code to work without checksum (:no_check) did not work anyhow
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Several different indentations methods used here. That confuses me and I
want to edit this file.
[how]
Unify to '4 blanks' as used in other (recently edited) files.
Unify if-then and while-do syntax.
Also replace single quotes with double quite in the cask file.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When you have a fork of this repository and push anything to master the
release workflow is automatically run. This is usually not what people
want. They want to push some changes to the fork's master and create a
Pull Request.
[how]
Only run the release workflow on the original repo.
If they really want to create their own release they would have to
remove this line (or adapt).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We never patched that fonts.
These are bitmap only fonts and we never touched them. We can keep them
for completeness in the src/unpatched-fonts/ProFont/profont-x11
directory, but the empty patched dir is somehow confusing.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When a custom set is to be patched and that set contains the .notdef
glyph the script crashes.
[how]
The glyphs has an unicode codepoint of -1, a code that we explicitely
not patch. That leads to confusion when we try to determine the
codepoint to be used for that glyph, because it has none.
Exclude negative codepoint glyphs when we determine the selection of
to-be-patched glyphs.
As last resort for broken custom sets skip over glyphs that come out of
order (which should be impossible).
Fixes: #1005
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some fonts in the readme source font tables are marked as 'no RFN' while
they infact have a RFN (and we act on that, so that is just a
documentation issue).
[how]
Also add updated fonts.json, that contains RFN information and correct
unpatchedFont names, compare gh-pages commit
4f78d656 download: Fix RFN detection
The updated fonts.json is also needed for an upcoming Casks creation
fix.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Tagging behavior changed with inclusion of the Meta action.
Previously every docker-rebuild has been tagged 'latest', that is now
missing.
[how]
Enforce latest tag.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Credentials not needed (I guess).
Workflow is never run on pull-requests, so no check needed.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Obviously the Hack package on AUR vanished and has been replaced by a
community Arch package.
Fixes: #983
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Old (renamed) license files are not cleaned up automatically.
The new files will be put into the patched-fonts dir, but old ones not
removed.
[how]
With commit
afd7ba10 patch-em-all: Purge destination dirs if possible
the script purges old font files from the patched-fonts directory to get
rid of renamed font files. This has been deliberately limited to ttf and
otf files.
But as all license files are automatically copied over we can also
remove them.
This (finally) remove the possibility to manually put any files in those
directories. This can be good or bad.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We have 'license' is the archives, but the 'licence' files are missing.
We allow all-caps and all-lowercase, but not camelcase 'License'.
Sometimes we have OFL.txt which is missing.
[how]
Enable both spellings and also camelcase.
Enable OTF text files.
Also fix misunderstanding of regex vs glob ([] vs {}), where the glob
needs a comma and the regex does not.
Add missing LICENSE files for 2 fonts.
Fixes: #979
Reported-by: Jeremy Thorn <moralground>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
$ ./optimize-original-source.sh doit
Checking for SVG simplifications
Files might be MODIFIED by this run ('doit' specified)
Found 177 svgs in ../../src/svgs
Simplification for ocaml.svg (5249 -> 3604) 68%
Simplification for apple.svg (3228 -> 2302) 71%
Simplification for pug.svg (5507 -> 4243) 77%
Simplification for jenkins.svg (13014 -> 6406) 49%
Simplification for firefox.svg (6276 -> 4640) 73%
Found 5 svgs to simplify
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some of the svgs still render incorrect in fontforge.
[how]
Different issues, for example wrong direction of the sub-path and still
(forgotten?) multiple layers, etc. Manually tinker until they work.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Outline fonts are a bit picky about the embedded svgs.
Best is if there is only one path.
Ungrouped and path merged in Inkscape manually.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Some icons are now existing twice.
* Their crystal icon looks wrong (rotationwise), compare with https://github.com/crystal-lang/crystal
* Their C logo misses the standard's hex shape
* Their C++ logo misses the standard's hex shape
* Their Elixir icons has a dent in the reflextion?
* Their Elm icon is colored
* Their Git Folder is not a folder
* Their Kotlin icon is colored
* Their Puppet icon is more correct
* Their Pursescript icon is identical
* Their Windows icon is more modern
That means:
* Do not include their crystal, elixir, elm, kotlin, purescript
* Do not include our puppet, windows
* Keeping both c, c++, git-folder
[note]
Keeping their old files around with changed suffix to find this commit
in the future on updates.
Reuse old icons that were labeled as 'seti' but have been vanished as
new custom types with appropriate file naming.
And remove 'red' versions of icons. We have a black and white font...
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Add "_nf" suffix to our own svgs.
Add our icons database
Adapt filename in icons database
Just change the filenames of the custom icons to include the new "_nf"
suffix.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Keeping the ligature removal tables up to date with source font updates
is quite a maintenance burden.
Usually if a terminal supports ligatures at all it has an option to
disable them.
Present ligatures do not prevent monospaced fonts and monospaced
detection.
It was only present in v2.0.0, and the code has been broken with v2.1.0.
[note]
Updated example ligature removal table to the one for Iosevka.
Left stubs in relevant code passages to facilitate finding this commit.
Fixes: #976Fixes: #975Fixes: #973
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
checkout-files checks out the last version on the push target branch,
not the version we actually pushed.
checkout clears all the workspace, so out file we want to commit is
lost.
[how]
Use commit hash from just pushed commit.
Use temporary directory outside of workspace to store the file.
Unfortunately we haved to copy back because github-pages-deploy-action
seems to take no absolute paths.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>