Skip to content

Optionally center most icons in 2 cell space - #2034

Merged
Finii merged 1 commit into
masterfrom
feature/center-2-cell
Jul 22, 2026
Merged

Finii merged 1 commit into
masterfrom
feature/center-2-cell

Conversation

@Finii

@Finii Finii commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

[why]
Except when a Nerd Font Mono font is created, i.e. for all non-mono fonts: The centered icons are centered within 1 cell space. If that is not big enough the icon is left-aligned (filling the left cell completely and a varying amount of the left part of the right cell).

Having vertical colums of these icons might look strange because a center alignment seems more natural in some situations.

[how]
A new experimental command line switch is added that switches the scaling for 'pa' stretch to stretch into 2 cells.

For the Powerline glyphs E0Ax the rules are changed to explicitely require scaling into 1 cell to prevent application of the new rule here.

To use this add --experimental center-wide to the font-patcher command line.

Fixes: #1330
Fixes: #2012

Requirements / Checklist

  • Read the Contributing Guidelines
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.
    Issue number where discussion took place: #xxx
  • If this contains a font/glyph add its origin as background info below (e.g. URL)
  • Verified the license of any newly added font, glyph, or glyph set. License is: xxx

What does this Pull Request (PR) do?

How should this be manually tested?

Any background context you can provide?

The implementation follows @rivy closely and takes @powerman's finding about E0Ax into account.

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

The re-centered glyphs have a dark blue mark:

image

Pomicons shifted slightly to the right, most Powerline glyphs stay where they are

image _Icons shifted to the right, so that they are center aligned on border of cell1 and cell2_

[why]
Except when a Nerd Font Mono font is created, i.e. for all non-mono
fonts: The centered icons are centered within 1 cell space. If that is
not big enough the icon is left-aligned (filling the left cell
completely and a varying amount of the left part of the right cell).

Having vertical colums of these icons might look strange because a
center alignment seems more natural in some situations.

[how]
A new experimental command line switch is added that switches the
scaling for 'pa' stretch to stretch into 2 cells.

For the Powerline glyphs E0Ax the rules are changed to explicitely
require scaling into 1 cell to prevent application of the new rule here.

Fixes: #1330
Fixes: #2012

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Finii force-pushed the feature/center-2-cell branch from 2918019 to 7874930 Compare July 22, 2026 20:50
@Finii
Finii merged commit 64b7726 into master Jul 22, 2026
4 checks passed
@Finii
Finii deleted the feature/center-2-cell branch July 22, 2026 20:58
@Finii Finii changed the title Center most icons in 2 cell space Optionally center most icons in 2 cell space Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CaskaydiaCove Regular: center wide icons within their cell? 🙏🏻 Is it possible to "center" glyphs which overlap a single cell by padding them?

1 participant