This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

statusbar icons override alphanumeric characters

Message ID
DKIM signature
Download raw message
I came across your repo for statusbar icons on sourcehut and thought it might be nice to use in SXMO, or maybe generically in sway on the desktop.

The only issue is that when I set it as my font for the statusbar in (with another as the fallback), the fallback doesn't get triggered for a-z_0-9%.

(It's quite important for at least the numbers to get rendered in the swaybar because they indicate current workspace). Maybe someone who knows more about fonts can advise: if we remove these glyphs from the sfd then the font can't make ligatures out of those characters.


(I'm interested in this for my own project, but I'd love if I could get yours to work first.)


[PATCH] Scripts: Enable patching out invisible glyphs with another font

Message ID
<CJC4QYV8SGNG.OKX5M04JW8WM@zach-macbookpro121> (view parent)
DKIM signature
Download raw message
Patch: +27 -0
This is useful for mixing icons with text
without changing fonts midway through.

Only the blank glyphs are removed, so the rest need to be referenced from the donor font directly.

    font="DonorFont-statusbar, DonorFont"
in your application is an easy way to configure it.

Or that could be handled by fontconfig as an alias (see `man fonts.conf`)
 patchicons.pe | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 patchicons.pe

diff --git a/patchicons.pe b/patchicons.pe
new file mode 100755
index 0000000..594f1a9
--- /dev/null
+++ b/patchicons.pe
@@ -0,0 +1,27 @@

if ( $argc != 3 )
	Print("Replace blank glyphs with those from another font.")
	Print("Usage: " + $0 + " 'statusbar.sfd' 'DonorFont.ttf'")

# Copy from the donor font.
Select("%", "%", "0", "9", "_", "_", "a", "z");
weight = $weight
copyright = $copyright
version = $version
macstyle = $macstyle

# Paste into statusbar.
Select("%", "%", "0", "9", "_", "_", "a", "z");
name = $2:t:r + "-statusbar"
SetFontNames(name, name, name, weight, copyright + "statusbar:" + $copyright, version + "-" + $version)

# Save into current directory as new font.
Generate("./" + $2:t:r + "-statusbar.otf")
Reply to thread Export thread (mbox)