[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Install font for emacs 24.x

From: David AGBO
Subject: Re: Install font for emacs 24.x
Date: Thu, 04 Jul 2013 14:47:17 +0200
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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 "";
$> 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 
    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)."
        (and current-prefix-arg
            (read-string "Display font families matching regexp: "))))
      (let (families)
         (shell-command "fc-list : family" t)
         (goto-char (point-min))
         (while (not (eobp))
           (let ((fam (buffer-substring (line-beginning-position)
             (when (or (null matching) (string-match matching fam))
               (push fam families)))
        (setq families
             (sort families
                   (lambda (x y) (string-lessp (downcase x) (downcase y)))))
        (let ((buf (get-buffer-create "*Font Families*")))
         (with-current-buffer buf
           (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 ")"))
           (goto-char (point-min)))
         (display-buffer buf))))


   Pete                                           0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]