abo-abo / hydra

make Emacs bindings that stick around
1.84k stars 112 forks source link

Support proportional variable-width fonts for correct column alignment #404

Open Dima-369 opened 2 years ago

Dima-369 commented 2 years ago

If the 'default face is set to a non-monospace font, the hint columns are not aligned properly:

image

This was requested and implemented in transient (requested in https://github.com/magit/transient/issues/67 where the screenshot above is taken from), so I wondered if it is also possible for hydra.

transient uses this function:

(defun transient--force-fixed-pitch ()
  (require 'face-remap)
  (face-remap-reset-base 'default)
  (face-remap-add-relative 'default 'fixed-pitch))

I tried to integrate it into the hydra code myself but I had no luck with it :(

Is it possible to use transient--force-fixed-pitch in hydras or does anyone know of a solution to this?