Getting glyphs in shortcuts

Post Reply
Panpata
Posts: 3
Joined: Wed Oct 29, 2025 6:51 pm

Getting glyphs in shortcuts

Post by Panpata »

I've been trying to get glyphs from a certain font in the shortcuts menu by editing shortcuts.json but I can't seem to get it done. This is what I've done so far:
- Loaded an OTF font via the main config file (it loads correctly).
- Tried get a certain glyph by using an icon name but the font doesn't seem to support it (apparently because it doesn't support ligatures)
- Tried to use a Unicode locator but normal 4-digit unicode (e.g. \u03B1) doesn't work, my glyph isn't defined as it's one of very many in the font.
- Tried to use an HTML numeric character reference (􀊢) but that just writes it as a string in the font i've loaded.

Is there a way to use the HTML character reference that I've missed? Or are there any plans to change the way the shortcuts are edited?
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: Getting glyphs in shortcuts

Post by hudiy »

Generally, that's exactly how it should work. A good example is Hudiy Symbols which is used in the main menu. Could you please check whether the Font Family name set in shortcuts config matches the loaded font? Sometimes items like Italic, Regular, or Bold get appended to the Font Family name. If you can, please upload the font and we'll test it on our side.
Panpata
Posts: 3
Joined: Wed Oct 29, 2025 6:51 pm

Re: Getting glyphs in shortcuts

Post by Panpata »

I already saw that the Hudiy symbol for Android Auto was defined as "\ue900". The issue is that there's so many glyphs in this font, I can't define the symbol in this way with my font.

The font does load properly, but when I try to define it as "􀊢", it just puts this exact string in the shortcut bar instead of the desired glyph.
Attachments
SF-Pro-Display-Regular.otf.zip
SF Pro Display Regular OTF
(1.46 MiB) Downloaded 56 times
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: Getting glyphs in shortcuts

Post by hudiy »

In JSON (the configuration file format used by Hudiy), you need to use a surrogate pair for symbols > U+FFFF.

For the \u1002A2 surrogate pair is \uDBC0\uDEA2

You can use e. g. this online calculator for conversion https://russellcottrell.com/greek/utili ... ulator.htm

More details about surrogate pair: https://www.unicode.org/faq/utf_bom and https://en.wikipedia.org/wiki/UTF-16

shortcuts.json:

Code: Select all

        {
            "iconFontFamily": "SF Pro Display",
            "iconName": "\uDBC0\uDEA2",
            "action": "volume_mute"
        }
sfpro.png
sfpro.png (20.77 KiB) Viewed 516 times
Panpata
Posts: 3
Joined: Wed Oct 29, 2025 6:51 pm

Re: Getting glyphs in shortcuts

Post by Panpata »

Thanks so much!

I actually came across this surrogate pair but I mean to recall it didn't work for me. I must have made a mistake. Thanks so much :) It's really enjoyable to work on this with good support!
Post Reply