1

I frequently type both in Hebrew and English. The font I use is Dejavu Sans Mono. This renders Hebrew fonts accurately. However, because Hebrew uses small vowels, I would like to increase the font size of the Hebrew text but keep the English as it is. I have tried various solutions but none have worked for worked for me:

I installed the package unicode-fonts, but this does not seem to have the ability to tweak font sizes.

I followed the instructions in this link How to assign a certain font for each input method/language in Emacs 24? but found no useful solution there.

I use the code below to change input methods:

  (define-key 'iso-transl-ctl-x-8-map "f" [?‎])

  ;; Input method and key binding configuration.
  (setq alternative-input-methods
        '(("hebrew-biblical-sil" . [?\C-\\])
          ("greek-babel" . [?\C-|])))
  (setq default-input-method
        (caar alternative-input-methods))
  (defun toggle-alternative-input-method (method &optional arg interactive)
    (if arg
        (toggle-input-method arg interactive)
      (let ((previous-input-method current-input-method))
        (when current-input-method
          (deactivate-input-method))
        (unless (and previous-input-method
                     (string= previous-input-method method))
          (activate-input-method method)))))
  (defun reload-alternative-input-methods ()
    (dolist (config alternative-input-methods)
      (let ((method (car config)))
        (global-set-key (cdr config)
                        `(lambda (&optional arg interactive)
                           ,(concat "Behaves similar to `toggle-input-method', but uses \""
                                    method "\" instead of `default-input-method'")
                           (interactive "P\np")
                           (toggle-alternative-input-method ,method arg interactive))))));; Input method and key binding configuration.
(reload-alternative-input-methods)
2

You can do this with set-fontset-font, which allows overriding the builtin selection mechanisms for fonts for specific characters, charsets or scripts. So in your case, something like:

(set-fontset-font "fontset-default" 'hebrew (font-spec :family "Dejavu Sans Mono" :size 20))

See Modifying-Fontsets for more info.

| improve this answer | |
  • At first this worked for Greek only not for Hebrew. However, I got it to work when I changed the default font to Ezra SIL or SBL Hebrew. – devcom Nov 15 '19 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.