emacs-devel
[Top][All Lists]
Advanced

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

Re: using glyphs by default in perl-mode


From: Eli Zaretskii
Subject: Re: using glyphs by default in perl-mode
Date: Fri, 07 Jun 2013 17:52:10 +0300

> From: Ted Zlatanov <address@hidden>
> Date: Fri, 07 Jun 2013 08:48:48 -0400
> 
> OK, but read that sentence again.  Can you really make sense of it?

Yes, definitely.  I wonder what makes it illegible for you.  (No, I
didn't write that doc string.)

> >> It would be really nice to be able to [...] use an image to create a
> >> glyph.
> 
> EZ> I don't understand this: Emacs _can_ display an image, so what can you
> EZ> possibly mean by "use an image to create a glyph"?  What is a "glyph"
> EZ> in this context?
> 
> Currently, AFAIK Emacs treats images as a text property.

More accurately, you display images by creating text properties with
images as their values.

> This is
> convenient but there are many cases where I'd rather have images behave
> like typed characters: one image == one character == one glyph.

Then create a font.  That's what you want.  Emacs cannot display text
as something else except via text properties or overlays.

> (make-char 'image "/tmp/gnus.png")
> 
> will produce something that respects font size, can be scaled, and looks
> like a character to all Emacs functions but like an image visually.  In
> text mode or without image support it would be treated like a character
> that can't be rendered.

This doesn't make sense to me: a character has many properties and
attributes that the above doesn't provide.  Displaying an image as a
character means that you will need to implement a font library, or
something close.

Why can't you generate a set of strings with display properties, and
then insert them into a buffer?  After all, a single-character string
should do what you want, no?




reply via email to

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