help-gnu-emacs
[Top][All Lists]
Advanced

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

Rendering text *into* an image


From: Joseph Garvin
Subject: Rendering text *into* an image
Date: Sun, 11 Jan 2015 21:19:09 -0600

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.


reply via email to

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