<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to render_text</title><link>https://sourceforge.net/p/arcanfe/wiki/render_text/</link><description>Recent changes to render_text</description><atom:link href="https://sourceforge.net/p/arcanfe/wiki/render_text/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 26 Oct 2012 06:39:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/arcanfe/wiki/render_text/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage render_text modified by Björn Ståhl</title><link>https://sourceforge.net/p/arcanfe/wiki/render_text/</link><description>&lt;pre&gt;--- v3
+++ v4
@@ -21,6 +21,8 @@
 \\n insert newline
 \\r return caret to beginning of string
 \\#rrggbb change colour
+\\presname, embed image (simple)
+\\Presname,w,h, embed image (scale)
 \\ffontname,size set font and size
 
 **Example use:**
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Ståhl</dc:creator><pubDate>Fri, 26 Oct 2012 06:39:23 -0000</pubDate><guid>https://sourceforge.net915a2399df4538d7b0a34a88390f0cabf4716d9d</guid></item><item><title>WikiPage render_text modified by Björn Ståhl</title><link>https://sourceforge.net/p/arcanfe/wiki/render_text/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -24,6 +24,7 @@
 \\ffontname,size set font and size
 
 **Example use:**
+
 Write the text 'test' in bold bright red, with the font resources/fonts/default.ttf 
 
 ~~~~
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Ståhl</dc:creator><pubDate>Sat, 16 Jun 2012 14:22:04 -0000</pubDate><guid>https://sourceforge.net98dff584115aba4035518536531768462f4f84a9</guid></item><item><title>WikiPage render_text modified by Björn Ståhl</title><link>https://sourceforge.net/p/arcanfe/wiki/render_text/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -7,6 +7,7 @@
 This function takes a format string and renders it into an image. The optional arguments *vspace* and *tspace* defines how many pixels extra space there should be added between lines and how many pixels each tab should represent.
 
 **String format:**
+
 Each format character begins with a backslash (\\\\ escapes).
 
 \\b enable bold output
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Ståhl</dc:creator><pubDate>Sat, 16 Jun 2012 14:21:49 -0000</pubDate><guid>https://sourceforge.netf5291bff1d29dc131ae3889041ec22067e189532</guid></item><item><title>WikiPage render_text modified by Björn Ståhl</title><link>https://sourceforge.net/p/arcanfe/wiki/render_text/</link><description>**Declaration;**

~~~~~
    function render_text(message, [vspace:4], [tspace:64]) =&gt; vid, lineheights 
~~~~~

This function takes a format string and renders it into an image. The optional arguments *vspace* and *tspace* defines how many pixels extra space there should be added between lines and how many pixels each tab should represent.

**String format:**
Each format character begins with a backslash (\\\\ escapes).

\\b enable bold output
\\!b disable bold output
\\i enable italic output
\\!i disable italic output
\\u enable underlined output
\\!u disable underlined output

\\t insert tab
\\n insert newline
\\r return caret to beginning of string
\\#rrggbb change colour
\\ffontname,size set font and size

**Example use:**
Write the text 'test' in bold bright red, with the font resources/fonts/default.ttf 

~~~~
    vid, lineheights = render_text("\ffonts/default.ttf,18\#ff0000test);
~~~~


**Deprecations / Planned changes:**

The engine currently allows to set a list of tab-spaces, but it is currently not exposed to the Lua API. Future versions will also include a \image command, allowing a static image to be embedded into the final result (emoticons, ...)

**Caveats:**

If the message string would result in a texture that's too large for the GL subsystem, the engine will forcibly terminate with the offending file:line as its message. </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Björn Ståhl</dc:creator><pubDate>Sat, 16 Jun 2012 14:21:19 -0000</pubDate><guid>https://sourceforge.netf7486295eb16690b858481d3a70b3f743ad2aa00</guid></item></channel></rss>