[why]
When the file specified to be patched is not a font file the patcher run
errors out with an out of index runtime error:
Traceback (most recent call last):
File "/home/fini/extra/git/nerd-fonts/font-patcher", line 2155, in <module>
main()
File "/home/fini/extra/git/nerd-fonts/font-patcher", line 2147, in main
patcher.generate(sourceFonts)
File "/home/fini/extra/git/nerd-fonts/font-patcher", line 415, in generate
sourceFont = sourceFonts[0]
~~~~~~~~~~~^^^
IndexError: list index out of range
[how]
Do not assume that the specified file will be a font file but rather
check if fontforge detects a font in the file and error out if there is
no font found.
Fixes: #1647
Reported-by: Kristopher James Kent <kris@kjkent.dev>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we crate the hard-monospaced Nerd Font Mono variant the ligs will
be shrunk to 1 cell wide, while the content of the `fi` lig is of course
two cells, ending up in strange overwriting issues.
[how]
Remove the `fl` and `fi` ligatures completely.
Fixes: 1631
Reported-by: @Markov-Komarov
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With Terminess the regex needs to match literal parens, this has been
misunderstood with the last commit.
[how]
Revert the previous commit for Terminess, and use a raw string as
solution instead (because we usually use raw strings for regexes).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some strings have broken format, because the string should contain a
verbatim backslash.
It seems this is a new warning for Python 3.12
[how]
Use raw strings or escape the escape character via '\\'
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Often PRs introduce the legacy .../Bold/ etc subdirectory structure.
[how]
Make more clear that a flat directory is preferred.
Also fix several small glitches in the text.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Improve legibility by having gaps between the gemstone surfaces.
[how]
There is no official monochrome icon. Found one free pixel one and
converted that to outline.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Improve legibility. The full icon is in fact a multicolor icon and the
design depends on being rendered in multiple different colors. That is
impossible for fonts. So we should probably use their flat (mono-color)
icon instead, which hints the different 'flaps' through gaps instead of
colors.
[note]
Both icons (the old and the new) contradict rules given by Firebase to
use the logo. But that can not be helped in a icon font, as we just have
one color of undetermined hue.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Bazel icon might look nicer with gaps between the surfaces of the
cubes.
That is halfway in-line with the design idea of their logo.
See PR #1610 and link
https://blog.bazel.build/2017/07/05/new-logo-and-homepage.html
[how]
Based on the idea from Ezekiel Warren the Bazel icon gets gaps between
the surfaces of the cubes.
For this we use the skeleton svg icon of the Bazel website and construct
from scratch a new outline to represent the cube surfaces. The original
svg used lines with a width to create the image, which is not compatible
to fonts.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The previous change(s) removed executing the config.cfg **shell script**
which would pull in some environment variables like `post_process`.
With that change the appropriate option has to be given with the
commandline value of the new config.cfg **INI** file.
[how]
Remove defunct leftover code.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The logging to files does not work correctly for the messages given
while the options themselves are parsed.
[how]
As soon as we have enough information (after the first argument parsing)
we set the logger up. When processing the config file arguments we have
a full functioning logger now.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We now have two places where we can detect if a config file is given.
This should be unified.
Also handling of missing (?) sections in the config file is not always
handled gracefully.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some Caskaydia Cove glyphs that are used in ligatures (to create endless
arrows for example) show uneven line thickness on some platforms.
The reason is the not-matching hinting of glyphs that are places next
to each other and so minuscule differences are quite visible.
Note that the 'original' hinting is generated by VTT on the static
Cascadia Code instances, which upstream just have ttfautohint hints that
are different from the hints in the variable fonts and people complained
that the look is different.
[how]
Add a new field to the config.cfg file that holds regexes of glyph
names for glyphs that should be re-hinted by fontforge on patching time.
In principle we could also implement that as an additional pre-step that
needs to be manually done after running VTT on the static font files.
I'm not sure which is better.
Note that fontforge generates a lot of debug output because the hinting
is not ideal - the global tables are kept and probably less compatible
to fontforge's own hinting... But the results are good.
Fixes: #1291Fixes: #1609
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The config files are called `config.json` while the contents is
INI-like. The usual extension would be `.cfg`.
[how]
We use `.cfg` already for the shell variable configuration.
Combine both config file variants into one (real) cfg file, that is
directly read by the font-patcher and no shell variables files are used
anymore.
This needs some rewrite in gotta-patch-em to get the quoting right.
To make this simpler we remove the `--debug 1` option from the variable
and insert it directly (as it is applied always anyhow).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
At the moment we have two different config files:
config.cfg:
Is read by gotta-patch-em and allows to specify some needed
commandline options for a font-patcher run
config.json:
Is read by font-patcher and can contain ligature table removal
instructions
It would be nice to combine/unify them.
[how]
Add the possibility to add commandline options in the config.cfg
file. Of course we need commandline options to specify the config
file first, so the options are parsed in two steps.
The config.file takes precedence (if possible) over directly specified
options.
This is how the new section in the config file can look like:
[Config]
commandline: --powerlineextra --mono
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Suggested now fonts/glyphs/set are usually closed to keep the Issue list
to real Issues and not suggestions. People should be able to further
discuss that addition in the (closed) Issue and it will be evaluated on
the next release.
Anyhow, closing the Issue automatically locks it after half a year and
no discussion is possible anymore. That was not intended.
[how]
Add new tag that keeps closed Issues unlocked and mark the addition
Issues as such.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The font list in this has not been updated for quite some time.
There are excellent and up to date Chocolatey packages already
out there created by @sumo300
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>