Skip to main content
edited body
Source Link
user31220
user31220

Try this

(create-fontset-from-fontset-spec (font-xlfd-name (font-spec :registry "fontset-mine" :family "SF Pro" :weight 'regular :slant 'normal :width 'normal))) (defface my-face nil "My Face.") (set-face-attribute 'my-face nil :font "fontset-mine" :height 1.0) (add-hook 'org-mode-hook (defun my-org-mode-hook () (buffer-face-set 'my-face) (face-remap-add-relative 'my-face :height 1.5))) 

Instead of rolling out your own my-face, you can as well work with variable-pitch face. IOW, you can get the same effect by

  • setting the :font property on variable-pitch face
  • put the org buffer in variable-pitch-mode
  • do a face-remap-add-relative as above

Before putting org buffers in variable-pitch-mode I suggest that you look atconsult prior work like this one Ricing up Org Mode

Try this

(create-fontset-from-fontset-spec (font-xlfd-name (font-spec :registry "fontset-mine" :family "SF Pro" :weight 'regular :slant 'normal :width 'normal))) (defface my-face nil "My Face.") (set-face-attribute 'my-face nil :font "fontset-mine" :height 1.0) (add-hook 'org-mode-hook (defun my-org-mode-hook () (buffer-face-set 'my-face) (face-remap-add-relative 'my-face :height 1.5))) 

Instead of rolling out your own my-face, you can as well work with variable-pitch face. IOW, you can get the same effect by

  • setting the :font property on variable-pitch face
  • put the org buffer in variable-pitch-mode
  • do a face-remap-add-relative as above

Before putting org buffers in variable-pitch-mode I suggest that you look at prior work like this one Ricing up Org Mode

Try this

(create-fontset-from-fontset-spec (font-xlfd-name (font-spec :registry "fontset-mine" :family "SF Pro" :weight 'regular :slant 'normal :width 'normal))) (defface my-face nil "My Face.") (set-face-attribute 'my-face nil :font "fontset-mine" :height 1.0) (add-hook 'org-mode-hook (defun my-org-mode-hook () (buffer-face-set 'my-face) (face-remap-add-relative 'my-face :height 1.5))) 

Instead of rolling out your own my-face, you can as well work with variable-pitch face. IOW, you can get the same effect by

  • setting the :font property on variable-pitch face
  • put the org buffer in variable-pitch-mode
  • do a face-remap-add-relative as above

Before putting org buffers in variable-pitch-mode I suggest that you consult prior work like this one Ricing up Org Mode

Source Link
user31220
user31220

Try this

(create-fontset-from-fontset-spec (font-xlfd-name (font-spec :registry "fontset-mine" :family "SF Pro" :weight 'regular :slant 'normal :width 'normal))) (defface my-face nil "My Face.") (set-face-attribute 'my-face nil :font "fontset-mine" :height 1.0) (add-hook 'org-mode-hook (defun my-org-mode-hook () (buffer-face-set 'my-face) (face-remap-add-relative 'my-face :height 1.5))) 

Instead of rolling out your own my-face, you can as well work with variable-pitch face. IOW, you can get the same effect by

  • setting the :font property on variable-pitch face
  • put the org buffer in variable-pitch-mode
  • do a face-remap-add-relative as above

Before putting org buffers in variable-pitch-mode I suggest that you look at prior work like this one Ricing up Org Mode