<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Allegro git: freetype error loading ttg fonts after android build changes</title>
		<link>http://www.allegro.cc/forums/view/613011</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 22 Jul 2013 07:01:09 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>After the latest change to the android build configuration,<br />allegro won&#39;t load TTF fonts for me. al_load_font() fails.</p><p>log is attached, but I keep getting this error: Freetype error code 85</p><p>I/allegro ( 1321): font     E 1329:                ttf.c:760  al_load_ttf_font_stretch_f       [   0.52383] Reading DejaVuSans.ttf failed. Freetype error code 85</p><p>I rebuilt freetype library (2.4.12) just in case, but nothing was ever wrong with it, because if I revert to the old android build, everything works fine.<br />I also tried with+without &lt;nocompress&gt; in the build.xml, but no change.</p><p>Has anyone encountered this?</p><p>Thanks,<br />Pho75
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Pho75_)</author>
		<pubDate>Mon, 22 Jul 2013 05:02:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To load ttf on Android, you have to store it in your APK uncompressed. I don&#39;t really know why yet, it&#39;s possibly a bug in Allegro but everything else loads fine. The &quot;best&quot; way I found to do that was to give it one of the &quot;supported&quot; extensions (this is really ridiculous, but that&#39;s the way it seems to be.) Then you have to open the file with al_fopen after setting the apk file interface, and load the ttf with al_load_ttf_font_f. This is sort of explained here, with the list of file extensions you can use (I know it&#39;s crazy, but my ttfs have a .gif extension <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /> android.)</p><p><a href="http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/">http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/</a></p><p>The other way to do it is to use a lower SDK, but Allegro&#39;s increase the minimum Android version to 2.3... so I don&#39;t know if that&#39;s possible. You would then use the &lt;aapt&gt; section from the bottom of the project.properties file found in the last 5.1.x source release (or back in git history.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Mon, 22 Jul 2013 05:11:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That worked.<br />Not sure why it suddenly stopped working. <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /><br />Thanks Trent,<br />Pho75.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Pho75_)</author>
		<pubDate>Mon, 22 Jul 2013 06:52:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It stopped working because that bit I mentioned in the last paragraph from project.properties was removed because it was incompatible with the 2.3+ SDK. There might be a way to fix that and add it back, but in the end I think it&#39;s better not to. Without it, your APK gets compressed which is a good thing.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Mon, 22 Jul 2013 07:01:09 +0000</pubDate>
	</item>
</rss>
