-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Draft: font-patcher: Respect gap values in source font #943
Conversation
[why] We just ignore specified gaps in the source fonts (i.e. set them to zero). This reduces the line spacing in the patched font (because the gap is missing). [how] Distribute the gap INTO the cell, so that we can work with zero gap (we need that for the powerline glyphs), and still keeping the powerline glyphs centered about the regular glyphs AND keeping the total line spacing. Idea-by: Tushar Singh <tusharvickey1999@gmail.com> Fixes: #850 Reported-by: Joe Bolts Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
I tried the script, font looks identical to the original font Also I didn't have to use the flag to achieve this, may be flag(--preserve-gap) hasn't been added yet ? |
What does that mean? Of course the glyphs will not touch the top of the 'cell' anymore if we put half of the gap 'above' the glyph.
This is correct. I just threw in the code changes, with no (new) option. |
I'm sorry if I sounded confusing. I meant that it is now correctly aligned with line gaps as expected. |
Ok, so I will trudge on with the finer details of the PR, the 'main goal' seems fulfilled. Thank you. |
What is your terminal? |
That's alacritty. Yes, I checked out the feature branch and verified the code is there. Yes, if you could provide your test font that would be helpful as a reference. |
Perhaps alacritty modifies font properties and provides its own 'settings' to customize them? font:
# Normal (roman) font face
normal:
family: Noto Mono for Powerline
# The `style` can be specified to pick a specific face.
#style: Regular
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 0
y: 0 source: https://gist.github.com/Cogitri/e8d5c63818443f3c8f13cd7760fe77aa Take a look at: |
[why]
We just ignore specified gaps in the source fonts (i.e. set them to zero). This reduces the line spacing in the patched font (because the gap is missing).
[how]
Distribute the gap INTO the cell, so that we can work with zero gap (we need that for the powerline glyphs), and still keeping the powerline glyphs centered about the regular glyphs AND keeping the total line spacing.
Idea-by: Tushar Singh tusharvickey1999@gmail.com
Fixes: #850
Reported-by: Joe Bolts
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)
See Issue.