Tinderbox Forum

Feature request: Toggle menu Format > Font > Code

Hi, I use menu Format > Font > Code a lot and like to toggle Code with it.

Current behavior:

  • To change the used font to $CodeFont:
    Use Format > Font > Code

  • To change the used font back to $TextFont:
    Use Format > Style > Standard Font

Desired behavior:

  • To change the used font to $CodeFont:
    Use Format > Font > Code

  • To change the used font back to $TextFont:
    Use Format > Font > Code, i.e. use it to toggle.

Even with shortcuts it’s a bit distracting to use two separate menu items to turn Code on/off. A toggle behavior would make it behave like Bold, Italic or Underline and make it a lot easier to use it.

@eastgate would this be possible?

Possible, certainly. The difficulty, of course, is that fonts are not traits like Bold or Italic. For example, what would happen if part of the selection is in Code Font, part is in the default text font, and part is in SomeOtherFont Extended?

Code would overwrite all other fonts, just like Standard Font does now.

In your example using menu Code would apply Code font to the selection. On second use it would apply Standard Font.