<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Include ttf in exe</title>
		<link>http://www.allegro.cc/forums/view/616474</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 09 Sep 2016 22:19:22 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is it possible to include a ttf file inside of the exe? Like how it&#39;s possible to include dll&#39;s in the exe. It would be nice to not have any files other than the exe.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bingocat)</author>
		<pubDate>Thu, 08 Sep 2016 08:33:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is it really favorable to include all resources in the EXE? That means that whenever you make an update for the game, people will have to redownload the whole game instead of just the executable. That is something that should be considered.</p><p>Don&#39;t know if this is possible. Probably as a resource file? Even then I don&#39;t know how you would load it with Allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (RPG Hacker)</author>
		<pubDate>Thu, 08 Sep 2016 13:00:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Both versions 3 and 4 had utilities to translate data files into ASM and link with exe.  I didn&#39;t see such stuff in version 5, but it can be reproduced and overload the file_io system to load data from byte arrays (for example).</p><p>But as RPG Hacker said, I find it useless except if you&#39;re doing something like a demo.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Niunio)</author>
		<pubDate>Thu, 08 Sep 2016 13:41:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>With Allegro 5 you can use the <span class="source-code">xxd</span> tool to convert your file to a C array and then the memfile addon (i.e. <span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span>).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Thu, 08 Sep 2016 20:08:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Cool, <tt>xxd</tt> is even part of the Git for Windows package.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Thu, 08 Sep 2016 23:33:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How to do you use al_open_memfile()? I can find no examples anywhere.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bingocat)</author>
		<pubDate>Fri, 09 Sep 2016 01:36:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Fri, 09 Sep 2016 01:50:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What are the arguments that you put in? Can you give me an example? Like if I have this array then how do I use the command to turn it into an ALLEGRO_FONT? Also, I&#39;m not sure if I converted the .ttf file correctly or not. Should it be this length?</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number"> 1</span><span class="k1">char</span> <a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a><span class="k2">[</span><span class="k2">]</span> <span class="k3">=</span> <span class="k2">{</span>
<span class="number"> 2</span><span class="n">0x00</span>,<span class="n">0x01</span>,<span class="n">0x00</span>,<span class="n">0x00</span>,<span class="n">0x00</span>,<span class="n">0x18</span>,<span class="n">0x01</span>,<span class="n">0x00</span>,<span class="n">0x00</span>,<span class="n">0x04</span>,
<span class="number"> 3</span><span class="n">0x00</span>,<span class="n">0x80</span>,<span class="n">0x44</span>,<span class="n">0x53</span>,<span class="n">0x49</span>,<span class="n">0x47</span>,<span class="n">0xB2</span>,<span class="n">0x75</span>,<span class="n">0xFB</span>,<span class="n">0xD1</span>,
<span class="number"> 4</span><span class="n">0x00</span>,<span class="n">0x0D</span>,<span class="n">0x7F</span>,<span class="n">0x70</span>,<span class="n">0x00</span>,<span class="n">0x00</span><span class="k2">}</span><span class="k2">;</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bingocat)</author>
		<pubDate>Fri, 09 Sep 2016 01:54:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Obviously, that char array does not hold the ttf file you converted. It would be orders of magnitude larger if it did.</p><p>The _f functions load from memory locations, using ALLEGRO_FILES&#39;s.</p><p>You want to use <span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span> and <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_ttf_font_f"><span class="a">al_load_ttf_font_f</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 09 Sep 2016 03:25:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/616474/1024882#target">SiegeLord</a> said:</div><div class="quote"><p> With Allegro 5 you can use the xxd tool to convert your file to a C array and then the memfile addon (i.e. al_open_memfile).</p></div></div><p>The <a href="http://vim.wikia.com/wiki/Hex_dump">xxd utility that comes with vim?</a>  I didn&#39;t realize that existed outside of Vi Land, though I see now that <a href="https://sourceforge.net/p/mingw/mailman/message/29615969/">msys includes it.</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Fri, 09 Sep 2016 12:12:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You don&#39;t even need to generate such hefty C file, compilers can link binary files directly. For example with GCC, the utility is <span class="source-code">objcopy</span>.<br /><a href="https://balau82.wordpress.com/2012/02/19/linking-a-binary-blob-with-gcc/">https://balau82.wordpress.com/2012/02/19/linking-a-binary-blob-with-gcc/</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Fri, 09 Sep 2016 12:39:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok this is the code that I tried, but there is still a problem. It says that the arial variable is being used before it&#39;s initialized. What am I doing wrong?</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number"> 1</span><a href="http://www.allegro.cc/manual/ALLEGRO_FILE"><span class="a">ALLEGRO_FILE</span></a> <span class="k3">*</span>arial <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a><span class="k2">(</span>arial, <span class="n">891469</span>, <span class="s">"rw"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 2</span>
<span class="number"> 3</span>  <a href="http://www.allegro.cc/manual/ALLEGRO_FONT"><span class="a">ALLEGRO_FONT</span></a> <span class="k3">*</span>font18 <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_ttf_font_f"><span class="a">al_load_ttf_font_f</span></a><span class="k2">(</span>arial, NULL, <span class="n">18</span>, NULL<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 4</span>  <a href="http://www.allegro.cc/manual/ALLEGRO_FONT"><span class="a">ALLEGRO_FONT</span></a> <span class="k3">*</span>font10 <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_ttf_font_f"><span class="a">al_load_ttf_font_f</span></a><span class="k2">(</span>arial, NULL, <span class="n">10</span>, NULL<span class="k2">)</span><span class="k2">;</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bingocat)</author>
		<pubDate>Fri, 09 Sep 2016 20:33:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re passing the wrong argument (or shadowing a variable (using the same name)) to al_open_memfile. Your ALLEGRO_FILE* and your argument to al_open_memfile have the same name (&#39;arial&#39;). I assume that&#39;s a typo. What is your memory block called? That is what you pass to <span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 09 Sep 2016 22:19:22 +0000</pubDate>
	</item>
</rss>
