* Install font for emacs 24.x
@ 2013-07-03 14:28 David AGBO
2013-07-03 17:15 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: David AGBO @ 2013-07-03 14:28 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I've installed emacs 24.3, and I would like to use a specific font
(Meslo LG M DZ), but when I launch emacs, I have the message "Font
`Meslo LG M DZ' is not defined". What is strange, is that when I
downgrade emacs version from 24 to 23, using the same configuration
file, I can use this font without any problem...
Here is how I declare Meslo in the configuration file :
-----
(setq default-frame-alist
'(
(width . 80)
(tool-bar-lines . 0)
*=> (font . "Meslo LG M DZ") <=*
(vertical-scroll-bars . nil)
))
(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
...
-----
I've also tried Options->Set default font menu, but here again, there is
a difference. Under emacs23, I have a little box to select the font, but
under emacs24, I juste have a menu, where my font doesn't even appear.
Is there a directive to include at build time, or a new parameter in the
configuration file, or anything else?
Best regards,
David
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-03 14:28 Install font for emacs 24.x David AGBO
@ 2013-07-03 17:15 ` Peter Dyballa
2013-07-04 12:47 ` David AGBO
0 siblings, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2013-07-03 17:15 UTC (permalink / raw)
To: David AGBO; +Cc: help-gnu-emacs
Am 03.07.2013 um 16:28 schrieb David AGBO:
> Is there a directive to include at build time, or a new parameter in the configuration file, or anything else?
Is your font visible fc-list/fc-match, i.e., is it part of the libfontconfig based fonts service? Or is the X server providing the font? Is this function (by Miles Bader) showing your font? Is it showing a complete list of fonts?
(defun list-fonts-display (&optional matching)
"Display a list of font-families available via font-config, in a new buffer.
If the optional argument MATCHING is non-nil, only font families
matching that regexp are displayed; interactively, a prefix
argument will prompt for the regexp.
The name of each font family is displayed using that family, as
well as in the default font (to handle the case where a font
cannot be used to display its own name)."
(interactive
(list
(and current-prefix-arg
(read-string "Display font families matching regexp: "))))
(let (families)
(with-temp-buffer
(shell-command "fc-list : family" t)
(goto-char (point-min))
(while (not (eobp))
(let ((fam (buffer-substring (line-beginning-position)
(line-end-position))))
(when (or (null matching) (string-match matching fam))
(push fam families)))
(forward-line)))
(setq families
(sort families
(lambda (x y) (string-lessp (downcase x) (downcase y)))))
(let ((buf (get-buffer-create "*Font Families*")))
(with-current-buffer buf
(erase-buffer)
(dolist (family families)
;; We need to pick one of the comma-separated names to
;; actually use the font; choose the longest one because some
;; fonts have ambiguous general names as well as specific
;; ones.
(let ((family-name
(car (sort (split-string family ",")
(lambda (x y) (> (length x) (length y))))))
(nice-family (replace-regexp-in-string "," ", " family)))
(insert (concat (propertize nice-family
'face (list :family family-name))
" (" nice-family ")"))
(newline)))
(goto-char (point-min)))
(display-buffer buf))))
--
Greetings
Pete 0
%-/\_//
(*)(*)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-03 17:15 ` Peter Dyballa
@ 2013-07-04 12:47 ` David AGBO
2013-07-08 10:33 ` David AGBO
0 siblings, 1 reply; 9+ messages in thread
From: David AGBO @ 2013-07-04 12:47 UTC (permalink / raw)
To: Peter Dyballa; +Cc: help-gnu-emacs
Thanks for your help Peter,
The font is visible with fc-list, I've installed it this way :
$> mkdir -p /usr/share/fonts/truetype/custom
$> wget
"http://cloud.github.com/downloads/andreberg/Meslo-Font/Meslo%20LG%20DZ%20v1.0.zip"
$> unzip Meslo\ LG\ DZ\ v1.0
$> mv Meslo\ LG\ DZ\ v1.0/*.ttf /usr/share/fonts/truetype/custom
$> fc-cache -f -v
I'll try the function and tell you.
Le 03/07/2013 19:15, Peter Dyballa a écrit :
> Am 03.07.2013 um 16:28 schrieb David AGBO:
>
>> Is there a directive to include at build time, or a new parameter in the configuration file, or anything else?
> Is your font visible fc-list/fc-match, i.e., is it part of the libfontconfig based fonts service? Or is the X server providing the font? Is this function (by Miles Bader) showing your font? Is it showing a complete list of fonts?
>
>
> (defun list-fonts-display (&optional matching)
> "Display a list of font-families available via font-config, in a new buffer.
> If the optional argument MATCHING is non-nil, only font families
> matching that regexp are displayed; interactively, a prefix
> argument will prompt for the regexp.
> The name of each font family is displayed using that family, as
> well as in the default font (to handle the case where a font
> cannot be used to display its own name)."
> (interactive
> (list
> (and current-prefix-arg
> (read-string "Display font families matching regexp: "))))
> (let (families)
> (with-temp-buffer
> (shell-command "fc-list : family" t)
> (goto-char (point-min))
> (while (not (eobp))
> (let ((fam (buffer-substring (line-beginning-position)
> (line-end-position))))
> (when (or (null matching) (string-match matching fam))
> (push fam families)))
> (forward-line)))
> (setq families
> (sort families
> (lambda (x y) (string-lessp (downcase x) (downcase y)))))
> (let ((buf (get-buffer-create "*Font Families*")))
> (with-current-buffer buf
> (erase-buffer)
> (dolist (family families)
> ;; We need to pick one of the comma-separated names to
> ;; actually use the font; choose the longest one because some
> ;; fonts have ambiguous general names as well as specific
> ;; ones.
> (let ((family-name
> (car (sort (split-string family ",")
> (lambda (x y) (> (length x) (length y))))))
> (nice-family (replace-regexp-in-string "," ", " family)))
> (insert (concat (propertize nice-family
> 'face (list :family family-name))
> " (" nice-family ")"))
> (newline)))
> (goto-char (point-min)))
> (display-buffer buf))))
>
>
> --
> Greetings
>
> Pete 0
> %-/\_//
> (*)(*)
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-04 12:47 ` David AGBO
@ 2013-07-08 10:33 ` David AGBO
2013-07-08 10:44 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: David AGBO @ 2013-07-08 10:33 UTC (permalink / raw)
To: help-gnu-emacs
Hi Peter,
As said, I've tried the function "list-fonts-display", and I can see my
font in the list.
Is something missing, for the function to list the font and for emacs to
not consider it?
Best regards,
David
Le 04/07/2013 14:47, David AGBO a écrit :
> Thanks for your help Peter,
>
> The font is visible with fc-list, I've installed it this way :
>
> $> mkdir -p /usr/share/fonts/truetype/custom
> $> wget
> "http://cloud.github.com/downloads/andreberg/Meslo-Font/Meslo%20LG%20DZ%20v1.0.zip"
>
> $> unzip Meslo\ LG\ DZ\ v1.0
> $> mv Meslo\ LG\ DZ\ v1.0/*.ttf /usr/share/fonts/truetype/custom
> $> fc-cache -f -v
>
> I'll try the function and tell you.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-08 10:33 ` David AGBO
@ 2013-07-08 10:44 ` Peter Dyballa
2013-07-08 12:24 ` David AGBO
0 siblings, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2013-07-08 10:44 UTC (permalink / raw)
To: David AGBO; +Cc: help-gnu-emacs
Am 08.07.2013 um 12:33 schrieb David AGBO:
> As said, I've tried the function "list-fonts-display", and I can see my font in the list.
> Is something missing, for the function to list the font and for emacs to not consider it?
Are you using the exact font name? Can you try with
emacs -Q -fn 'that font name' &
emacs -q -fn 'that font name' &
emacs -fn 'that font name' &
For the latter test you *might* also like to disable the font settings in your init file.
Are you setting any X resources for GNU Emacs? (xrdb -q | grep -i emacs)
--
Greetings
Pete
Time is an illusion. Lunchtime, doubly so.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-08 10:44 ` Peter Dyballa
@ 2013-07-08 12:24 ` David AGBO
2013-07-08 12:36 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: David AGBO @ 2013-07-08 12:24 UTC (permalink / raw)
To: help-gnu-emacs
The 3 commands are returning my original error -> Font `Meslo LG M DZ'
is not defined
but this is the exact font name also displayed by "list-fonts-display".
And I'm not using xrdb :
$> xrdb -q | grep -i emacs
bash: xrdb: command not found
Le 08/07/2013 12:44, Peter Dyballa a écrit :
> Are you using the exact font name? Can you try with
>
> emacs -Q -fn 'that font name' &
> emacs -q -fn 'that font name' &
> emacs -fn 'that font name' &
>
> For the latter test you*might* also like to disable the font settings in your init file.
>
> Are you setting any X resources for GNU Emacs? (xrdb -q | grep -i emacs)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-08 12:24 ` David AGBO
@ 2013-07-08 12:36 ` Peter Dyballa
2013-07-08 13:19 ` David AGBO
0 siblings, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2013-07-08 12:36 UTC (permalink / raw)
To: David AGBO; +Cc: help-gnu-emacs
Am 08.07.2013 um 14:24 schrieb David AGBO:
> bash: xrdb: command not found
Are you not using X11? Which variant of GNU Emacs are you using? M-x emacs-version RET should give a hint…
--
Greetings
Pete
When confronted with actual numbers, a mathematician is at a loss.
– Steffen Hokland
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-08 12:36 ` Peter Dyballa
@ 2013-07-08 13:19 ` David AGBO
2013-07-08 13:46 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: David AGBO @ 2013-07-08 13:19 UTC (permalink / raw)
To: help-gnu-emacs
No, I'm not using X11 except for emacs, I'm working on a server in CLI.
What I get is : GNU Emacs 24.3.1 (i686-redhat-linux-gnu, GTK+ Version
2.10.4) of 2013-03-11
Le 08/07/2013 14:36, Peter Dyballa a écrit :
> Are you not using X11? Which variant of GNU Emacs are you using? M-x emacs-version RET should give a hint…
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Install font for emacs 24.x
2013-07-08 13:19 ` David AGBO
@ 2013-07-08 13:46 ` Peter Dyballa
0 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2013-07-08 13:46 UTC (permalink / raw)
To: David AGBO; +Cc: help-gnu-emacs
Am 08.07.2013 um 15:19 schrieb David AGBO:
> No, I'm not using X11 except for emacs, I'm working on a server in CLI.
When you're using GNU Emacs inside a terminal emulation in no-windows mode, then you need to convince the terminal emulation to use your font. (Because here GNU Emacs is slave [or, politically more correct, guest] of the terminal emulation and may not change anything.)
--
Greetings
Pete
If it does exist, it's out of date.
– Arnold's Second Law of Documentation
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-07-08 13:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 14:28 Install font for emacs 24.x David AGBO
2013-07-03 17:15 ` Peter Dyballa
2013-07-04 12:47 ` David AGBO
2013-07-08 10:33 ` David AGBO
2013-07-08 10:44 ` Peter Dyballa
2013-07-08 12:24 ` David AGBO
2013-07-08 12:36 ` Peter Dyballa
2013-07-08 13:19 ` David AGBO
2013-07-08 13:46 ` Peter Dyballa
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.