From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joseph Garvin Newsgroups: gmane.emacs.help Subject: Rendering text *into* an image Date: Sun, 11 Jan 2015 21:19:09 -0600 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1421069528 26574 80.91.229.3 (12 Jan 2015 13:32:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2015 13:32:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 12 14:32:03 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YAf6A-0007SZ-Ab for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Jan 2015 14:32:02 +0100 Original-Received: from localhost ([::1]:34336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAf69-0003nh-E4 for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Jan 2015 08:32:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAVX7-0002zC-5u for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 22:19:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAVX5-0002ej-Rz for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 22:19:13 -0500 Original-Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:63056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAVX5-0002ee-KU for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 22:19:11 -0500 Original-Received: by mail-la0-f48.google.com with SMTP id gf13so21962674lab.7 for ; Sun, 11 Jan 2015 19:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=Fmt5reNaa1B6aa5X15ZezpB8LzucLxA0mUvst8y06bc=; b=PHf66NNPl4O5YPjvD7CknPCtZyIHcuoV3TIdF5GPNXC1rnba58FBbaFOM/1qKDg1MV iKNE2hFDScJhqoiq4VViJmfCsaZRMhl3vzoyZX3DBV68ecpM7zwTFsa2REM+IzF/RypI GQ/HC8eabUVaRm3ZB2Ft+hzVF8CoPR1xIwkiHY4pmujULeNs/uqduozKXgJqtdk30dyH JEbhI2MuFURvMwzHfgufOxwbF9YnoqQ7oE80yUxBkkbe4p+ztdnXfCrLOecvSTVXajmy Jpgh/d7hh0Q21MVWQpb5Egwe+JYsCNAJPeGcjkUbALYPphNRghklbcD4K53HsAf5jE8O YgOg== X-Received: by 10.112.204.233 with SMTP id lb9mr34371106lbc.43.1421032749955; Sun, 11 Jan 2015 19:19:09 -0800 (PST) Original-Received: by 10.25.158.143 with HTTP; Sun, 11 Jan 2015 19:19:09 -0800 (PST) X-Google-Sender-Auth: 1ZnloDIjpvUONw0hDaFsy7FCHkg X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::230 X-Mailman-Approved-At: Mon, 12 Jan 2015 08:31:19 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102027 Archived-At: 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.