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

1254 Commits

Author SHA1 Message Date
Fini Jastrow
7e92302c12 font-patcher: Be explicit what shall be transformed
[why]
In the patch loop we use two methods to do something with the glyphs
- the glyph object directly (i.e. font[codepoint])
- a selection of glyphs in the font

Using the selection is a bit anonymous and depends on lines far away
(where the selection is set); direct glyph access seems to be easier
understood and is used almost everywhere.

Direct glyph access can not be used for copy() and paste(), but for
everything else.

[how]
The direct glyph addressing is already in use almost for everything, but
not for the transform() calls. This is changed.
Now we transform a specific glyph and not 'all selected glyphs' (with
selection = that specific glyph).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-22 15:00:39 +01:00
Fini Jastrow
355a7c55a8 font-patcher: Remove unneeded code
[why]
The selection is never used.

Later in the code we use a sourceFont selection to paste the glyphs into
it, but that is selected just there, before, and locally not totally.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-22 14:59:03 +01:00
Fini Jastrow
a19800195a font-patcher: Copy selection instead of continuously regenerating
[why]
This is a TODO item. Well, two in fact.

The symbolFont's selection is used for two things
- the main loop to iterate over all glyphs to insert
- to select the one glyph that is actually copied over

Because the main loop uses iterators on the selection.
The iterator is not 'stable' but invalidates if the selection
is changed.
The current code therefor restores the old selection before the loop
jumps to the head again.

This design is not very robust.

[how]
We need the selection to copy the symbol glyph.

But we can rewrite the loop that it does not need the selection at every
iteration, but that the selection is copied into a list, and we loop
over that list - which is independent on a later selection state.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-22 14:50:08 +01:00
Ryan L McIntyre
725c9df524 Follow up changes for new Codicons glyph set 2021-12-22 05:47:28 -08:00
Ryan L McIntyre
db026dd5c9
reworks and simplifies issue template 2021-12-19 19:25:27 -08:00
Ryan L McIntyre
2bd851f24a
simplifies the PR template
* patcher is now tested in github action and other scripts soon to be
* other reading doesn't really make sense for PRs (more for issues)
2021-12-19 19:20:06 -08:00
Ryan L McIntyre
6c41bf7dfa Fixes a few issues brought up in #724 2021-12-19 11:12:08 -08:00
Ryan L McIntyre
1344d0a60f
Merge pull request #724 from ryanoasis/bugfix/markdown-contains-terminess
font info: Remove references to 'Terminess' from non-Terminus fonts
2021-12-19 17:57:51 -08:00
Fini Jastrow
7cbd58584e font info: Remove references to 'Terminess' from non-Terminus fonts
[why]
In some fonts, on in the `patched-fonts/` directory the font information
files contain an explanation why the font is called "Terminess" and not
"Termius" - but the font is neither.

Affected: DroidSansMono and Ubuntu (non mono)

I assume this is a 'I copied the info file over from an existing font
and just change the names' (but the source was unfortunately Terminess).

[how]
Manually remove the paragraph from all files that contain it which but
have another name altogether.

[note]
Not shure if they are autogenerated somehow, with for example
`standardize-and-complete-readmes.sh` ... but a `git grep` showed only
the files that are changed with this PR.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-18 14:39:52 +01:00
Fini Jastrow
5170911e3b font-patcher: Improve 'Mono' compatibility with Windows
[why]
Some of the patched Mono fonts do not turn up in the font chooser
of Windows CMD and PowerShell (and probably more).

[how]
For some reasons Windows does not identify the fonts as being strictly
monospaced, so they are hidden in that font choosers.

For the monospaced fonts we set now the Panose proportion 'monospaced'.
Windows seems to honor the Panose properties.

It is not clear why we need to set the old Panose props, especially as
Cascadia Code does not (!) set them and is still detected as monospaced.

Anyhow, the way Windows detects if a font is monospaced is a mystery (at
least for me), and this works, so ;-)

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-17 22:59:24 +01:00
Ryan L McIntyre
9107627e22 Fix docker build 2021-12-16 13:10:04 -08:00
Ryan L McIntyre
57ac514d7a
Update Dockerfile
quick attempt to fix docker build failing
2021-12-16 19:51:57 -08:00
Ryan L McIntyre
7eb5ce5926
Merge pull request #720 from ryanoasis/bugfix/cant-detect-extension
font-parser: Allow patching without --ext
2021-12-16 19:14:02 -08:00
Ryan L McIntyre
f9eda9fa2b
Merge pull request #710 from MarcelskyXD/master
Replace non-existent polish words with other words that do exist in readme_pl.md.
2021-12-15 21:16:53 -08:00
Ryan L McIntyre
c071421bc9
Update readme_pl.md
fix feedback
2021-12-15 20:51:26 -08:00
Ryan L McIntyre
a457461cdd
Merge pull request #711 from ryanoasis/bufix/ligature-leftover
font-patcher: Remove obsolete metadata on glyph exchange
2021-12-15 20:46:33 -08:00
Wyatt Anderson
f081dcf715 Update .dockerignore to ensure glyphs are included
[why]
This fixes the Docker image build after changes in 9633b4d moved
PowerlineSymbols.otf into a subdirectory. Previously, the
.dockerignore line for src/glyphs/*.* would exclude any
subdirectories in src/glyphs from being included. Without this
change, a complete font build fails.
2021-12-15 19:26:21 +01:00
Fini Jastrow
f6b6174680 font-parser: Allow patching without --ext
[why]
Sometimes fontforge returns None for font.path. That should not be the
case according to specs:

font.path
    (readonly) Returns a string containing the name of the file from
    which the font was originally read (in this session), or if this
    is a new font, returns a made up filename in the current directory
    named something like “Untitled1.sfd”. See also font.sfd_path.

This seems to be the case for fonts that do not have a fullname set.
I did not search for nor file any issue at Fontforge.

[how]
In fact we already have the original font file name, and we want to
retain its extension anyhow (if nothing is specified), so we use the
filename that we opened to determine the extension.

[note]
Related: #412
Related: #641

[note]
This was the sole usage of font.path.
Has been introduced with commit d8b760aee which looks uncritical.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-15 18:24:13 +01:00
Ryan L McIntyre
329082d9da
Update license-audit.md 2021-12-14 15:14:56 -08:00
Fini Jastrow
ef38ad6324 font-patcher: Remove obsolete metadata on glyph exchange
[why]
When we overwrite a glyph that originally had some special handling, be
it a substitution or position table entry (GPOS/GSUB), that special
handling is usually not appropriate anymore and has to be removed.

If we need special lookup table entries for the new glyph we would have
to add them later anyhow, because we can not rely on their existance.

In Issue #509 it was a ligature entry, that replaced 'f' followed by 'i'
with the 'fi' ligature. The ligature glyph is overwritten by us with a
telephone symbol and the substitution table entry makes no sense
anymore.

[how]
If we overwrite a preexisting codepoint we remove it from all lookup
tables.

Thanks to all other reporters with details.

Fixes: #509 #254

Reported-by: mangelozzi <mangelozzi@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-13 16:55:48 +01:00
Marcelsky
2395214d21
Update readme_pl.md 2021-12-13 10:01:36 +01:00
Marcelsky
c36363b7fa
Update readme_pl.md 2021-12-13 09:59:26 +01:00
Marcelsky
fdb45bba7d
Update readme_pl.md 2021-12-13 09:58:47 +01:00
Marcelsky
424c4be114
Fix 2021-12-13 09:57:16 +01:00
Marcelsky
afdb31c602
Modify readme_pl.md to replace "Fonty" <--(that word doesnt exist) with "Czcionki" 2021-12-13 09:54:50 +01:00
Ryan L McIntyre
97f28f4a17 Fix info and license generation going to incorrect files 2021-12-11 13:43:48 -08:00
Ryan L McIntyre
2d03a39223 Improves structure and hopefully automated patching of symbol only nerd font variations
* relates to issues #479 #668
2021-12-11 13:43:47 -08:00
Ryan L McIntyre
e323f2991a
Merge pull request #693 from ryanoasis/feature/set-sfnt-version
font-patcher: Set SFNT Version
2021-12-11 17:42:42 -08:00
Ryan L McIntyre
d72b772cb5
Merge pull request #704 from gitfool/gh697
Update Fira Code to latest version
2021-12-11 17:32:31 -08:00
Ryan L McIntyre
0078253d35
Update LICENSE
partially addresses #266
2021-12-11 16:32:21 -08:00
Ryan L McIntyre
9633b4d362 License audit work to fix some licensing issues in #266 2021-12-11 08:10:08 -08:00
Ryan L McIntyre
775952fa02 Fixes #709 invalid VF font included 2021-12-11 08:08:13 -08:00
Ryan L McIntyre
f33b0298fd
Merge pull request #692 from ryanoasis/bugfix/fstype-font-does-not-open
font-patcher: Reintroduce fsType fix
2021-12-11 11:16:39 -08:00
Ryan L McIntyre
f943e8ec81
Merge pull request #593 from Finii/bugfix/use-correct-source-font-metrics
font-patcher: Use correct source font metrics
2021-12-11 10:32:34 -08:00
Ryan L McIntyre
d8a1586885
Merge pull request #708 from ryanoasis/all-contributors/add-HarshalRathore
docs: add HarshalRathore as a contributor for translation
2021-12-07 22:27:52 -08:00
allcontributors[bot]
7fc875e6e0
docs: update .all-contributorsrc [skip ci] 2021-12-07 05:37:29 +00:00
allcontributors[bot]
f474c7740c
docs: update CONTRIBUTORS.md [skip ci] 2021-12-07 05:37:28 +00:00
Ryan L McIntyre
dc0256b929
Merge pull request #707 from HarshalRathore/master
Added Hindi version of readme.md.
2021-12-06 21:14:36 -08:00
Sean Fausett
6ddc91c2e2
Add patched FiraCode v6.2 2021-12-07 12:16:06 +13:00
Sean Fausett
78be0e1e74
Add unpatched FiraCode v6.2 2021-12-07 12:14:51 +13:00
Harshal Rathore
2fa089885d Added Hindi version of readme.md
Signed-off-by: Harshal Rathore <harshalrathore2014@gmail.com>
2021-12-07 00:04:10 +05:30
Ryan L McIntyre
95dcd54eac Adds backers 2021-12-05 14:00:27 -08:00
Ryan L McIntyre
cc24e8b005 Adds workflow for testing out patcher 2021-12-05 07:54:47 -08:00
Ryan L McIntyre
bbe254334d
Merge pull request #699 from ryanoasis/feature/enhance-open-error-msg
font-patcher: Give meaningful error messages on trivial open fails
2021-12-04 16:13:12 -08:00
Charles Strahan
96ab7f6ef7 add support for codicons
Closes #620
2021-12-04 16:44:01 -06:00
Sean Fausett
0417406a4c
Fix patched font extras 2021-12-04 16:30:03 +13:00
Sean Fausett
fa024b3b01
Add patched FiraCode v6.1 2021-12-04 14:54:31 +13:00
Sean Fausett
20d72ea4a7
Fix vs code dev container 2021-12-04 14:53:59 +13:00
Sean Fausett
d23d0e0089
Add unpatched FiraCode v6.1 2021-12-04 14:36:29 +13:00
Fini Jastrow
3384fc302c font-patcher: Give meaningful error messages on trivial open fails
[why]
When the font file is not existing the message we get is either
unreadable or missleading (at least for normal users).

[how]
Explicitely state why we can not open a font file, at least in the cases
where we can.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-11-30 07:58:12 +01:00