UP | HOME

Set a different font for a specific mode

To set a different font for a specific mode, and keep the current font for everything else, even for two buffers on the same frame, you can use face-remap-add-relative:

(add-hook 'markdown-mode-hook
          (lambda () (face-remap-add-relative 'default :family "Georgia")))

By doing this, I can use serif fonts for text mode such as mardown and org-mode, while keep using monospace fonts for programming mode.

Date: 2019-05-08 Wed 00:00

Author: Huy Tran

Created: 2019-05-08 Wed 00:19