From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: Using the same custom file in two different OSes
Date: Wed, 16 Jan 2013 09:58:41 +0100 [thread overview]
Message-ID: <86r4llec72.fsf@somewhere.org> (raw)
In-Reply-To: mailman.17532.1358281671.855.help-gnu-emacs@gnu.org
Hi Dani,
Dani Moncayo wrote:
>> Luckily, in the specific case of wanting different families on different
>> systems, you can use face-font-family-alternatives: i.e. in Custom set
>> the "family" to "default-family" and then do
>>
>> (add-to-list 'face-font-family-alternatives
>> `("default-family" ,(if (foo) "fixed" "courier")))
>>
>> in my cases, I don't even need an `if': I just list the font families in
>> the order I prefer so Emacs picks the best one among those available.
>
> That looks like a simple a good solution, but it doesn't work for me.
>
> I have this fragment in my init file:
>
> (add-to-list 'face-font-family-alternatives
> '("Courier New" "Ubuntu Mono"))
> (setq custom-file "my-custom-file.el")
> (load custom-file)
>
> (The family "Courier New" exists in Windows and "Ubuntu Mono" exists in Ubuntu)
I would do something like this:
#+begin_src emacs-lisp
;; set default font for all frames
(when window-system
(cond
((font-info "Courier New")
(modify-all-frames-parameters '((font . "Courier New-8"))))
((font-info "Ubuntu Mono")
(modify-all-frames-parameters '((font . "Ubuntu Mono-9"))))))
#+end_src
Please check the accuracy of the font names...
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2013-01-16 8:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 22:00 Using the same custom file in two different OSes Dani Moncayo
2013-01-13 22:18 ` Drew Adams
2013-01-14 18:46 ` Dani Moncayo
2013-01-14 19:13 ` Drew Adams
2013-01-14 19:42 ` Dani Moncayo
2013-01-14 21:55 ` Peter Dyballa
2013-01-14 23:00 ` Dani Moncayo
2013-01-15 8:25 ` Didier Verna
2013-01-15 8:42 ` Dani Moncayo
2013-01-14 22:05 ` Drew Adams
2013-01-16 21:03 ` Dani Moncayo
[not found] ` <mailman.17633.1358371586.855.help-gnu-emacs@gnu.org>
2013-01-17 8:43 ` Sebastien Vauban
2013-01-17 14:19 ` Drew Adams
2013-01-17 14:38 ` Peter Dyballa
2013-01-17 15:22 ` Dani Moncayo
2013-01-17 16:38 ` Eli Zaretskii
2013-01-17 16:01 ` Drew Adams
2013-01-17 16:33 ` Eli Zaretskii
2013-01-17 16:32 ` Eli Zaretskii
2013-01-17 16:57 ` Drew Adams
2013-01-17 17:48 ` Eli Zaretskii
2013-01-17 18:15 ` Drew Adams
2013-01-17 18:44 ` Eli Zaretskii
2013-01-15 13:27 ` Stefan Monnier
2013-01-15 20:27 ` Dani Moncayo
[not found] ` <mailman.17532.1358281671.855.help-gnu-emacs@gnu.org>
2013-01-16 8:58 ` Sebastien Vauban [this message]
2013-01-16 20:35 ` Dani Moncayo
2013-01-16 12:59 ` Jason Rumney
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=86r4llec72.fsf@somewhere.org \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.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.