Closed AirHeadsbuirse closed 2 years ago
Not at the moment. The font is hardcoded into the sources: https://github.com/floitsch/syntax-addon/blob/master/theme/theme.ts#L88
Theme support would solve this, so I'm closing this issue as a duplicate of #3.
If it's only for the Font support, maybe it could be done in a simpler (?) way, or at least a way that does not require you to support themes (which seems like a lot of work): simply don't replace the initial font of the code when formatting/highlighting code. That way the user is in charge of the font. Would that be easier ?
Typically, blocks want to be rendered with a fixed-width font, whereas the default of a document is typically variable width. Leaving the font unchanged is thus not really an option...
That said: as you said, adding theme support is significant work, and I don't have the capacity to do that anytime soon. So I'm open for an easy fix/work-around.
imho, it is a viable option: let the user decide what font they want. If they didn't change the font to a monospace font, they'll see it soon enough and simply select the code and modify the font, then all subsequent "colorize" command will just use that font they selected. Just mention this in the docs and you're done (or so to speak, I know it's easier said than done)
Is there a way to change what font the code is auto adjusted to on colorize?