[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: |
Tue, 15 Jan 2013 21:27:45 +0100 |
> 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)
And my-custom-file.el has this line (among other):
'(default ((t (:inherit nil :stipple nil :background "gray72"
:foreground "black" :inverse-video nil :box nil :strike-through nil
:overline nil :underline nil :slant normal :weight normal :height 98
:width normal :foundry "unknown" :family "Courier New"))))
When I start Emacs, I see that the value of
`face-font-family-alternatives' looks fine:
(("Courier New" "Ubuntu Mono")
("Monospace" "courier" "fixed")
("courier" "CMU Typewriter Text" "fixed")
("Sans Serif" "helv" "helvetica" "arial" "fixed")
("helv" "helvetica" "arial" "fixed"))
On Windows, the "Courier New" family is chosen as expected, but on
Ubuntu Emacs doesn't choose "Ubuntu Mono" as expected, but another
face (similar to Courier New, BTW). If I do "M-x customize-face RET
default RET", the family that I see is "TlwgMono".
--
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
- Re: Using the same custom file in two different OSes,
Dani Moncayo <=
- Message not available
Message not available