font-patcher: Prevent excessively tall icons in mono fonts #1564
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.
[why]
Very slender and tall icons will be scaled huge compared to their fatter neighbors. This happens for example to the chess pieces (
E25F
ff) or text style icons like italic (EB0D
).[how]
When a monospaced font is created use a slightly less tall cell height for all icons (except icons that have to match the actual line height).
This can be prevented by the new scale control character
^
that symbolizes maximized vertical size (height) within the real cell.The smaller cell (now called icon cell) is less tall than the line height, but higher than the cap height of the font; to prevent people complaining that the icons shrunk too much.
It is about 1/3 higher than the cap height compared to the line height:
This is NOT applied to the other Nerd Fonts fonts variants (i.e.
Regular
andPropo
) because all icons are generally a bit bigger than the cap height (no scaling down to fit into one advance width) and as the scaling is far less pronounced the slender-and-tall icons scale comparably and do not look out off place there.Suggested-by: Aaron Bell @aaronbell
Requirements / Checklist
What does this Pull Request (PR) do?
How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)
Some examples, prior left, with this PR right; glyphs marked blue by Fontforge: