Commit graph

2197 commits

Author SHA1 Message Date
Fini Jastrow
1563df5bd7 lib: Clearly mark i_material as obsolete
[why]
The Material Design Icons moved codepoints around the Nerd Fonts v3
transition. In the latest v2.x releases both codepoint ranges were
present, and so we had the MD icons with different names and sets and
codepoints in two different i_*.sh files.

Since the old MD codepoints have been dropped the i_material.sh is not
actively used anymore - well, it is used to create the 'marked as
removed' entries in the cheat sheet.

That has not been properly documented here.

Reported-by: @midnightrocket:gitter.im
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-10-03 15:12:16 +02:00
Fini Jastrow
66c6d820a0 lib: Sort files mentioned in readme
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-10-03 15:11:23 +02:00
allcontributors[bot]
a8799f8260 docs: update .all-contributorsrc 2023-09-30 15:35:35 +02:00
allcontributors[bot]
2e8d4c9e33 docs: update CONTRIBUTORS.md 2023-09-30 15:35:35 +02:00
František Hanzlík
871dd80977 make patcher's readme wording slightly clearer 2023-09-30 15:35:21 +02:00
František Hanzlík
79c62aca27 fix readme alert syntax 2023-09-30 15:35:21 +02:00
František Hanzlík
ff08a1771a mention patcher family generation in readme 2023-09-30 15:35:21 +02:00
Fini Jastrow
090fbbeebe Sunset in-repo releases
[why]
We struggle with the pack-committing of patched fonts to the repository
on release. This makes our repo grow extremely big. It would be better
to just use release artifacts for the releases and not commit any
patched font back.
There were different approaches discussed, but the problem remains that
I personally have no rights to implement anything of that - neither can
I force push to the default branch, nor can I create new repos in the
organization.

[how]
To make it still possible to add new fonts without a repo size
explosion we do not release NEW fonts back to the repository as commits,
but old fonts are handled as before.
NEW fonts:
 * have a new property set in the fonts.yaml 'database'
 * are released as release artifact via release workflow (but not
   committed back)
 * get a readme in the patched_fonts/ directory that points to the
   release artifact page

The solution is not ideal, but for sure better than not adding any fonts
anymore or having the repo grow in size faster and faster.

At some point in time I would like to phase out all in-repo releases,
also for OLD fonts.

This scheme has been (manually) used / introduced for Intel One.
With this change the .gitignore file is automatically adapted to any new
font that is added with the repoRelease flag set to false (which should
be the default for any added font from now on).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 11:20:36 +02:00
Fini Jastrow
e398a3847c install.sh: Honor XDG_DATA_HOME
[why]
When a user sets the XDG_DATA_HOME environment variable the default of
$HOME/.local/share should not be used.

https://wiki.archlinux.org/title/XDG_Base_Directory

[how]
Enable XDG_DATA_HOME to override the default user data directory on Unix
and MacOS platforms.

There is some controversy if XDG_DATA_HOME should be honored on MacOS,
see for example platformdirs (link below). But me also working on Linux
and MacOS (and Windows) in parallel, I can not quite follow the
downsides and believe we should allow XDG_DATA_HOME also for MacOS.

Related: https://github.com/platformdirs/platformdirs/issues/4
Fixes: #1324

Suggested-by: Anthony Foglia <@afoglia>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 06:04:14 +02:00
Finii
4b11f751a1 [ci] Update FontPatcher.zip 2023-09-27 03:49:13 +00:00
Fini Jastrow
2ce56141db name-parser: Unify quotes used for strings
[why]
We use single quotes everywhere else.
Keep this consistent.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 05:46:33 +02:00
Fini Jastrow
99688c40c7 font-patcher: Introduce weight check
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue #1333 and PR #1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 05:46:33 +02:00
allcontributors[bot]
35259124bd docs: update .all-contributorsrc 2023-09-27 05:22:54 +02:00
allcontributors[bot]
59b1a54103 docs: update CONTRIBUTORS.md 2023-09-27 05:22:54 +02:00
Finii
4c6cabe3fa [ci] Update FontPatcher.zip 2023-09-23 09:28:59 +00:00
Fini Jastrow
3053972f86 font-patcher: Abort if fontforge did not generate patched font
[why]
Under certain circumjstances Fontforge can not create a font. As the API
does not give any feedback we trudge along afterwards giving confusing
messages.

One example is when the patched font contains too many glyphs.

[how]
Check if the patched font has indeed been generated and is not empty.

Fixes: #1342

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-23 11:25:11 +02:00
Finii
75f785402d [ci] Update FontPatcher.zip 2023-09-18 09:16:09 +00:00
Fini Jastrow
f81564fadf font-patcher: Fix typo in logger output
Fixes: #1350

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-18 11:12:35 +02:00
allcontributors[bot]
7c16ba76fa docs: update .all-contributorsrc 2023-09-18 10:10:16 +02:00
allcontributors[bot]
99aee5e9dd docs: update CONTRIBUTORS.md 2023-09-18 10:10:16 +02:00
Nicolas Epstein
d90ebadbed add :Z to other readmes 2023-09-18 10:09:19 +02:00
Nicolas Epstein
10a44e9be5 Add ":Z" options to volume mounts
Gives read-write access to the volumes. See https://web.archive.org/web/20190728100417/https://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/
2023-09-18 10:09:19 +02:00
allcontributors[bot]
7deaff60d0 docs: update .all-contributorsrc 2023-07-26 16:10:50 +02:00
allcontributors[bot]
cbc6ea882c docs: update CONTRIBUTORS.md 2023-07-26 16:10:50 +02:00
Fini Jastrow
bb4aeca8e7 standardize-and-complete-readmes: Fix broken links
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:55:15 +02:00
Fini Jastrow
f0d33e46f1 Add IntelOne patched (i.e. just readme)
This is a simulation of the release workflow.

    $ ./gotta-patch-em-all-font-patcher\!.sh -j /IntelOneMono
    $ ./archive-fonts.sh IntelOneMono
    $ git add ../../patched-fonts/IntelOneMono/
    $ git commit -s -m 'Add IntelOne patched (i.e. just readme)' -e

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:47:26 +02:00
Finii
1e79897553 [ci] Update FontPatcher.zip 2023-07-26 13:05:08 +00:00
Fini Jastrow
548cd4e493 IntelOne: Prevent in-repo-release
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
f29c62ab17 standardize-and-complete-readmes: Allow to link releases
[why]
Some fonts will not be released to the repo; but only exist patched as
release atrifacts. This needs adapted readmes.

[how]
If such a font is encountered direct links to the release archives are
put into the readme file.

Decide based on information in the font.json file.

If no info is found in the json file (i.e. all existing fonts) it
defaults to release-also-to-repo behavior.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
a2bd75865a standardize-and-complete-readmes: Simplify code
[why]
We have a lot duplicated code here.

[how]
As the to and to-dir never changes we can assign that outside all the if
cases.
We can also always just add the extra information to the (only one,
independent of number of incoming data files) output after all the ifs.

Note that this also adds the extra information if we had no readme at
all. Previous code would not add anything to that (for whatever reason).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
ebdcc0b746 IntelOne: Correct minor settings glitches
* The programmingfonts.org link was wrong
* The description has to be in abbreviated style

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
db9a71a270 generate-font-image-previews: Update Inkscape calls
[why]
Verbs have been dropped from Inkscape with version 1.2

[how]
Use actions instead. I'm not sure how well that works with older
Inkscapes now, but ... sigh

[note]
Also add missing helper for font filenames for Intel One Mono.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
74d6475c19 IntelOne: Change naming mode
[why]
-makegroups 0 is not a valid naming mode for releases. The mode is
deprecated and will be removed. Furthermore the mode can produce broken
patched fonts.

[how]
Mode 1 and 2 are too long for some NFP in the family name, so use mode 4.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
83dd4908d4 IntelOne: Unify README
[why]
We do not (try to) copy the upstream webpage, but instead link it.

Also add version information (well, there is no difference between
1.2.0 and 1.2.1, but 1.2.1 is the latest right now).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
d3181df01f name-parser: Add IntelOne replacement to SIL table
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
bac7332702 name-parser: Sort SIL table
No functional change

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Fini Jastrow
ee7ef924e2 IntelOne: Remove prepatched fonts
[why]
Patching process is unknown.
Patching has to be done by the CI.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-26 15:02:27 +02:00
Dennis Prazak
5d85a45a93 Add Intel One Mono 2023-07-26 15:02:27 +02:00
Finii
9eec949c02 [ci] Update FontPatcher.zip 2023-07-19 09:47:44 +00:00
Fini Jastrow
12b51f51e2 font-patcher: Allow blanks in '--name'
[why]
If a user specified a name we should probably not camel-casify it.

Fixes (idea mentioned in): #1319

Suggested-by: HUMORCE
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-19 11:41:03 +02:00
Finii
e181ef99c2 [ci] Update FontPatcher.zip 2023-07-17 10:00:52 +00:00
Fini Jastrow
64cf3e9d93 font-patcher: Add option to select postscript name as name source
[why]
In the post we used these information sources to determine the name and
weights/styles of the to-be-patched font:
* The filename
* The fullname (ID 4)
* The postscriptname (ID 6)

Usually it is best to use the Fullname of a font to determine its real
name and styles/weights:

The Postscript name has the advantage to have a hyphen between name and
styles/weight; but as it can not contain blanks the correct name can not
be determined by this. To get the styles/weights back we use a list of
all possible (?!) weights and styles and sort all the string parts.

This works reasonably well and the fullname is usually best.

Not so with Input Mono Condensed. Here are its names:
ID4: "InputMonoCondensed LightIta"
IF6: "InputMonoConsensed-LightItalic"

[how]
Add option to select between fullname and postscriptname as font naming
source.

For special purposes, also allow a custom (arbitrary) name input.
If that is given the specified name will be used to name the patched
font without adding any suffix - the user has full control on the name.

Fixes: #1314

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-17 11:58:21 +02:00
Fini Jastrow
2f5c6ab6c6 font-patcher: Correct --makegroups help
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-17 11:58:21 +02:00
Fini Jastrow
98c14701b0 font-patcher: Fix command line argument specs
[why]
A lot arguments need one user supplied value, but that is not enforced.
For example
    font-patcher src/unpatched-fonts/Agave/Agave-Regular.ttf --out

results in a crash, because the needed output directory has not been
passed, but the default is also not used.

The problem is that the option is defined to take any amount of values,
includeing zero values (and more than one value).
That all does not make sense. The switch does need exactly one value.

[how]
Remove the wrong nargs specification. Instead use the default, which is
'expect one value' for the default action 'store'.

Instead of a crash the user is now presented with this output:
    font-patcher: error: argument -out/--outputdir: expected one argument

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-17 11:58:21 +02:00
Fini Jastrow
ad8ee0ce2c Add Envy Code R patched
We still have no solution for releasing not in-repo.
"One last time"...

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-15 19:33:55 +02:00
Fini Jastrow
0eef3a89f9 complete-readmes: Do not detect blanks as "name change"
[why]
When we rename "Envy Code R" to "EnvyCodeR" this is detected as RFN
relevant name change, which it is not.

[how]
Compare the blank removed lower cased names.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-15 19:33:55 +02:00
Fini Jastrow
57f17e23bc Add font: Envy Code R (fix)
[why]
Forgotten change

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-15 19:33:55 +02:00
Fini Jastrow
9512cddd4f Add font: Envy Code R
The font has RFN, but we are allowed to use the patched name
"Envy Code R Nerd Font", see PR #1318.

Thanks go to Damien Guard!

Fixes: #1205

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-07-15 15:17:39 +02:00
Samuel Born
817f4d6214 Add "curl latest release" to download options 2023-07-15 12:03:38 +02:00
Finii
5ae07aba04 [ci] Rebuild original-source font 2023-07-15 12:02:37 +02:00