[why]
Somebody might want to have a file where all symbols we add are listed.
At the moment there are only the i_*.sh scripts and the CSS files. Both
are rather unwieldy.
[how]
Just create a json file with all symbol names, like the CSS file.
Fixes: #448
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The last missing powerline-extra glyphs should also be in this set.
The intermediate line's color is not visible in some terminals.
[note]
Also fix that E0CF is shown twice.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When testing 'Nerd Font' fonts (i.e. symbols may be 2 cells wide),
the output does not take that into account and does not insert
the needed blanks.
[how]
Because the actual width can not be easily determined add a
parameter (just add anything as parameter) to switch some glyphs
to two cell mode. These glyphs are in a list, i.e. hardcoded.
If the widths in non-Mono fonts is ever changed this script needs
to be adapted.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
On MacOS Ventura the unicode codepoints are shown instead of the actual
glyphs.
[how]
On that OS the bash is rather old and does not have the unicode escape
sequence \u. As it is rather hard to convert it to octal UTF8 we instead
embed simply the concrete characters, as done in the i_*.sh scripts.
Note: zsh on that OS does have it, though.
[note]
I'm no Mac expert, just trying to get this working.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The left side wave is also used on the right side.
The right side wave is never shown.
[how]
Well,...
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
In the CI we have only a shallow clone of the repo, so access to tags is
not possible. Instead of resulting in a nice message like '2.3.3-35' we
get an empty string.
[how]
As we have no tags we can only write the commit hash and other
information given in the only existing (i.e. last) commit:
date, author, title
It's a bit more cumbersome but one can still see from which point in the
repo the archive has been created.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If we create the zip file not only on releases we need some better
version information inside.
We can not use the same approach with real releases, because we add the
tag at a later stage in the workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We print two times the name of the output font, and never the name of
the input font...
[how]
*cough*
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We have an automation for adding glyphs to the original set.
If someone throws in the svg file and adds the glyph to the icons.tsv a
new original-source font is generated.
But the added glyphs are not patched in, because that would need a
change at font-patcher (adjust the end codepoint).
This can be forgotten easily.
[how]
The maximum codepoint of our own (original + seti) set is 0xE6FF. At
0xE700 the Devicons start.
The original-source generation script now checks the offset, they may
not be negative and on the positive end we may not leave our set-range.
If that happens the script fails thus the workflow fails.
Also increate the patch range in font-patcher. If there are no icons to
patch in the symbol font the codepoints are just ignored.
[note]
See also PR #1119
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The heavy angle brackets (276E and 276F) are used for a lot of prompts,
but we do not yet patch them in and a lot of fonts do not bring them
themselves.
[how]
One time rip the glyphs out from Hack and patch them in always, but
careful (do not replace existing glyph).
We take the whole set 276C - 2771.
[note]
Usually we should never again need to run the generate-extraglyphs
script, we rip them out now and they look good. Whatever Hack does with
new versions we can follow but that is optional.
Related: #1110
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The (old) Material Design Icons are to be removed.
We should communicate that on the Cheat Sheet.
[how]
See commit
4452ceee5 Add possibility to add "obsolete" to glyphs
that implements the CSS stuff to display an 'obsolete' marker.
Change the cheat-sheet generatot to actually insert the markers for the
appropriate codepoints. That is, the codepoints are not checked but the
ID.
Fixes: #1096
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some font previews in the gh-pages are obviously wrong (showing some
fallback font).
[how]
Recreate all image previes from current master branch.
To make this more easy:
- Add commented out code that displays command to install just the
needed fonts but all the needed fonts
- Add commented out code that displays the family names of the needed
fonts - these have to be in sync with the fonts.json database
Fixes: #489
Reported-by: CosmosAtlas
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
It's a pain to have the addition of contributors automated via
all-contributors bot, but then it does not end up on the webpage.
[how]
I'm not sure it will automatically be triggered (pretty sure it will
not), but at least one can clickstart manually the workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The script is not a 'proper' script with shebang.
The CONTRIBUTORS.md format changed.
We want to incorporate this as CI workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
JetBrains Mono is patched without `--makegroups`, although it is
specified in the `config.cfg`.
[how]
As with the licenses the code expects a specific font directory depth.
That is violated with some fonts, for example JetBrains Mono.
The config is never found.
Compare commit
8a749ab21 patch-em-all: Fix missing licenses
Fixes: #1081
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
I'm not sure why it has been in the code like this, and I removed these
strange globs already before in some places [1].
find -name "*.[o,t]tf"
actually allows
*.otf
*.ttf
*.,tf
[how]
Remove spurious comma in all `find` calls.
Systematically.
[note]
Just some commits mentioned here:
2ace3de8e7722458821ac6817bc729e2
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
6e361d40c cheat-sheet: Allow click to copy on hex value
(on branch gh-pages) we add the possibility to copy the raw hex code by
clicking on the hex number.
It would be more obvious if there is a tooltip.
[how]
Add tooltip via 'title' in cheat-sheet generator script.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The commits needed to be in the master branch, but that is protected, so
we can not force push the commits away after debugging.
Revert "DEBUG: Show directory contents"
Revert "DEBUG: archive-fonts.sh"
Revert "DEBUG: Add more of original workflow"
This reverts commit 40f6990282.
This reverts commit 9e3fdefeba.
This reverts commit 5e8b8c6ed5.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If the license file is not in the same folder as the font file or its
parent directory it will not be copied.
Example:
├── AUTHORS.txt
├── config.cfg
├── copyall.sh
├── Ligatures
│ ├── Bold
│ │ └── JetBrainsMono-Bold.ttf
│ ├── BoldItalic
│ │ └── JetBrainsMono-BoldItalic.ttf
├── OFL.txt
└── README.md
When processing one font file (.ttf) the OFL.txt is neither in the same
nor in the parent directory (but rather in the parent's parent.
[how]
Collect all license-ish files for a complete font set and copy them all
over each other into all appropriate destinations in patched-fonts.o
Note that in situations like this:
├── fonts.dir
├── fonts.scale
├── L
│ ├── Bold
│ │ └── Meslo LG L Bold for Powerline.ttf
│ ├── config.cfg
│ └── LICENSE.txt
├── LICENSE.txt
└── README.rst
All LICENSE.txt files will be copied, but only the last one will 'win'.
So make sure all license files are identical.
Fixes: #1068
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
For some reason we work with strange paths like "root/a/b/../../c/d/e"
instead of "root/c/d/e".
[how]
Use dirname to go directories up.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When running with --info on a completely empty patch-destination some
directories are missing and are never created. They would have been
created by the actual patching that is suppressed now.
[how]
Check and create the needed subdirs.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Somehow the license file is missing from the release run.
It is present if I run it on the local machine.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We added a lot of glyphs in Seti + Custom and the new range Material
Design Icons.
[how]
Create new graphics with generator, see README.md.
Use Inkscape to implant into old image.
Note:
In the totals just the new Material Design Icons are included, the old
(obsolete, to be removed) range is not counted at all anymore.
Also did not change the distribution of the diagram. When we would
create a real sankey diagram (with the actual numbers) all the other
sets would be dwarfted by the new Material Design Icons.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The font was always called 3270.
Having a big company's name in the fontname is scary 😬
See
https://github.com/rbanffy/3270font/issues/60
[how]
Add renaming rule.
Fixes: #1012
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Somehow the `IBM 3270 SemiCondensed` font turn out as
`IBM3270Semi Nerd Font Condensed`.
The 3270 font always had the quirk to have a non-standard style with a
dash. We have specific code to circumvent that.
[how]
After updating 3270 the 'Narrow' had been renamed to 'Condensed' and so
our specific patch did not work anymore.
Adapt the regex to find the new style that needs correction.
[note]
https://github.com/ryanoasis/nerd-fonts/issues/1012#issuecomment-1385497230
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Although commit
69e8c0e Add current Material Design Icons
claims that we updated the Cheat Sheet after adding the new Material
Design Icons, that actually did not happen.
[how]
Add new MDI's i_*.sh file to all. That is used by the generate-css that
also generates the cheat sheet web page.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The info-only option broke with the latest changes.
[how]
Set something to the variable that determines the info only mode.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Material Design Icons has grown quite a bit.
[how]
Add the icons at their original position which is in PUA1.
Use the desktop font instead of the webfont.
Add cheat cheat file.
Fixes: #365
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We want to differentiate between the old, problematic Material Design
Icons (problematic because we map them to unicode blocks that we should
not), and a future new and updated set of Material Design Icons.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Sometimes we set an empty string as SubFamily name. That ends up as
'Book' which is unexpected.
[how]
The translation from empty to "Book" is done by Fontforge, at least
with version 20220308.
Make sure we always have a SubFamily, and if we don't that must be a
'Regular'.
[note]
This was only a problem with the old naming engine. --makegroups got
this right always.
Fixes: #1046
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The messages from parallel font-patcher runs can be very confusing, so
it has been disabled some time ago (without a comment in that commit?!).
However, if someone wants to repatch multiple fonts on a local machine
it might be beneficial to run more than one process to have work on all
cores.
[how]
Add option to select multiple processes in parallel.
Limit the amout to 8, which might be a good value for typical end-user
machines with 4 cores and 8 threads.
Patching Cascadia Code (12 fonts) took these times on my machine:
1 job: 21m 55s
4 jobs: 6m 24s
8 jobs: 5m 14s (this runs 8 and then the remaining 4)
16 jobs: 4m 48s (this runs 12 in parallel)
Adding a proper `-j` that takes a numeric argument is rather too much
work for my taste, so we stick with 8 for now.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Running gotta-patch-em-all creates a lot of output that is most likely
not wanted.
[how]
Add --verbose option to gotta-patch-em-all.
Hide debugging information unless it is wanted by specifying this option.
Also change font-patcher to produce less verbose output and respect
--quite in more places.
This includes a change that we try to tweak the font flags only if
source and destination font are ttf or otf, because we can not read the
other raw font files anyhow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When working on the font-patcher the developer needs to test the changes
on a number of fonts. This is usually a manual call of `font-patcher`
and afterwards a 'diff' of the newly created font with the 'old' font in
the patched-fonts/ directory with fontforge (which has a font-compare
option).
If you run gotta-patch-em-all normally the newly generated font will
replace the existing font and git will ALWAYS show it as different. The
reason is that at least the timestamp in the generated font has changed.
Far more easy would be if the new gotta-patch-em-all run could keep the
previous timestamps, in that way one can immediately see that the old
and new fonts are bitwise equal (via git).
Furthermore if you expect a change and want to show the differences of
old and new font in fontforge you need both fonts in the filesystem.
But a normal gotta-patch-em-all run replaces the font. A different
destination folder would help here.
[how]
Introduce two new (independent) options to
a) keep the timestamp equal to previous patch run
b) generate the fonts in a different directory
While b) is straight forward, a) is a bit more complicated, esp because
filenames can change and so on. So the script examines just one (1)
random font in the specific font directory and uses its timestamp. In
most cases this is correct enough if the developer uses gotta-patch-em-all
consequently.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
All the fonts will have different timestamps, and within each font the
creation and modification date might also differ. That is quite
confusing and makes automated testing very complicated.
[how]
Use one date-time for ALL fonts and for creation and modification date
in the font file.
But do not change the date-time if we already set that somewhere before :-}
Also remove the 'special' properitary fontforge timestamp tables FFTM from
the patched fonts. This is only possible since FontForge 20th Anniversary
Edition.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Oh boy do I hate the boilerplate code needed with optargs, but without
it every parameter becomes a burden.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>