Type "S/" to make the "$" appears written in the X font. How to make it?

How do I make a Typed String Trigger that turns a sequence into a letter that is written in a specific font?
Just to put in contest: I write some tests that use some symbols on them, and those symbols I have on my Mac as a font. So some letters on this font are in fact those symbols that sometimes I use. I wish to make a letter be written with a specific font when I type a sequence of letters, so that I don't have to manually chance the font all the time.
For example: type "S/" to make the "$" appears written in the X font.
Is that possible?

To be able to specify the font you need to paste styled text. So use the Insert Styled Text by Pasting action.

One issue you will have is that this will actually change your font, and further typing will be in this font. So you may want to do something like:

  • Type a Space
  • Type a Left Arrow
  • Insert Styled Text by Pasting
  • Type a Right Arrow.
  • Type a Delete (this is optional and may or may not work to retain the original style depending on the target application).

Hello @Lrateke, it took me a while to find a working solution for myself.
In my example I would like to have the text written in red while writing. The macro is a bit like @peternlewis described it:

Red.kmmacros (14,3 KB)
Red

In action it would look like this:

ScreenFlow

To get back to the original font (size), I write the following word in red again and then convert it again with this macro:

Black : Font.kmmacros (13,1 KB)
01%20PM

For your purposes (font) you have to change this in the first macro

I found this handy tip when I wanted a macro to type a 0 (zero) in the font Menlo, which has a slashed 0. Works perfectly.

I'd also like to have the macro's title be a slashed 0. Is there a way to specify a font in the title of the macro?

Just rename the macro to "Red Arial" and the change the "Font" attribute in the "Apply" action to "Arial."

I'm not sure why you would want to "specify the font name in the name of the macro", but if you renamed the macro to "Red Arial" then you could also replace the "Apply" action in the macro with:

...and in this case you could specify either Arial or Baghdad in the name of the macro and the font would be set to match it. I'm not sure it makes sense to do that, but it should work.

I have a Menu Glyphs section in the status menu that looks like this:
(I faked the slashed zero with option+shift+O, which is actually an uppercase O with a slash.

Screenshot 2024-11-18 at 6.12.50 PM

Okay, after rereading your posts a few more times, I finally understand your question. You want the system font used on the system menu to be changed. But macOS does not let you change the system font, as far as I can tell from googling. It seems it uses the font called San Francisco. I searched through the font (it's huge) and found a zero with a slash through it here....

image

If you can change your keyboard input source to "Unicode Hex Input" then you should be able to switch the input method in the menu bar to "Unicode Hex Input" and then you can type the Zero/Slash character by typing OPTION+0+0+3+0. But I just installed Sequoia today and it isn't showing that input method for me. Maybe you have an older version of macOS that will work. You can give this idea a try if you like.

No, not the whole system font, just the title of that one KM macro. I'm satisfied with the slashed uppercase O to provide a visual reminder of what the macro does.

Aside:
In the old days, an annoyance hack people mentioned was to change the system font to Zapf Dingbats on someone's Mac.
(I was a technical reviewer for ResEdit Complete Second Edition.)

I don't think macOS allows you to change a portion of the macOS Menu Bar or a small part of the Menu Bar's submenus. In fact, the more recent the version of macOS, the harder it is to change the font at all. You didn't say which version of macOS you are using. The older it is, the better chance there is of getting what you want.

Remember, it's not KM that is displaying those menus, it's macOS. KM can do only what macOS allows through its APIs.

Did you try my advice regarding the Unicode Hex Input method?

Unfortunately that code is for Zero, and gets you whatever the font has for that glyph. There is no additional "slashed zero" code point, and the closest you'll get for fonts that don't have a slashed zero is a "zero with combining solidus".

Easy enough for a "Display Text" window:
image

...and if you "View" that action you can Copy the character then Paste it into the macro name.

@S.Hart -- the above isn't fully tested, but the slashed-zero certainly shows in the name in KM's "Cancel Macro" menu item, so I'm hopeful...

Shuffles feet sheepishly...

That's unexpected, because I got that code by clicking on the "slash zero" inside the Font Book application. Upon double checking, you are right. But the names of the two zero characters do differ. The slash zero has the name zero.1.sc while the zero has the name zero.sc.

Same here, and I have no clue what's going on -- some OS variant, perhaps, where you can call for char(zero) for one and char(zero.1) for the other, but both are still 0?

And I have even less of a clue as to how we mortals can access that glyph.