all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* install lmtypewriter fonts for emacs on CentOS/RHEL
@ 2012-01-15 22:37 Yuan Luo
  2012-01-16  0:10 ` Peter Dyballa
  0 siblings, 1 reply; 2+ messages in thread
From: Yuan Luo @ 2012-01-15 22:37 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

Hi,
I have those fonts on my Ubuntu box, but couldn't find an installation
package for my CentOS/RHEL machine.

How to get them for CentOS/RHEL and is there any configuration after
installation to enable emacs to use them?

Best,
Yuan

[-- Attachment #2: Type: text/html, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: install lmtypewriter fonts for emacs on CentOS/RHEL
  2012-01-15 22:37 install lmtypewriter fonts for emacs on CentOS/RHEL Yuan Luo
@ 2012-01-16  0:10 ` Peter Dyballa
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Dyballa @ 2012-01-16  0:10 UTC (permalink / raw)
  To: Yuan Luo; +Cc: help-gnu-emacs


Am 15.1.2012 um 23:37 schrieb Yuan Luo:

> How to get them for CentOS/RHEL

TRAMP?

> and is there any configuration after
> installation to enable emacs to use them?

Put them somewhere the X server can find them, if necessary create the fonts.* files and encodings.dir, extend if necessary the X server's font path, make it rehash the fonts – and check! (xlsfonts, xfontsel)
Make them also available to the libfontconfig service and put them into its cache (with fc-cache) – and check! (fc-list, fc-match)

Inside GNU Emacs you can use this code from Miles Bader to check whether GNU Emacs sees the fonts:

;;; ----------------------------------------------------------------
;;; list-fonts-display via font-config
(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


"Evolution"            o           __o                     _o _
          °\___o      /0~         -\<,              ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-16  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 22:37 install lmtypewriter fonts for emacs on CentOS/RHEL Yuan Luo
2012-01-16  0:10 ` 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.