* Rendering text *into* an image
@ 2015-01-12 3:19 Joseph Garvin
2015-01-14 4:03 ` Bob Proulx
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Garvin @ 2015-01-12 3:19 UTC (permalink / raw)
To: help-gnu-emacs
Is there a way in emacs lisp to render text *into* an image? To be clear, I
don't mean I want to display an image in an emacs buffer. I mean I want to
have emacs render some text as if it was going to be displayed but instead
of displaying it to save it into an image file. I've found (create-image)
for working with already existing images and byte arrays but I haven't
found any way to get emacs to render text into a new one.
My goal is to render characters with diacritical marks (umlauts, accents,
etc.) where the character and the mark are different colors -- emacs will
not normally do this, if you try propertizing a character and a mark on
that character differently the character just wins and it's all the same
color. So given a character and a diacritical mark I want to render an
image with the character and diacritical mark in one color, then render
over it again without the mark in a different color (pictures of this
technique here: http://tex.stackexchange.com/a/97224), then use an overlay
with the display property to display it instead of the original character.
I could generate the image outside emacs but then the rendering engine
won't be the same and the result might look inconsistent with the rest of
the buffer.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Rendering text *into* an image
2015-01-12 3:19 Rendering text *into* an image Joseph Garvin
@ 2015-01-14 4:03 ` Bob Proulx
0 siblings, 0 replies; 2+ messages in thread
From: Bob Proulx @ 2015-01-14 4:03 UTC (permalink / raw)
To: Joseph Garvin; +Cc: help-gnu-emacs
Joseph Garvin wrote:
> Is there a way in emacs lisp to render text *into* an image? To be clear, I
> don't mean I want to display an image in an emacs buffer. I mean I want to
> have emacs render some text as if it was going to be displayed but instead
> of displaying it to save it into an image file. I've found (create-image)
> for working with already existing images and byte arrays but I haven't
> found any way to get emacs to render text into a new one.
You can use Imagemagick to do this.
http://www.imagemagick.org/Usage/text/
That program could be called from emacs lisp and integrated within emacs.
Bob
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-14 4:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 3:19 Rendering text *into* an image Joseph Garvin
2015-01-14 4:03 ` Bob Proulx
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).