<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Freetype Error Code 85</title>
		<link>http://www.allegro.cc/forums/view/614261</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 18 May 2014 03:40:34 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi guys, <br />   I was testing my freshly MSYS2 built Allegro lib with a simple project.</p><p>It always worked with pevious versions of this project, which I haven&#39;t modified.</p><p>I run into problems loading a font.</p><p>Looking with a debugger and then in the Allegro Log I see:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>     E D:_user\Pkrcel\coding\QTC_Projects\Allegro\addons\ttf\ttf.c:755  al_load_ttf_font_stretch_f       <span class="k2">[</span>  <span class="n">24</span>.<span class="n">46295</span><span class="k2">]</span> Reading D:<span class="k3">/</span>_user<span class="k3">/</span>Pkrcel<span class="k3">/</span>coding<span class="k3">/</span>QTC_Projects<span class="k3">/</span>_oosb<span class="k3">/</span>build-Alleg-OOP-shooter<span class="k3">/</span>_resources<span class="k3">/</span>fonts<span class="k3">/</span>Carton_Six.ttf failed. Freetype error code <span class="n">85</span>
</pre></div></div><p>

The font is there and it was usually loaded.</p><p>I ofund in Freetype reference</p><div class="source-code snippet"><div class="inner"><pre>  FT_ERRORDEF_<span class="k2">(</span> Invalid_Stream_Operation,                    <span class="n">0x55</span>, \
                <span class="s">"invalid stream operation"</span> <span class="k2">)</span>
  FT_ERRORDEF_<span class="k2">(</span> Divide_By_Zero,                              <span class="n">0x85</span>, \
                <span class="s">"division by zero"</span> <span class="k2">)</span>
</pre></div></div><p>


I don&#39;t know if the 85 is exadecimal or converted...</p><p>Where should I look to debig the operation? I actually don&#39;t know whats wrong.</p><h1>Found!</h1><p>

Damn, I&#39;ve built (with oh-so-much-sweat) a debug version of Freetype and found out that Init_Face failed due to &quot;not a valid truetype font&quot;...WTH? <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>Well, checking my Resources Directory I found that it gone mostly corrupt for some uninexplicable reason...restoring a backup did the trick but DAMN!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pkrcel)</author>
		<pubDate>Sun, 18 May 2014 03:40:34 +0000</pubDate>
	</item>
</rss>
