[Top][All Lists]

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

RE: cannot understand Elisp manual node Glyphs

From: Stuart D. Herring
Subject: RE: cannot understand Elisp manual node Glyphs
Date: Wed, 7 Feb 2007 08:16:13 -0800 (PST)
User-agent: SquirrelMail/1.4.8-2.el3.7lanl

>> You set each element of the vector using make-glyph-with-face, e.g.
>> (vector (make-glyph-with-face ?x 'bold)
>>         (make-glyph-with-face ?y 'bold)
>>         (make-glyph-with-face ?z 'bold))
> I see; thx.

For what it's worth, I offer

(defun string-to-glyphs (str &optional face)
  "Return a glyph vector representing string STR with face FACE."
  (vconcat (mapcar (lambda (c) (make-glyph-with-face c face)) str)))

where I have trivially extended Kim's function:

(defun make-glyph-with-face (c face)
  "Return a glyph code representing char C with face FACE."
  (logior c (lsh (if face (face-id face) 0) 19)))


This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during

reply via email to

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