Skip to content
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

font-patcher: Do not maximize heavy brackets in Mono #1232

Merged
merged 4 commits into from
May 12, 2023

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented May 11, 2023

font-patcher: Do not maximize heavy brackets in Mono

[why]
The added heavy brackets are maximized within the cell size as all
normal other symbols. But in fact they should not be maximized but
rather be the size of 'normal brackets'.

Furthermore they are all scaled individually, making the size
differences less.

With some proportional fonts the brackets look tiny.

[how]
Introduce new y-padding parameter (because a negative overlap also acts
in x direction, what we do not want (and it distorts)).

Pad the brackets with 30% (15% top and 15% bottom).

This is used for all fonts (monospaced or not) so that the new glyphs
fit nicely with the existing ones. For some definitions of 'nicely', but
that is as good as we can get with automatism. It's not worse than
font-fallback.

Fixes: #1229

Also done

Fixes some bug fixed along the way 😬

Requirements / Checklist

What does this Pull Request (PR) do?

Insert the heavy brackets more carefully (size wise).

How should this be manually tested?

Use the new generate-sample-set.sh and then fontforge with font-compare.

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

@Finii Finii added this to the v3.0.1 milestone May 11, 2023
@Finii
Copy link
Collaborator Author

Finii commented May 11, 2023

image

@Finii Finii force-pushed the bugfix/heavy-bracket-scale branch from cb0fa84 to b7f7a33 Compare May 12, 2023 07:31
@Finii Finii marked this pull request as ready for review May 12, 2023 07:31
Finii added 3 commits May 12, 2023 11:45
[why]
The config.cfg settings can be wrong if the to-be-patched font does not
set its own. The previous settings are never cleared, so that the flags
leak into the next font(s).

This is only relevant when the run is not parallel (i.e. no -j given) and
all fonts are patched sequentially in the same shell.
On parallel runs (like the release process) this is not a problem
because each patcher runs in its own subshell.

Signed-off-by: Fini Jastrow <[email protected]>
[why]
After changing something in the patch process it is unclear if all the
prepatched fonts will look ok later. It would be nice to produce one
font from each input font (and not the complete set of each of the faces
of that font) to have some hopefully representative example how symbols will
blend into the font.

[how]
Add a script with explicit list of representative fonts.
Evaluate the config.cfg and execute one patcher run.

Signed-off-by: Fini Jastrow <[email protected]>
[why]
When the Heavy Brackets are scaled we want them to be scaled according
to 'pa1!' (i.a. preserve-aspect, only-one-cell, scale-always).

This is not possible because the glyphs have a ScaleRule and that
always assumes pure 'pa' and nothing else.

[how]
When the first glyph of the group is encountered the group scaling is
determined. This now takes the stretch rule of THAT glyph (instead of
just 'pa') to prepare the scale of the complete group.
@Finii Finii force-pushed the bugfix/heavy-bracket-scale branch from b7f7a33 to 499d7a3 Compare May 12, 2023 11:01
@Finii
Copy link
Collaborator Author

Finii commented May 12, 2023

This has only effect in Nerd Font Mono fonts.

Hmm, changed the rule to pa1! (with !), so all fonts are affected, correcting commit msg

[why]
The added heavy brackets are maximized within the cell size as all
normal other symbols. But in fact they should not be maximized but
rather be the size of 'normal brackets'.

Furthermore they are all scaled individually, making the size
differences less.

With some proportional fonts the brackets look tiny.

[how]
Introduce new y-padding parameter (because a negative overlap also acts
in x direction, what we do not want (and it distorts)).

Pad the brackets with 30% (15% top and 15% bottom).

This is used for all fonts (monospaced or not) so that the new glyphs
fit nicely with the existing ones. For some definitions of 'nicely', but
that is as good as we can get with automatism. It's not worse than
font-fallback.

Fixes: #1229

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii force-pushed the bugfix/heavy-bracket-scale branch from 499d7a3 to fe7855f Compare May 12, 2023 11:10
@Finii Finii merged commit 3dfa80e into master May 12, 2023
@Finii Finii deleted the bugfix/heavy-bracket-scale branch May 12, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enlarged glphys in FiraCode Mono
1 participant