[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using the same custom file in two different OSes
From: |
Dani Moncayo |
Subject: |
Re: Using the same custom file in two different OSes |
Date: |
Wed, 16 Jan 2013 21:35:49 +0100 |
On Wed, Jan 16, 2013 at 9:58 AM, Sebastien Vauban
<wxhgmqzgwmuf@spammotel.com> wrote:
> Hi Dani,
Hi
>>> 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...
That works, thanks, but it sets only the family and size of the font.
Would it be possible to specify other properties like the background
color?
--
Dani Moncayo
- RE: Using the same custom file in two different OSes, (continued)
- RE: Using the same custom file in two different OSes, Drew Adams, 2013/01/17
- Re: Using the same custom file in two different OSes, Eli Zaretskii, 2013/01/17
- Re: Using the same custom file in two different OSes, Eli Zaretskii, 2013/01/17
- RE: Using the same custom file in two different OSes, Drew Adams, 2013/01/17
- Re: Using the same custom file in two different OSes, Eli Zaretskii, 2013/01/17
- RE: Using the same custom file in two different OSes, Drew Adams, 2013/01/17
- Re: Using the same custom file in two different OSes, Eli Zaretskii, 2013/01/17
Re: Using the same custom file in two different OSes, Stefan Monnier, 2013/01/15
Message not available