~earboxer/public-inbox

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

statusbar icons override alphanumeric characters

Details
Message ID
<CJC4QYV8SGNG.OKX5M04JW8WM@zach-macbookpro121>
DKIM signature
pass
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.

https://git.sr.ht/~grmat/statusbar/tree/master/item/statusbar.sfd#L984

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

-Zach

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

Details
Message ID
<20220521032619.228604-1-zachdecook@librem.one>
In-Reply-To
<CJC4QYV8SGNG.OKX5M04JW8WM@zach-macbookpro121> (view parent)
DKIM signature
pass
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 @@
#!/usr/bin/fontforge

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

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

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

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