Tinderbox Forum

Feature request: having a "pre-formatted font" option

Under Format -> Font, where we have options like Bold, Italic, etc, I was wondering if we could have an option for Pre-formatted or Code Font, etc.

Couple of reasons:

(1) For me: I end up using this a lot in my day-to-day work, when I’m noting down “snippets” that I’ll need to refer back to, and I frequently have to convert these to a monospaced font.

(2) For others: this is something a lot of “comparable” (but inferior!) tools like Bear, or other Markdown writers provide, in some way.

Not super-urgent, maybe something on the backlog?

A few existing possibilities

  1. Try the built-in “Code” prototype. File > Built-In Prototypes > Code. Remember that prototypes can inherit other prototypes, so you can use Code as the prototype for other prototypes, or all by itself for your notes.
  2. You can change the $TextFont for the Code prototype or any prototype this way:

  1. In a given note, or in your own “snippets” prototype, activate the ruler with Format > Text > Show Ruler. Activate the macOS font picker with ⌘T. Select the font you want – the image below is just an example of the process, not a recommendation for your case. Then in the Ruler use Styles > Other to define the font as a style, and save it to style favorites. This style favorite will be available in this note or from the ruler in any other notes you want.
  2. Or just use the font picker in whatever paragraphs you want to format in any given note.

Tinderbox provides access to standard macOS formatting tools rather than hardcoding one-off styles preferences into the Format menu.

1 Like

Is this monospace font for code snippets? I ask only because you need to think about all the ‘smart’ substitution mechanism for quotes, dashes, URL detection, etc. See Edit menu → Substitutions.

I think these substitutions are all ‘on’ by default at the beginning of the session. Only smart quotes can be controlled at doc level.

Anyway, what I’m surfacing here is whether the need is ‘just’ a mono-space font or disablement of ‘substitution’ process on that text when it is changed. I’m unclear if changing a font triggers substitutions as is the case when $Text is entered/edited Certainly, I don’t believe it is possible to suppress substitutions for ranges within $Text.

I think we might perhaps have an attribute $CodeFont or $AltFont that works like $TextFont. There are times when writing when I’d like to apply a second font for headings, or for quotations.

As Mark Anderson says, doing this perfectly is a lot of work. But doing it adequately might be practical…

2 Likes

Thanks Paul, this is good enough for what I had in mind.

(fwiw, yes, this does seem like a one-off formatting change, but “code font” is increasingly being included as “standard macOS formatting” in contemporary text editors and note-takers)

1 Like

Understood. At least there’s a stopgap for now.