1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-13 17:18:37 +02:00
Commit Graph

1744 Commits

Author SHA1 Message Date
Fini Jastrow
122bbae54b font-patcher: Set Panose on "Nerd Font" variants
[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>
2023-02-01 18:19:19 +01:00
Fini Jastrow
cdd64ae8a1 Remove old script duplicate
[why]
query_monospace is newer.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-02-01 17:53:12 +01:00
Fini Jastrow
660aa80013 Mark old MDI as obsolete on cheat sheet
[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>
2023-02-01 13:49:32 +01:00
Fini Jastrow
72b9ec663b Fix font previews
[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>
2023-01-30 08:29:04 +01:00
Fini Jastrow
0a7d64b31c install.sh: Fix installing more than 2 fonts
[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>
2023-01-28 20:07:11 +01:00
Fini Jastrow
a046d98349 font-patcher: Forgot to increase script version
This is important for the docker image so that we can easier see which
version the people use.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-28 15:46:10 +01:00
Fini
f28295b2ff
Merge pull request #1089 from ryanoasis/bugfix/protect-stylistic-sets
Do not destroy ligs or SS
2023-01-28 15:43:50 +01:00
Fini Jastrow
202bca8be1 font-patcher: Fix empty lines output
[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>
2023-01-28 15:26:34 +01:00
Fini Jastrow
299fc76096 font-patcher: Do not destroy ligs or SS
[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] #711

Fixes: #901

Reported-by: Xiangyu Zhu <frefreak.zxy@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-28 12:41:28 +01:00
Fini Jastrow
59be26d8c2 docs: Update Arch package links
[why]
All/most fonts are now available as Arch Community packages and not as
AUR anymore.

[how]
Instead of listing all individually link to search page.
Make sure the Symbols Only font in Community is also found.

Fixes: #1057

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-27 16:35:59 +01:00
Fini Jastrow
b94dd2ca2d CI: Fix contributor update
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-27 15:44:14 +01:00
Fini Jastrow
7d79a489eb CI: Create CI for contributors update
[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>
2023-01-27 15:34:25 +01:00
Fini Jastrow
1ed2faccfa Rewrite update-contributors
[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>
2023-01-27 15:19:20 +01:00
Fini Jastrow
7e3b7fb6be Repatch SourceCodePro-Italic
[why]
Italic font files were all corrupt, fixed by previous commit.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-27 09:03:27 +01:00
Fini Jastrow
b1439b1e48 SourceCodePro: Remove obsolete font
[why]
In the course of #271 the source for SourceCodePro switched: Before we
used SourceCode Powerline [1], afterwards the original one [2].

One font file has been forgotten, as the font files were differently
named in both variants.

This caused issed with parallel build in the CI and font tweaking (which
is done as additional process after the actual patching).

[note]
[1] https://github.com/ryanmcilmoyl/sourceCodePro-Powerline
[2] https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro%2F1.050R-it

Maybe, this is not entirely clear, and the 'Powerline' variant does not
have an Italic style.

Fixes: #1084

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-27 09:03:27 +01:00
allcontributors[bot]
07c0f0b2b4 docs: update .all-contributorsrc [skip ci] 2023-01-26 21:03:54 +01:00
allcontributors[bot]
a2b1075eda docs: update CONTRIBUTORS.md [skip ci] 2023-01-26 21:03:54 +01:00
Goooler
5f03997c78 No need --cask params anymore 2023-01-26 21:03:07 +01:00
Finii
d7ea8e5717 [ci] Rebuild original-source font 2023-01-26 19:16:21 +00:00
Fini Jastrow
85e37e754f Fix: Fix JetBrains Mono Family names (repatch)
[why]
The JetBrains Mono family names are still broken.

The commit
  b98c2a19  Fix JetBrains Mono Family names

did not do much, because it was not activated with gotta-patch-em.
The previous commit fixed that.

Put the fonts in the repo are still wrong. Repatching those gives a
chance to test them properly before v3.0.0.

[how]
Run gotta-patch-em with version set to v3.3.3-p6 because thats the git
status right now.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-26 20:12:06 +01:00
Fini Jastrow
c21a590f1a patch-em-all: Fix ignored config.cfg
[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>
2023-01-26 20:12:06 +01:00
Fini Jastrow
10f43c7b95 Fix various otf/ttf globs
[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:
  2ace3de8
  e7722458
  821ac681
  7bc729e2

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-26 09:36:27 +01:00
Fini Jastrow
643cf84240 cheat-sheet: Add tooltip to copy hex code
[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>
2023-01-25 20:13:32 +01:00
Fini Jastrow
bd9258d654 Update changelog to v2.3.3
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-25 09:40:32 +01:00
Fini Jastrow
0fd5144fca Remove travis shield
[why]
Travis stopped working in 2021, and we would need to set up a new thing
somewhere else.

The shield is always red (because Travis stopped working at all), which
does not look good ;-)

See also #212

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-24 20:38:29 +01:00
Finii
12a523c32d [ci] Regenerate CSS files 2023-01-24 16:10:22 +00:00
Finii
bd93a872a6 [ci] Rebuild patched fonts 2023-01-24 16:00:47 +00:00
Finii
ab3f4f0585 [ci] Bump release version 2023-01-24 15:56:06 +00:00
Fini Jastrow
50c54b2f5d Trigger Release 2.3.3
Also correct some metadata in package info.

Reason for this bugfix release is problem we had with 2.3.2 and Symbols
Only font. Tried to fix the release retroactively but Arch was faster.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-24 13:52:10 +01:00
Fini Jastrow
28dd7f2679 Revert "DEBUG: "commits
[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>
2023-01-24 13:49:32 +01:00
Fini Jastrow
8a749ab210 patch-em-all: Fix missing licenses
[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>
2023-01-24 13:42:09 +01:00
Fini Jastrow
00752430e3 gotta-patch-em-all: Rename repo-root-dir variable
[why]
The name `parent_dir` is a bit misleading and not precise.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-24 13:38:46 +01:00
Fini Jastrow
d9a2f1ad28 gotta-patch-em-all: Simplify pathnames
[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>
2023-01-24 13:38:46 +01:00
Fini Jastrow
1bada00ed6 gotta-patch-em-all: Allow initial -i runs
[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>
2023-01-24 13:38:46 +01:00
Fini Jastrow
40f6990282 DEBUG: Show directory contents 2023-01-24 00:50:22 +01:00
Fini Jastrow
9e3fdefeba DEBUG: Add more of original workflow 2023-01-24 00:36:36 +01:00
Fini Jastrow
5e8b8c6ed5 DEBUG: archive-fonts.sh
[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>
2023-01-24 00:16:09 +01:00
Fini Jastrow
b385918d99 Rebuild Symbols Only fonts after hotfix
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-23 18:57:40 +01:00
Fini Jastrow
4939ac596a Fix Symbols Only metrics
[why]
Fontforge fails to set our calculated values if the sfd contains strange
date.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-23 18:52:50 +01:00
Finii
0ed1d0be58 [ci] Regenerate CSS files 2023-01-23 14:55:47 +00:00
Finii
a0d6b7ebcd [ci] Regenerate fontconfig 2023-01-23 14:55:16 +00:00
Finii
79bdb0c8a5 [ci] Rebuild patched fonts 2023-01-23 14:45:53 +00:00
Finii
62842ec851 [ci] Bump release version 2023-01-23 14:41:11 +00:00
Fini Jastrow
337a2a2759 Update sankey diagram
[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>
2023-01-23 12:40:10 +01:00
allcontributors[bot]
e7c9630922 docs: update .all-contributorsrc [skip ci] 2023-01-23 09:31:08 +01:00
allcontributors[bot]
bcde6c3f59 docs: update CONTRIBUTORS.md [skip ci] 2023-01-23 09:31:08 +01:00
Fini Jastrow
d44088f56d Trigger Release 2.3.2
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-23 09:16:24 +01:00
Fini
bdf9c240c8
Merge pull request #1058 from nathanielevan/bugfix/altunicode
font-patcher: Cover alternate unicode encodings
2023-01-23 09:10:58 +01:00
Nathaniel Evan
e514906a9f font-patcher: Use list comprehension in refcheck
[why]
List comprehension helps with readability. Also add comments that
describe expected data structures of altuni and references. Also bump up
the patcher version number.

[how]
Use list comprehension. Add comments. Change the version number.
2023-01-23 08:12:15 +01:00
Nathaniel Evan
46e2fcf00d font-patcher: Optimize add_glyphrefs_to_essential
[why]
Using `continue` feels inelegant when there's a way to write the if
conditions in add_glyphrefs_to_essential() without necessitating the use
of `continue` while ensuring that the function still works as intended.

[how]
Change the `if` conditions and remove any usage of the `continue`
keyword in add_glyphrefs_to_essential().
2023-01-23 08:11:58 +01:00