motform / stimmung-themes

emacs tuned to inner harmonies
GNU General Public License v3.0
121 stars 11 forks source link

Inherit from the `fixed-pitch` where necessary #18

Closed slotThe closed 2 years ago

slotThe commented 2 years ago

This could be a controversial one, so here we go!

Commit Summary

Use fixed-pitch font when applicable

In certain situations, we want to be sure to use a fixed pitch font, even when the user may have selected to use a variable pitch font for other elements on the screen (e.g., with variable-pitch-mode). This org-mode and markdown code, tables, as well as company popups.

README: Mention fixed-pitch face

Since some faces now inherit from the fixed-pitch face, it is important that users know they have to customise this if they want a consistent experience.

Screenshots

Org-mode and company

Before After
2022-05-08-181122_713x474_scrot 2022-05-08-175548_712x538_scrot

Markdown

Before After
2022-05-08-181322_714x371_scrot 2022-05-08-175616_729x417_scrot

Discussion

The TL;DR is that some users—this one included—quite like having variable-pitch-mode on in Org or Markdown buffers. A non fixed-ptich font, however, messes horribly with code or shudders tables and so these should be forced to use a fixed-pitch font (I didn't invent this, lots of themes do this already).

The reason that this might be controversial is essentially the description of the second commit:

Since some faces now inherit from the fixed-pitch face, it is important that users know they have to customise this if they want a consistent experience.

If users haven't customised this, it may result in an inconsistent font being used (even if they never used variable-pitch-mode), meaning that this is technically a breaking change. I still think it's worth it, but then again of course I woud, right? The modus-themes have an option for this for that very reason, if I remember correctly (modus-themes-variable-pitch-ui), but this always felt very heavy weight to me when it's something that users customise once.

motform commented 2 years ago

As always, a pleasure to to enjoy your work and your reasoning! I think you are correct and this is the most appropriate behaviour. The opt-in modus approach does speak to me in one sense, but I agree that it feels like a heavy handed solution and that this is an area where a more opinionated default goes well in line with the rest of the theme's "values". I really like how it looks in the screenshots, almost makes me want to incorporate some variable-pitch fonts myself!

The exposition in the README is great and should clear up any confusions.