[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]
We have the same file in the repo, once with the ending 'TXT' and once
with the ending 'txt'.
This raises an issue on case-insensitive file systems.
[how]
The original in src/unpatched-fonts has the lower case ending.
So drop the capital letters one.
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]
Some changes to bring it in line with the other workflows.
[how]
Sorted from short to long:
* Name all steps
* Correct trigger
* Remove unused output
* Simplify zipcmp decision
* Use apt instead of apt-get
* Update upload-artifact action
* Remove some trailing whitespace
* Remove name from artifact to prevent strange double zip name
* Use ordinary checkout instead of sparse - we need it anyhow to commit
[note]
Ok, 'simplify zipcmd decision' that might be matter of taste.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
It is not really a release, it is just a convenience for people that
want to download the current master patcher with all accessories.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When a ScaleGroup's combinded bounding box is wider than the target font
cell the actual X position of a glyph in the group depends on it's own
bonding box and not of the combinded bounding box. When doing center
or right alignment.
[how]
'Overwide' ScaleGroup glyphs are correctly placed and shifted in
position, but that would mean a negative left side bearing (i.e. glyph
extends to the left into previous 'cell').
We do not want that and it is later corrected for all glyphs. But that
is done on an individual glyph level and it is just left aligned for its
concrete bounding box (i.e. left side bearing is set to zero).
The dilemma here is that you can not really center a (combinded) glyph
within a cell, when
* the cell is smaller than the glyph
* a left bearing is not allowd
So we change the algorithm here that 'center' and 'right' alignment
mean:
* Center the glyph in the target font cell
* But if that would create a left side 'overhang' (bearing) just left
align (move it as far left as possible without creating a negative
bearing)
The only glyphs affected by this change are the very wide weather icons,
and here escpecially the moon phases F096 and following (target
codepoints E38E ..).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The scaling of the clouds is not identical but depends on the actual
glyph bounding box. But the clouds should all have the same scaling to
be 'interchangeable'
[how]
Put all clouds in a ScaleGroup.
Also add missing Celsius degrees glyph to other degree glyphs group.
Fixes: #1107
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Powerline extra glyph sizing is not really clear.
[how]
Make the triangulars 1 cell wide, as for example Iosevka also does.
Make the Legos 2 cell wide with pa scaling to make them look nicer.
Make the Hexagons 2 cells wide and keep their aspect ratio if possible.
Make small and big Squares also 2 cell wide and keep their aspect ratio
of possible.
For the small and big Squares add a tiny bit of border (negative
overlap), because they have no smooth border line over their open and
closed squares, and that might look strange if some touch and some dont.
Fixes: #1106
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When patching the Symbols Only font we derive the baseline to baseline
distance through abnormal means, so the check fails.
[how]
Set expected baseline to baseline value explicitely for the Symbols Only
font.
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]
There is a bit of code that is not needed anymore (or was never needed).
This makes things look more complicated than they are.
[how]
1. It is plain wrong to write that we add one (1) glyph if we do not add
any glyph.
2. One (1) is added to index later anyhow, so we do not need to distort
the counting in the beginning (the code will run with index=1 for
both the first and the second patched in glyph).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Python 2 is long since EOL.
With the last commit we want to use Enums, which are not available in
Python 2.
I believe Python 2 broke some time before already, I stopped caring for
Python 2 some time ago.
This does not change any existing code. It just documents that there are
no efforts anymore to support Python 2.
This is PR #1121
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
621008773 font-patcher: Use WIN metrics in all conflicting cases
we intended to use the WIN metrics for the baseline to baseline
calculations for fonts that have contradicting (i.e. broken) metrices.
But we use the TYPO metrics instead.
[how]
This is obviously a typo in the code. To prevent such errors and improve
the readability we use Enums now. I believe we silently dropped support
for Python 2 some time back. And if not we drop it today :-}
[note]
Many thanks to Nathaniel Evan for again finding this bug!
Mentioned in: #1116
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
e69a025a8 font-patcher: Fix line gap redistribution
we fixed the wrong adding instead of subtraction of the bottom gap part
from the descenders.
At least this was done for HHEA and TYPO values.
With WIN values the descenders have positive (!) numbers, so the sign
was not changed for the WIN case.
But that is wrong, as we are already in the ymin xmax coordinate system
(and took the negative of the WIN descenders). So of course here also we
need to subtract and not add.
Mentioned in: #1116
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Instead of redistributing the line gap we remove it.
At least when HHEA or TYPO metrics are used.
It's ok with WIN metrics.
[how]
If we have negative numbers for a gap and want to add more to it, where
'add' means 'make it more', we must of course _subtract_ the value.
But baseline-to-baseline code into function so we can check it after all
our gymnastics for correctness. It means the metrics.
[note]
Also correct out-of-sync comment.
Fixes: #1116
Reported-by: Nathaniel Evan <nathanielevan>
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]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.
Fixes: #284
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When changes are made to the font-patcher and fonts are patched with
that version we can not see which patcher has been used in the fonts
afterwards.
Would be good to have the usual version-patchversion number in the fonts
in these cases (i.e. `v2.3.3-7` for 7 commits after `2.3.3`).
I did this manually before, but it is always a hassle.
[how]
If the font-patcher is run directly from a git repo and git is installed
we try to get the latest tag version including patch number.
If and only if that is successful and that version is 'newer' than the
version encoded in the font-patcher script the git version is trusted
more.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
After adding a contributor with allcontributors the website is not
updated.
[how]
Obviously there is a setting if a dependant workflow should be started.
Set that value to 'true'.
Also fix commented-out section of workflow triggers for 'release', that
should not be triggered by allcontributors, when that is commented-in
again (if ever).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some fonts have invalid (or unset) Panose flags. When we create a "Nerd
Font Mono" font the Panose proportion is set to 'monospace'. This
make the font selectable in certain applications that need monospaced
fonts.
After #764 the "Nerd Font" variant shall (again) be detected as
monospaced font, but the glyphs have a big right side bearing (hang into
the next 'cell'). So we need to set the Panose bits there also.
[how]
We already have a check if the font is propably monospaced, independent
from Panose. This is used to prevent --mono patching on originally
proportional fonts.
If we find out with that check that the font is (most probably)
monospaced we also set the appropriate bits in Panose; unless Panose has
valid values that contradict that change.
Fixes: #1098
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]
The implode function can not work correctly because the bash pattern
expansion inserts blanks in unexpected places.
[how]
Use a dump loop instead of being smart.
Fixes: #280
Reported-by: Geoffrey Biggs <gbiggs>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When --quiet and --no-progressbar is given we get a lot of empty lines
in the output.
[how]
Just output the carriage return when we have output som eunterminated
stuff before.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When a certain 'higher codepoint' glyph is needed for a substitution or
ligature rule of a basic glyph and we replace the 'higher codepoint'
glyph with a symbol that stylistic set or ligature will be broken.
[how]
We can not determine if a certain glyph is the _target_ of a pos-sub
rule (at least I could not find a way). What we do is remove all pos-sub
entries that _start_ at a symbol-patched glyph [1], but that is not the
same.
Instead of walking through all substitution tables we just examine the
'basic glyphs' and also protect all glyphs that they reference through
most of the possub tables.
In fact I encountered only "Substitution" entries and never "Ligature"
entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are
not handled, but could be added if need be.
[1] #711Fixes: #901
Reported-by: Xiangyu Zhu <frefreak.zxy@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>