minad / org-modern

:unicorn: Modern Org Style
GNU General Public License v3.0
1.56k stars 48 forks source link

TODO and TAG character not at center when fontsize is changed #140

Closed Fmajor closed 1 year ago

Fmajor commented 1 year ago

I try to set different font-size for different org-level, e.g. like below

  (dolist
      (face
       '((org-level-1 1.7 "#81a2be" ultra-bold)
         (org-level-2 1.6 "#b294bb" extra-bold)
         (org-level-3 1.5 "#b5bd68" bold)
         (org-level-4 1.4 "#e6c547" semi-bold)
         (org-level-5 1.3 "#cc6666" normal)
         (org-level-6 1.2 "#70c0ba" normal)
         (org-level-7 1.1 "#b77ee0" normal)
         (org-level-8 1.0 "#9ec400" normal)))

Then i find that the font size of TODO, priority, timestamp and tags are unchanged and their background color height become larger and the font do not center in the background, which is kind of ugly. How can we handle this?

image

minad commented 1 year ago

The vertical alignment of the labels depends on your font and sizes. We don't have a way to adjust the alignment. I recommend to avoid font sizes which differ so much. Furthermore you can try different fonts, which are better balanced. I use the Iosevka set of fonts.

Stebalien commented 1 year ago

Is it not possible to use the raise display property for this?

minad commented 1 year ago

@Stebalien Indeed, that could work. If someone is interested in experimenting with this I am happy to consider a PR. The main complication here is that we would have to adjust the box borders and the raise property per label depending on the surrounding face height.