From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: set-face-font and custom-set-font, DejaVu, fonts for hebrew Date: Fri, 24 Jul 2015 21:13:03 +0300 Message-ID: <83bnf12zm8.fsf@gnu.org> References: <87oaj1zets.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1437761611 1761 80.91.229.3 (24 Jul 2015 18:13:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jul 2015 18:13:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 24 20:13:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZIhTE-0002R8-Hb for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jul 2015 20:13:20 +0200 Original-Received: from localhost ([::1]:46266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIhTD-0003KK-Cf for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jul 2015 14:13:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIhT2-0003IR-T0 for help-gnu-emacs@gnu.org; Fri, 24 Jul 2015 14:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIhSz-0003Hw-I3 for help-gnu-emacs@gnu.org; Fri, 24 Jul 2015 14:13:08 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:58595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIhSz-0003F4-9x for help-gnu-emacs@gnu.org; Fri, 24 Jul 2015 14:13:05 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NS000D007N8RU00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 24 Jul 2015 21:13:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS000DXN7XRNA40@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 24 Jul 2015 21:13:03 +0300 (IDT) In-reply-to: <87oaj1zets.fsf@mat.ucm.es> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105972 Archived-At: > From: Uwe Brauer > Date: Fri, 24 Jul 2015 16:43:27 +0000 >=20 > When I set the Deja Vu font via Options-->Save Options > the following is written into my custom file: >=20 > (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" :slan= t > normal :weight normal :height 143 :width normal))))) >=20 > Now I want to modify a function, I use to turning on Hebrew writing > which also switches the font. >=20 > For example I have >=20 > (defun my-turn-bidi-paragraph-direction-on ()=20 > "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!")) >=20 > However I want now to replace the =C2=ABetl=C2=BB font by the nice= r Deja Vu font, but > how? I cannot find the DejaVu font via xfontsel.=20 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 Mon= o only for the Hebrew script. There are several examples of how to do that in the "Modifying Fontsets" node of the Emacs manual.