1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
Commit Graph

2112 Commits

Author SHA1 Message Date
Fini Jastrow
5823665f1f font-patcher: Fix patching non-monospaced fonts
[why]
Any non-monospaced font will not be be patched, the patcher crashes.

[how]
This must have happened when the box drawing characters rescaling
feature has been disabled. The default value (False) is not always set.

The box drawing patch has the ability to rescale existing box glyphs.
That used to be done when all box glyphs are already existing in the
source font. We do not patch in a new glyph set then, but we rescale the
existing glyphs to match the possibly new cell size.
But that feature is disabled and the attribute 'dont-copy' is never
utilized. It is disabled because some existing box sets are rather ...
sspecial in their overlap and can not be scaled as we would scale them.

Fixes: #1170

Reported-by: Henrique Monteiro <hrqmonteiro@protonmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-14 07:08:39 +02:00
allcontributors[bot]
049ca735ca docs: update .all-contributorsrc 2023-04-13 09:16:04 +02:00
allcontributors[bot]
cfb43ccc33 docs: update CONTRIBUTORS.md 2023-04-13 09:16:04 +02:00
Finii
7647c69634 [ci] Update FontPatcher.zip 2023-04-12 16:29:12 +00:00
Sebastian Ullrich
046bdc3ef2 Add run comment 2023-04-12 18:20:57 +02:00
Fini Jastrow
9defc59b9d font-patcher: Fix --xavgcharwidth with --quiet
[why]
--xavgcharwidth does not work when --quiet is given.

[how]
Correct indent level ....

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-12 18:19:36 +02:00
Finii
c8fdda98bf [ci] Update FontPatcher.zip 2023-04-12 14:32:14 +00:00
Fini Jastrow
156f9bf694 font-patcher: Add option to manipulate xAvgCharWidth
[why]
Some old applications seem to depend on obsolete xAvgCharWidth values to
show two-cell glyphs correctly. Fontforge can only generate OS/2 tables
version 4, but these applications need 2 or less. In fact they seem to
not look up the version number, but rely on the value being like it
always has been ;-)

One example is Windows notepad, that takes the xAvgCharWidth as base for
the cell size and draws the two-cell chars in a cell twice that size -
without any regard to glyph width.

[how]
These issue seems to be encountered rather seldom and only with some
obscure (grin) applications. There is also no good way to handle this
automatically. So we add a command line option that allows the user to
tweak the value after patched-font generation.

The option is called `--xavgcharwidth`:
* If not specified the behavior of the patcher does not change
* If just given the xAvgCharWidth is copied over from the source
* If a number is added that number is used as xAvgCharWidth
* If the number added is zero we will calculate the old style xAvgCharWidth

Fixes: #522

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-12 16:29:05 +02:00
Fini Jastrow
cf59464e52 font-patcher: Optimize font tweaking for ttc
[why]
When we have a ttc and tweak the contained fonts we recalculate the
total checksum after each tweak while we only need to tweak it after all
changes (included fonts) have been tweaked.

[how]
Pull the total checksum recalculation out of the subfonts loop.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-12 16:29:05 +02:00
allcontributors[bot]
ae7d6a5744 docs: update .all-contributorsrc 2023-04-08 18:53:41 +02:00
allcontributors[bot]
9ebca248a9 docs: update CONTRIBUTORS.md 2023-04-08 18:53:41 +02:00
Fini Jastrow
e600957704 doc: Fix more anchors
The readme is obsolete anyhow, but while we touch it we can just fix some more anchors.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-08 18:53:25 +02:00
Weltolk
fa79edbc33 doc: Fix anchor in readme 2023-04-08 18:53:25 +02:00
Fini Jastrow
6c5e64d4f6 IosevkaTerm: Prepare gh-pages for change
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-05 16:04:36 +02:00
Fini Jastrow
a8e7751d47 Disentangle Iosevka and Iosevka Term
[why]
Both are full fledged families, one specifically for terminal, the other
not. Although it might be that people want both there is a likelyhood
that some just need one set.

Splitting these makes the individual release packages smaller and more
handable, and improves release workflow run time.

[note]
Also fix RFN of mononoki en passant :-}
See comment on mononoki's RFN with the mononoki 1.6 update commit.

See also #803

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-05 16:04:36 +02:00
Fini Jastrow
dfd186c2a4 Update Lilex to 2.000
Fixes: #1157

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-30 19:38:49 +02:00
allcontributors[bot]
95de53343d docs: update .all-contributorsrc 2023-03-25 12:41:27 +01:00
allcontributors[bot]
c68cddf16f docs: update CONTRIBUTORS.md 2023-03-25 12:41:27 +01:00
Fini
db1df04b58
Merge pull request #1151 from ryanoasis/feature/source-update
Update all source fonts
2023-03-21 19:31:45 +01:00
Fini Jastrow
8a63cf62e2 Update Victor Mono to 1.5.4
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 19:29:34 +01:00
Fini Jastrow
d1b193de54 Update Terminus to 4.49.2
Also drop all the bitmap fonts that we have in src/unpatched-fonts/ but
we do not do anything with them.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 19:14:53 +01:00
Fini Jastrow
dda72eb4c4 Update Source Code Pro to 2.038
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 18:53:55 +01:00
Fini Jastrow
8b92cbaf56 Update Roboto Mono to 3.0
Not adding the 'ExtraLight' weight.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 18:53:25 +01:00
Fini Jastrow
1a242e9540 Update Overpass to 3.0.5
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 18:26:05 +01:00
Fini Jastrow
1868c68c8b Update MPlus to ... current
They started with new version numbering and have different version on
each subset.

The complete naming set changed. See their website to find the font you
used before.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 17:05:54 +01:00
Fini Jastrow
a9270a8437 Update mononoki to 1.6
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 16:19:12 +01:00
Fini Jastrow
21aafd5620 Update Lilex to 1.100
Light has been dropped upstream.
We drop the otf variants, original design is a ttf.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 15:26:37 +01:00
Fini Jastrow
160f045d02 Update Literation to 2.1.5
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:58:06 +01:00
Fini Jastrow
b5f41db164 Update Iosevka to 21.1.1
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:47:01 +01:00
Fini Jastrow
136b855971 Update Hermit to 2.0
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:47:00 +01:00
Fini Jastrow
1142815f23 Update Go Mono to 2.010
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:47:00 +01:00
Fini Jastrow
4f6fcfe69a Update Fira Mono to 3.206
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:46:59 +01:00
Fini Jastrow
49dd8c70c1 Update readme
Forgot to include this in the previous commits and accidentially pushed
them directly to master.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 14:46:59 +01:00
Fini Jastrow
adb3a8587a Update DaddyTimeMono to 1.2.3
Add config.cfg to keep ttf instead of following the upstream switch to otf.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 12:33:36 +01:00
Fini Jastrow
0d272cd39b Update IBM Plex to 2.3
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 12:14:59 +01:00
Fini Jastrow
c1b67d444e Update Arimo to 1.33
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 11:55:26 +01:00
Fini Jastrow
d5bb490d05 Update: Agave to v37
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-21 11:31:27 +01:00
Fini Jastrow
ad7cf8fadd CI: Run lock.yml only once a week
[why]
After the initial locking of many issues (where we called the workflow
once every hour, it can only process 50 items in one run), this high
frequency is not needed anymore.

[how]
Just search for old closed issues once a week on monday morning.
Also remove manual trigger.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-14 01:58:08 +01:00
Fini Jastrow
1fa53bc9cc Lock closed issues
[why]
Sometimes people comment on (long) closed issues because they have
similar problems. But that is often just a me-too, and all the details
to reproduce the issue are missing.

[how]
Lock old closed issues and add some comment that a new issue should be
opened instead.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-12 23:02:02 +01:00
Fini Jastrow
dcaff0f4c6 Regenerate CSS and glyphnames
[why]
Some names have been fixed.
The json data file has been changed.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-12 21:17:08 +01:00
Fini Jastrow
83b3d02d41 generate-css: Add codepoint to glyphnames.json
[why]
Just having the characters themselves as data for the name is convenient
in some cases; but sometimes the codepoint is also nice. And it
certainly improves the human interaction / check of the file.

[how]
Include the character and the codepoint in the glyph-name data. This is
a breaking change. But given that the json file is rather new I believe
we can get away with it.

Sorry for the inconvenience for all the early adaptors that already use
the old/previous format. But now we are more future proof and can add
even more data without breaking old json code.

Related:
https://github.com/ryanoasis/nerd-fonts/issues/1140
https://github.com/kovidgoyal/kitty/issues/2972
https://github.com/chrisbra/unicode.vim/issues/39
https://github.com/ryanoasis/nerd-fonts/issues/448
https://github.com/nvim-tree/nvim-web-devicons/issues/192

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-12 21:17:08 +01:00
Fini Jastrow
7e2d38b55a Fix some glyph names
[why]
Some glyph names in the CSS/cheat-sheet/json database are wrong.

[how]
For the wheather icons: Check against the glyph names in the original
repo's CSS.
For the Octicons: Check against glyph name in the symbolfont.

Did not check all glyphs, just the two reported ones.

Fixes: #1146

Reported-by: page-down
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-12 20:47:49 +01:00
Finii
3b1f127a0d [ci] Update FontPatcher.zip 2023-03-10 11:38:46 +00:00
Fini
4b66c819d5
Merge pull request #1125 from ryanoasis/feature/add-box-drawing
Add box drawing glyphs
2023-03-10 12:35:45 +01:00
Fini Jastrow
9834207159 font-patcher: Do not add Box drawing glyphs on propo fonts
[why]
It does probably not make too much sense to add the box drawing glyphs
to proportional fonts. The boxes that are drawn need to be filled with
some text, and if that does not have monospaced property the box will
always look ugly and not fit and change when the font is changed.

[how]
Make the fact if we detect a source font as monospaced or not a property
of the patcher object.

Always determine that property (before we just determined it when the
target font should have monospaced behavior).

Use that new property to enable/disable the box drawing glyphs.

In a way it is now also prepared to add that as command line parameter
should the need for that arise.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-10 12:32:05 +01:00
Fini Jastrow
7b4d83c2f3 font-patcher: Disable exising box glyph rescaling
[why]
Normally the 'cell' size should not change on patching. If the 'cell'
size does not change we do not need to rescale the box glyphs. They
probably worked before, they work the same afterwards.

Another reason to disable this is Cascadia Code. It has box drawing
glyphs that extend for more up then the normal cell. If we rescale that
to fit a probably new cell size we get a 'midline' that is too low
(because the upper stems are longer).

[how]
Leave the code in, but disable 'just scale do not copy' mode.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-10 12:32:05 +01:00
Fini Jastrow
2d316225fb font-patcher: Improve warnings
[why]
We have 2 different types of metrics warnings. When one warning has been
issued the other is not displayed (if it would trigger). The reason was
that I thought normally there would be no warnings and if someone would
have to inventigate the sourcefont anyhow.

[how]
But the warnings are quite common, so differentiate a bit more when
generating.
Also improve one warning message to make clear what the warning is
about.

And fix the assignment of advance width to width; which has no
consequence because it is never used (at the moment). But it was
obviously wrong.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-10 12:32:05 +01:00
Fini Jastrow
e31bdaa071 font-patcher: Fix block scaling
[why]
The greys seem to be too small.

[how]
Separate the blocks into real block, greys and quads. They all have
different scales in Hack which we use to patch in.

If we do not patch in and just scale existing glyphs these three groups
should always be sufficient.

Note that in Hack the quad block 2597 is too small; we could have scaled
it together with the blocks group, but that would raise issues with well
behaved fonts that we just scale and not patch in.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-10 12:32:05 +01:00
Fini Jastrow
964a0c8eb3 font-patcher: Fix alignment with overlap
[why]
Some few glyphs get a wrong left side bearing in `Nerd Font`:
    E0C2: -1230
    E0C5: -857
    E0C7: -667
    E0CA: -1230

These are the powerline glyphs which are right aligned and have overlap
and a target width of 2 cells wide.

[how]
To simplify the code add a new function that decides if a symbol shall
be one or two cells wide.
That function is then used where we had explicit tests already.

Use the function also in the overlap correction code, such that the
overlap is corrected for the right cell occupancy of the concrete glyph.

[note]
I guess that the overlap correction for 'c' alignment for 2 cell wide
glyphs is also broken. But we do not have such glyphs, so we ignore it
for now :-}

This fixes the previous commit 'font-patcher: Fix overlap for align c and r'.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-03-10 12:32:05 +01:00
Fini Jastrow
acd49cc33c font-patcher: Fix overlap for align c and r
[why]
The box drawing glyphs (center aligned) and some Powerline glyphs (that
are right aligned and have a limited xy-ratio) are positioned wrong.

Affected are all box drawing glyphs (e.g. 2548) and some Powerline
glyphs (i.e. E0B2, E0B6, E0C5, E0C7, and E0D4).

[how]
The box drawing glyphs are center aligned and have overlap. The code
does not correct the overlap (left bearing) but uses the default case of
'make the left bearing zero'. The code does just check left aligned
glyphs and not center aligned ones.
Add the correct overlap for center aligned glyphs (i.e. half the
overlap).

The Powerline glyphs are right aligned. Usually that works, because the
glyphs are created with the right size, so that no additional
manipulation is needed.
But if the glyph has a ratio limit the resulting size will be different.
We could in fact fix the size code, somehow, but that is rather
complicated, formula-wise. Instead we just scale these glyphs (which are
the 5 listed above) and shift them to the right position such that the
correct overlap results.

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