[why]
We want to patch some fonts with different font-patcher options.
[how]
Use the config.cfg file that each source font can have to specify one
arbitrary option to the font-patcher calls.
[note]
This is partially commit 9e2bc9a26 from #723.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The new 'pathname' pattern always added a '*' glob to the end.
So when we wanted to (just) recreate "Inconsolata" (by specifying
"/Inconsolata") that means "/Inconsolata*/*.[to]tf".
But that includes also "IncolsolataGo" and "InconsolataLCG" :-(
[how]
Just remove the globbing after the pathname. If a pathname is specified
it must be the correct pathname and no star is added per default.
Users could still specify "/Incon*" to get all Inconsolatas in the
pathname based filter mode.
[why]
It might be easier to use the precompiled application than to build it
ourselves.
[how]
The AppImage has the typical problem with relative paths, so we need to
change some small calls.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The find predicate (e.g. -iname) and predicate parameter (the actual
pattern) are in one variable and will be handed over to find as one
parameter instead of two.
How could this ever work?
[how]
Pass predicate mode and predicate parameter as two shell variables.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When the file names of the source files change which happened for example
with these commits:
ac432eb20 Updated Inconsolata source to latest upstream version of 2.001 (WIP #289)
9c5ad2c78 Updated Inconsolata source to latest upstream version of 2.001 (WIP #289)
or the patched font files naming changes because of any other reason:
The patched-font directory will contain the new files along with the
unchanged old ones (because they where not overwritten).
Typically when manually updating the patched-fonts this is not a
problem, as the maintainer can clean this up by hand (if it is noticed).
But with a github action we might want to have that automatized.
To not deter the usability of the script for end-users or for patching
single fonts of a collection we do NOT want to purge 'all old files'
because we can not know if they are really old or not.
[how]
For each directory that we process from the source fonts we check if all
font files therein match our search criterion (pattern, $2). If we are
going to patch _all_ files that are in that source directory we delete all
font files in the destination directory; expecting that all files will
be recreated.
If we do _not_ patch _all_ files, we can do nothing, because we can not
decide if the existing files originate from one of the
not-to-be-processed source font files or are zombies.
Fixes: #786
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We can limit the font files to patch with the gotta-patch-em-all script
to some specific file names; the case insensitive beginning of the
basename of the font file, to be specific.
Sometimes we do not know how the actual font files are named, we just
know the directory name.
[how]
The old filter checked for the beginning of a file name, so we keep this
behavior and allow to check for the beginning of a directory name.
As differentiator the first character of the passed filter is used. As a
slash is not allowed in the file name filters: If the first char is a
slash, we search for font files in a directory that begins with that
name. The file name is not considered in this case.
Examples:
gotta-patch-em-all-font-patcher!.sh Fira
Patches all font files that begin (case insensitive) with 'fira'.
It must be the basename of the font file, the path to the file is not
considered. (Old behavior.)
Translated to a glob this is roughly **/Fira*.[ot]tf
gotta-patch-em-all-font-patcher!.sh /Fira
Patches all font files that are in directories that begin (case
insensitive) with 'fira'. It can not be the beginning of the font
file basename.
Translated to a glob this is roughly **/Fira*/**/*.[ot]tf
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we do CI we probably want to raise an error if no font file could
be found.
[how]
Check how many font files have been generated and return with exit
code 1 if the number is zero.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
The script assumes that it's run from inside bin/scripts, by setting source and target directories according to the output of pwd. It doesn't perform any checks whether it's run from the right directory, so it just doesn't find the fonts if the working directory is different.
Now it sets the directories relative to the script directory.
- fixes missing readme at root dir of each font
- adds addendum clarifying reserved font names
- adds readme even if source font folder has none
- fixes parent directory re-build