all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: set-face-font and custom-set-font, DejaVu, fonts for hebrew
Date: Fri, 24 Jul 2015 21:13:03 +0300	[thread overview]
Message-ID: <83bnf12zm8.fsf@gnu.org> (raw)
In-Reply-To: <87oaj1zets.fsf@mat.ucm.es>

> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Fri, 24 Jul 2015 16:43:27 +0000
> 
> When I set the Deja Vu font via Options-->Save Options
> the following is written into my custom file:
> 
> (custom-set-faces
>  ;; custom-set-faces was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant
>  normal :weight normal :height 143 :width normal)))))
> 
> Now I want to modify a function, I use to turning on Hebrew writing
> which also switches the font.
> 
> For example I have
> 
> (defun my-turn-bidi-paragraph-direction-on () 
>   "Just start with  to R2L `bidi-paragraph-direction' set
>   and turn the hebrew (qwerty) keyboard on"
>    (interactive)
>   (setq  bidi-paragraph-direction 'right-to-left)
>   (set-face-font 'default "-etl-*-*-*-*-*-*-240-*-*-*-*-ISO8859-8")
>   (setq org-mime-bidi-support t)
>   (set-input-method "hebrew-phonetic-qwerty" t)
>   (message "R2L on and the hebrew qwerty keyboard!"))
> 
> However  I want now to replace the «etl» font by the nicer Deja Vu font, but
> how? I cannot find the DejaVu font via xfontsel. 

Doesn't the following work for you?

  (set-face-font 'default "DejaVu Sans Mono")

It does for me.

IOW, using the XLFD format for specifying a font is only one of the
several alternatives that Emacs supports.  Another is just to specify
the font name.  See the node "Fonts" in the Emacs manual.

Btw, changing the font of the default face is not the recommended
procedure when all you want is to request that font for a certain
script.  For that, define your fontset-default to use DejaVu Sans Mono
only for the Hebrew script.  There are several examples of how to do
that in the "Modifying Fontsets" node of the Emacs manual.




  reply	other threads:[~2015-07-24 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 16:43 set-face-font and custom-set-font, DejaVu, fonts for hebrew Uwe Brauer
2015-07-24 18:13 ` Eli Zaretskii [this message]
2015-08-07  7:43   ` Uwe Brauer
2015-08-07  8:35     ` Eli Zaretskii
2015-08-07 16:04       ` Uwe Brauer
     [not found]       ` <mailman.7940.1438963519.904.help-gnu-emacs@gnu.org>
2015-08-07 16:43         ` Dan Espen
2015-08-08  8:20           ` Uwe Brauer
     [not found]           ` <mailman.7980.1439022040.904.help-gnu-emacs@gnu.org>
2015-08-08 14:18             ` Dan Espen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bnf12zm8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.