-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid patching proportional sources #912
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Font needs to be checked |
Finii
force-pushed
the
feature/avoid-patching-proportional
branch
from
September 7, 2022 07:59
6b25d4b
to
e8362e8
Compare
Rebase on master, force push |
This was referenced Sep 8, 2022
[why] For some fonts with long names the fields are not long enough and for example a 'Mono' can not be seen. [how] Use same field widths as `name_parser_test2`. Signed-off-by: Fini Jastrow <[email protected]>
Finii
force-pushed
the
feature/avoid-patching-proportional
branch
from
September 24, 2022 13:36
e8362e8
to
d224b8e
Compare
Rebase on master (again), force push. |
Lets check all our source fonts: (Skip to next comment for summary)
|
Not monospaced source fonts:
|
All but
|
[why] When the source font is proportional we can not really create a monospaced (patched) font from it. The glyph width is for example very small for 'i' but wide for 'W'. The glyphs are all left aligned, leaving very strange separation between smallish glyphs. Even if we would center the glyphs, the look would be strange and completely differenmt from the source font's look. [how] For proportional fonts do not allow to patch with `--mono`. The fact if a source font is monospaced is determined by examining some (very few) glyphs. But testing all our source fonts in the repo shows that it is sufficient. Furthermore the Panose flag is checked and differences between the flag and what the glyph examination found are reported. The user can enforce `Nerd Font Mono` generation with double specifying the command line option `--mono --mono`. Still a warning will be issued. [note] Because `gotta-patch-em-all-font-patcher!.sh` does not really count the variations but calculates them in a separate loop it does not know anymore how many variations are created per family. The numbers are wrong. But probably we should count the result font files in the end anyhow. Because the information is not needed (in an automated manner) this is not corrected here. It seems wrong anyhow: total_variation_count=$((total_variation_count+combination_count)) total_count=$((total_count+complete_variations_per_family+combination_count)) Signed-off-by: Fini Jastrow <[email protected]>
Finii
force-pushed
the
feature/avoid-patching-proportional
branch
from
September 24, 2022 14:57
d224b8e
to
feafa89
Compare
Just changed the output a bit. And extracted code into function. Force push. |
LNKLEO
pushed a commit
to LNKLEO/Nerd
that referenced
this pull request
Nov 24, 2023
…g-proportional Avoid patching proportional sources
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If the to-be-patched font is not monospaced, do not allow creation of
Nerd Font Mono
variant.Requirements / Checklist
What does this Pull Request (PR) do?
The to-be-patched font is examined if it is monospaced or proportional. This is done by spot checking some glyphs. These are enough to identify proportional fonts in all the fonts we have in
src/unpatched-fonts
.Afterwards the information given in Panose is compared, just for informational purposes.
If a user is determined to create a
--mono
font the option can be doubled and then the font is patched anyhow(i.e.
--mono --mono
).How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
Fixes: #911
Screenshots (if appropriate or helpful)