Commit graph

1690 commits

Author SHA1 Message Date
Fini Jastrow
ce6c161281 font-patcher: Handle -l option in all metrics
[why]
The -l option tries to improve (especially) the powerline glyphs by
making the baseline to baseline height (cell height) an even number.
But it does so only for 2 of the three possible metrics.

[how]
Assuming the hight is identical for all metrics we just need to add '1'
to all ascender values.

[note]
I'm not sure this does anything. After rounding an odd height might
create a 'sharper' triangle tip, not an even height?
Do not understand the real reason for the -l option.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-22 15:21:09 +01:00
Fini Jastrow
5cc911e559 font-patcher: Use format for output
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-22 15:21:08 +01:00
Fini Jastrow
d44d88d52a CI: Deactivate release workflow
[why]
More often than not (i.e. almost always) I cancel the release workflow.

The problem is that a release workflow will patch all fonts, and all
fonts will differ (at least in the timestamp) and so the repo will grow
A LOT. Usually you want to be really conciously deciding that the growth
is really warranted, and no automatic can do that.

I guess one could trigger rebuilding the zip archives but not commiting
the newly patched fonts back to the repo, but that is also a strange
situation.

[how]
Release has now only a workflow-dispatch trigger, that must be clicked
if a release workflow shall run.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-22 15:12:22 +01:00
Fini
7493cd782b
Merge pull request #1062 from ryanoasis/bugfix/Overpass-Mono-NFM
font-patcher: Fix: Fix more 'Nerd Font Mono' too wide
2023-01-22 15:08:11 +01:00
Fini Jastrow
dd3ed4dc74 font-patcher: Fix Monofur 'Nerd Font Mono' too wide
[why]
Although Monofur is monospaced it has one glyph (hyphen) that is
slightly wider than all others. This results in a Monospaced font that
is slightly too wide.

[how]
Ignore the hyphen width.

[note]
Additionally improve (commented out) debug code (shows now hex
codepoint).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-22 14:53:21 +01:00
Fini Jastrow
326ccdf601 font-patcher: Improve monospace check
[why]
If a `Nerd Font Mono` font is to be created we need to make sure the
original font is indeed monospaced. If it is not and we enforce the same
adavnce width on all glyphs they will look very ugly. Fonts need to be
designed to be monospaced.

We spot check only some characteristic glyphs for that.

Hermit Bold has a problem. Although it looks more or less monospaced it
has some glyphs wider than all the others, for example the small letter
`m`.
Creating a `Nerd Font Mono` (a font where all glyphs have the same
width) will either: Add too much space to the right of all the other
(smaller) glyphs, or will have the wider glyphs cut off on the right.

[how]
Add small letter 'm' to the spot check list. Now the patcher will by
default refuse to --mono patch that font.

Also add output of first char that fails the monospace check. This makes
debugging easier.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-22 14:24:38 +01:00
Fini Jastrow
b942b12bf4 font-patcher: Improve warning on problematic mono patching
[why]
If a font is problematic to patch as monospaced font, that is detected
but the reporting is maybe not strong enough and gets overlooked.

[how]
Pull font property reporting into dedicated functions.
Use that function additionally in other warning.

[note]
The monospace check uses all glyphs to determine the advance width, but
the actual advance width later ignores some glyphs (that are problematic
in some fonts and are thus ignored, although that glyphs will 'break'
after patching).
This might or might not be useful, I just leave it as it was before.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-21 17:42:29 +01:00
Fini Jastrow
0c51571462 font-patcher: Remove obsolete comment
[why]
That feature mainlined since ... 2.2.0 or so?

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-21 17:42:29 +01:00
Fini Jastrow
7ef696a8b4 font-patcher: Fix: Fix more 'Nerd Font Mono' too wide
[why]
With commit
  99c260831  font-patcher: Fix more 'Nerd Font Mono' too wide

the glyphs 'ij' and 'IJ' are exempted from the advance width
calculation, because some fonts (i.e. Overpass Mono) defines them as two
cell wide glyphs (Hello? 'Mono'?)

For some obscure reason it was 'IJ' and 'J circumflex' that were
exempt, not 'ij'.

[how]
Exempt correct code.

Fixes: #703

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-21 17:42:16 +01:00
Fini Jastrow
50a1893171 Correct i_xxx.sh
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-19 08:32:00 +01:00
Fini Jastrow
8deda7fb49 font-patcher: Increase script version after last bugfix
[why]
With commit
  f240e073f font-patcher: Fix windows Mono family names with --makegroups

the script version did not change, which makes it impossible to say if a
user uses a bugfixed patcher or not.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 21:16:35 +01:00
Fini Jastrow
c0ccb72990 Repatch "NF Mono" affected fonts
[why]
The previous commit
  f240e073f (HEAD -> master, origin/master, origin/HEAD) font-patcher: Fix windows Mono family names with --makegroups

fixed a bug in teh font naming; instead of "NFM" the fonts were named
"NF Mono", which is wrong.

Affected are the fonts patched with --makegroups --mono --windows.

That means 1/4 of the fonts of
* Iosevka
* JetBrains Mono
* mononoki
* Cascadia Code

[how]
Run gotta-patch-em-all with FF 20230101 locally.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 18:48:54 +01:00
Fini Jastrow
f240e073f0 font-patcher: Fix windows Mono family names with --makegroups
[why]
Without --makegroups the font family is "Name NFM", but with it enabled
we get "Name NF Mono".

[how]
Mimic the old short-naming also for the groups.

This feels a bit strange, why do we need to specify the names three
times for `inject_suffix()`, slightly different. At some point this
should probably be unified.

    def inject_suffix(self, fullname, fontname, family):
        """Add a custom additonal string that shows up in the resulting names"""

In principle Family + Subfamily -> Fullname -> Fontname
Somehow we rename not according to the default rules.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 15:15:24 +01:00
Fini Jastrow
bb17fde9af CI: Prepare for update casks workflow run [skip ci]
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 13:11:56 +01:00
Fini Jastrow
2ee963285a doc: Update font versions in readme [skip ci]
[why]
Has been forgotten in the respective PRs.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 12:59:12 +01:00
Raz Luvaton
af7895933a doc: Update jetbrains mono version 2023-01-18 12:59:12 +01:00
Fini Jastrow
ec8771274b [ci] Regenerate CSS files [skip ci]
Done manually because release workflow had a bug on release.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 11:21:44 +01:00
Fini Jastrow
16ad39fed6 CI: Fix release workflow
[why]
Release workflow for 2.3.0 stopped.
The script generate-webfonts.sh needs fontforge which was not installed.

[how]
Install the (ordinary) fontforge. As we just export the woff we can live
with whatever version is available.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-18 11:20:58 +01:00
Finii
af8d22eb19 [ci] Regenerate fontconfig 2023-01-17 19:18:12 +00:00
Finii
9f6dc21d0f [ci] Rebuild patched fonts 2023-01-17 19:07:49 +00:00
Finii
1cc7631da3 [ci] Bump release version 2023-01-17 19:02:09 +00:00
Fini Jastrow
78398990d4 Trigger Release 2.3.0
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-17 17:12:04 +01:00
Finii
e3051ccfa6 [ci] Rebuild original-source font 2023-01-17 17:05:27 +01:00
Fini Jastrow
b12afcb688 Add V language icon
[how]
Icon taken from https://github.com/vlang/v-logo
Edit in inkscape:
 - remove shadow
 - simulate shadow by cutting right side
 - change to black and white

Fixes: #630

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-17 17:05:27 +01:00
Fini Jastrow
e5d835080e Drop 'IBM' from 3270's names
[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>
2023-01-17 15:44:20 +01:00
Fini Jastrow
b52f0a7cb1 Fix 3270 naming
[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>
2023-01-17 15:31:59 +01:00
Fini Jastrow
1d8efb6f68 Fix Mononoki naming [skip ci]
[why]
We get very bad names using the old naming algo:

`mononoki BoldItalic Nerd Font Complete`

Also the typographic subfamily is useless (will not be set bu the old
algo)

[how]
Use `--makegroups` which results in correct fullname
`Mononoki Nerd Font Complete Bold Italic`

Related: #575

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-17 14:42:05 +01:00
Fini Jastrow
fec587385a Update mononoki to 1.5
Mononoki is now a RFN; but under conditions mentioned in [1]
we can use that name for the patched font.

[1] https://github.com/ryanoasis/nerd-fonts/issues/575#issuecomment-1385308049

Fixes: #575

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-17 13:28:27 +01:00
Fini Jastrow
e6c01bc5fb Fix Cheat Sheet for new MDI [skip ci]
[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>
2023-01-16 23:48:35 +01:00
Fini Jastrow
c6b3b0841c Update JetBrains Mono to 2.304
Fixes: #1050

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-16 23:27:19 +01:00
Fini Jastrow
e601907caf Update Fira Code README
[why]
We had a copy of the original Fira Code website.
But all the comments and links are only partially relevant for the Nerd
Fonts patched version, e.g. how to install.

[how]
To reduce confusions do not copy the original readme, but link it.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 21:59:30 +01:00
Fini Jastrow
f922619734 gotta-patch-em-all: Drop explicit combinations list
[why]
The list is very long and has very little meaning.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 21:37:37 +01:00
Fini Jastrow
be04d53d85 gotta-patch-em-all: Fix --info
[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>
2023-01-15 21:22:14 +01:00
Fini Jastrow
713f5ef386 Update Iosevka to 17.0.4
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 21:13:14 +01:00
Fini Jastrow
b98c2a1921 Fix JetBrains Mono Family names
[why]
The JetBrains Mono font has a lot of different families. A lot users install
just all "JetBrainsMono Nerd Font" families, and this can break in a lot
different ways.

[how]
Just turn the feature on in font-patcher (via patch-em-all's config).

Fixes: #542

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 17:39:43 +01:00
Fini Jastrow
52d328f55d Fix font-logos
[why]
The 'ferris' glyph in font logos is broken (has overlapping contours).

See

https://github.com/lukas-w/font-logos/issues/86
https://github.com/lukas-w/font-logos/pull/87

[how]
As upstream does not fix, do this here manually.

Fixes: #946

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 17:09:09 +01:00
Fini
a0b6a5bfe5
Merge pull request #773 from earboxer/new-material
Add New Material Design Icons to its own region
2023-01-15 16:17:50 +01:00
Fini Jastrow
c39c97ba61 materialdesignicons: Fix glyph F1522
[why]
The glyph 0xF1522 is broken.

See:
https://github.com/ryanoasis/nerd-fonts/pull/773#issuecomment-1373990838
https://github.com/Templarian/MaterialDesign-Font/issues/9

[how]
Manually edit in fontforge and remove line. Export as simple ttf.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-15 16:10:33 +01:00
Fini Jastrow
54acb57739 font-patcher: Add ScaleGlyph for Material Design Icons
[why]
Scaling the glyphs individually breaks a lot of glyph pairs or groups,
for example F0718-F071E.

[how]
Use one ScaleGlyph for the complete set. The set itself is already very
well scaled, i.e. all glyphs are maximized in a given design space and
that they look good next to pairing glyphs.
There is no need to use ScaleRules which is quite costly for such a big
range of glyphs (they all are copied twice in the process).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 13:02:05 +01:00
Fini Jastrow
cd39545628 font-patcher: Add mixture of ScaleGlyph and ScaleGroups
[why]
ScaleGlyph always did scaling only (no translation) based on one
reference glyph.

ScaleGroups does scaling and translation but can not work with one
reference glyph but constructs always a combined bounding box.

Missing is a way to scale AND translate, but with only one reference
glyph.

[how]
Invent GlyphsToScale+ keyword, that supports just that.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 13:01:17 +01:00
Fini Jastrow
5d0c65006d font-patcher: Prevent autohinting on added symbols
[why]
The files sizes of otf files are (especially with the addition of the
current Material Design Icons) big enough already. The autohints are not
really useful for symbols, so we can drop them and save some space.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 12:59:53 +01:00
Fini Jastrow
69e8c0e033 Add current Material Design Icons
[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>
2023-01-13 12:59:53 +01:00
Fini Jastrow
7cb227c7e0 Rename "Material Design" to "Material Design Legacy"
[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>
2023-01-13 12:59:53 +01:00
Fini Jastrow
5ec943aa13 Update generate-glyph-info-from-set to Python 3
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 12:59:53 +01:00
Zach DeCook
91ae09a203 material design icons: Update documentation 2023-01-13 12:59:53 +01:00
Zach DeCook
5426881a76 materialdesignicons: Update to newer version (fix #279)
With appropriate codepoint (fix #365)
2023-01-13 12:59:53 +01:00
Fini Jastrow
6f0b1fbf4f doc: Better document how the Cheat Sheet is generated [skip ci]
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 12:07:50 +01:00
Finii
4c76918895 [ci] Rebuild original-source font 2023-01-13 10:47:20 +00:00
Finii
c6ee815472 [ci] Simplify original-source source glyphs 2023-01-13 10:47:16 +00:00
Fini Jastrow
78bf5c3dff CI: Fix release workflow
[why]
When we rerun (on a release candidate) we end up with an error message:

    * Connection #0 to host api.github.com left intact
    Tag exists: "v2.3.0-RC"
    exists=true
    Error: Unable to process file command 'output' successfully.
    Error: Invalid format '"v2.3.0-RC"'
    ##[debug]System.Exception: Invalid format '"v2.3.0-RC"'

[how]
We want to set an output depending on the grep exit code but the grep
output leaks into our value...
Make grep silent.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-13 10:36:05 +01:00