<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] Weird anti-aliasing on .ttf fonts..?</title>
		<link>http://www.allegro.cc/forums/view/606708</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 16 Mar 2011 17:08:03 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>After RTFM and loading a .ttf font, I promptly displayed a message on screen. The font is Arial (yep, plain ol&#39; Arial) and the &#39;O&#39; at the end of &#39;HELLO&#39; was, well, FAT.</p><p>HELL<b>O</b></p><p>If I pass the monochrome flag on loading obviously there is no issue, but the anti-aliasing seems, well, really bad.</p><p>I&#39;m guessing there&#39;s a draw flag I have to set or something? </p><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Tue, 15 Mar 2011 04:07:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Did you clear the background?  When I first tried that I got no anti-aliasing at all, then I realized, the black background wasn&#39;t cleared properly.  So I did a properly clear of the bitmap and that fixed it.  The anti-aliasing needed a background colour and even though it was black, it wasn&#39;t an actual properly cleared bitmap.  Sounds like the area where your &quot;O&quot; is, is sitting on such a spot, in those cases the letters appear fatter and not anti-aliased.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Tue, 15 Mar 2011 05:21:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve had limited success with the ttf font rendering quality.  I&#39;ve run into a quite a few circumstances where a font will have anomalous glyphs sort of &quot;pop out&quot; from the others, or will otherwise look unusual.</p><p>This example below shows how Georgia, a common web font, looks drastically different when rendered in Allegro.</p><p><span class="remote-thumbnail"><span class="json">{"name":"603621","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de13fee51add79a44e93f2ac3aad530d.png","w":517,"h":109,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de13fee51add79a44e93f2ac3aad530d"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/d/e/de13fee51add79a44e93f2ac3aad530d-240.jpg" alt="603621" width="240" height="50" /></span></p><p>I mean, it looks nice, but it doesn&#39;t look like Georgia.  Arial (and other Helvetica variants) are fonts that I&#39;ve found to have a significantly different appearance.  I&#39;ve found a few fonts that draw very nicely, though, and tend to stick with those.  I&#39;ve gone as far as render a font 4x larger to a bitmap, and resize it in half twice to another bitmap.  That can produce some nice output.</p><p>Can you post a screenshot of your O?</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606708/907796#target">Neil Roy</a> said:</div><div class="quote"><p> Sounds like the area where your &quot;O&quot; is, is sitting on such a spot, in those cases the letters appear fatter and not anti-aliased.</p></div></div><p>It&#39;s my understanding that due to the hinting, the glyphs will render the same regardless of the spot where they are located in the word.  Hinting is letter-only, and letters are placed at integer intervals.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Tue, 15 Mar 2011 09:00:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What if you use the bold version of Georgia in Allegro? Does it look closer to the photoshop one? It looks like the difference is mostly in the font weight setting - Freetype seems to be using something like &quot;font-weight=normal&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Tue, 15 Mar 2011 17:37:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Here&#39;s a couple screenshots to illustrate what I was talking about.</p><p>The only difference is that I commented out the code to clear the screen on one, and on the other I didn&#39;t clear the screen.</p><p>Here&#39;s two examples using Arial 20 then increasing the size of the screenshot to show the results up close:</p><p>With screen cleared first:<br /><span class="source-code"><a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span>black<span class="k2">)</span><span class="k2">;</span></span><br /><span class="remote-thumbnail"><span class="json">{"name":"603630","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6ad523a4aadd461921cd2e845f68d721.png","w":552,"h":304,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6ad523a4aadd461921cd2e845f68d721"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/6/a/6ad523a4aadd461921cd2e845f68d721-240.jpg" alt="603630" width="240" height="132" /></span></p><p>Without screen clear:<br /><span class="source-code"><span class="c">//al_clear_to_color(black);</span></span><br /><span class="remote-thumbnail"><span class="json">{"name":"603631","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/3\/030d1aaccc630e4c20a88fd85bbb31f5.png","w":552,"h":304,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/3\/030d1aaccc630e4c20a88fd85bbb31f5"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/0/3/030d1aaccc630e4c20a88fd85bbb31f5-240.jpg" alt="603631" width="240" height="132" /></span></p><p>That&#39;s what I was talking about.  If one of the letters looks like the above than perhaps it is a related problem.  I noticed when I resized these images that some of the pixels in the second image are anti-aliased a little.  </p><p>It would be interesting to write a test project that clears half the screen behind the text and view the results.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Tue, 15 Mar 2011 22:43:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In the second one, are you drawing the text multiple times in the same place?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Tue, 15 Mar 2011 23:26:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think so... The only way I get that &quot;Error&quot; is by drawing the text multiple times without cleaning the screen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 15 Mar 2011 23:39:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Jeez I really am being stoopid of late; first I was trying to load .ttf fonts without the ttf addon, now I&#39;ve posted about a problem that was cured after clearing the display with al_clear_to_color...</p><p>...sorry <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Tue, 15 Mar 2011 23:42:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nope, only draw it once.  It&#39;s the same code each time, the second one I merely commented out the code to clear the display.  Here&#39;s the full code:</p><p>I&#39;ve changed it since then, the font is now larger (I used this to create a simple Allegro 5 template for CodeBlocks and this is the default program)</p><p>But if you change the font to arial.ttf and the size to 20, you&#39;ll get the same result I did.</p><p>Now the ONLY thing I change for those two samples was in one I commented out the code to clear the display.</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="p">#define ALLEGRO_STATICLINK</span>
<span class="number">  2</span>
<span class="number">  3</span><span class="p">#include &lt;iostream&gt;</span>
<span class="number">  4</span><span class="p">#include &lt;allegro5/allegro.h&gt;</span>
<span class="number">  5</span><span class="p">#include &lt;allegro5/allegro_font.h&gt;</span>
<span class="number">  6</span><span class="p">#include &lt;allegro5/allegro_ttf.h&gt;</span>
<span class="number">  7</span><span class="p">#include &lt;allegro5/allegro_native_dialog.h&gt;</span>
<span class="number">  8</span>
<span class="number">  9</span><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span>
<span class="number"> 10</span>
<span class="number"> 11</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span>argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span>
<span class="number"> 12</span><span class="k2">{</span>
<span class="number"> 13</span>   <a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>   <a href="http://www.allegro.cc/manual/al_install_keyboard"><span class="a">al_install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>   <a href="http://www.allegro.cc/manual/al_init_font_addon"><span class="a">al_init_font_addon</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>   <a href="http://www.allegro.cc/manual/al_init_ttf_addon"><span class="a">al_init_ttf_addon</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 17</span>
<span class="number"> 18</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> black <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 19</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> blue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">255</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 20</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> yellow <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>
<span class="number"> 22</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>display <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">800</span>, <span class="n">600</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>   <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>display<span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 24</span>      <a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>NULL, <span class="s">"Error"</span>, NULL, <span class="s">"Create display failed."</span>,
<span class="number"> 25</span>                                 NULL, ALLEGRO_MESSAGEBOX_ERROR<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span>      <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 27</span>   <span class="k2">}</span>
<span class="number"> 28</span>
<span class="number"> 29</span>   <span class="c">// change the font to Arial.ttf size 20 to better see problem</span>
<span class="number"> 30</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_FONT"><span class="a">ALLEGRO_FONT</span></a> <span class="k3">*</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_ttf_font"><span class="a">al_load_ttf_font</span></a><span class="k2">(</span><span class="s">"DejaVuSans.ttf"</span>, <span class="n">64</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 31</span>   <span class="k1">if</span><span class="k2">(</span><span class="k3">!</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="number"> 32</span>      <a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>display, <span class="s">"Error"</span>, NULL, <span class="s">"Error loading font."</span>,
<span class="number"> 33</span>                                 NULL, ALLEGRO_MESSAGEBOX_ERROR<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 34</span>      <a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>display<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 35</span>      <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 36</span>   <span class="k2">}</span>
<span class="number"> 37</span>
<span class="number"> 38</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_KEYBOARD_STATE"><span class="a">ALLEGRO_KEYBOARD_STATE</span></a> keyboard<span class="k2">;</span>
<span class="number"> 39</span>   <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/al_key_down"><span class="a">al_key_down</span></a><span class="k2">(</span><span class="k3">&amp;</span>keyboard, ALLEGRO_KEY_ESCAPE<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 40</span>      <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span>blue<span class="k2">)</span><span class="k2">;</span> <span class="c">// comment out this line to see problem</span>
<span class="number"> 41</span>      <a href="http://www.allegro.cc/manual/al_draw_text"><span class="a">al_draw_text</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>, black, <span class="n">403</span>.<span class="n">0</span>, <span class="n">278</span>.<span class="n">0</span>, ALLEGRO_ALIGN_CENTRE, <span class="s">"Hello World!"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 42</span>      <a href="http://www.allegro.cc/manual/al_draw_text"><span class="a">al_draw_text</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>, yellow, <span class="n">400</span>.<span class="n">0</span>, <span class="n">275</span>.<span class="n">0</span>, ALLEGRO_ALIGN_CENTRE, <span class="s">"Hello World!"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 43</span>
<span class="number"> 44</span>      <a href="http://www.allegro.cc/manual/al_get_keyboard_state"><span class="a">al_get_keyboard_state</span></a><span class="k2">(</span><span class="k3">&amp;</span>keyboard<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 45</span>      <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 46</span>   <span class="k2">}</span>
<span class="number"> 47</span>
<span class="number"> 48</span>   <a href="http://www.allegro.cc/manual/al_destroy_font"><span class="a">al_destroy_font</span></a><span class="k2">(</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="number"> 49</span>   <a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>display<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 50</span>
<span class="number"> 51</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 52</span><span class="k2">}</span>
</div></div><p>



Edit: I think I see what you mean, it does stay in a loop redrawing that each pass through, still, I don&#39;t see how it should vary that much when nothing at all changes about the location.  And how would it not look the same with or without a clear?</p><p>Edit2: AHHHHHH, okay, I see it... d&#39;oh!  I feel stupid now. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=";D" border="0" /> <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Wed, 16 Mar 2011 07:17:09 +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/606708/908112#target">Neil Roy</a> said:</div><div class="quote"><p> I think I see what you mean, it does stay in a loop redrawing that each pass through, still, I don&#39;t see how it should vary that much when nothing at all changes about the location.
</p></div></div><p>It matters because it&#39;s blending with itself, which makes it appear more and more solid, until you have thick block-like letters.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 16 Mar 2011 07:22:30 +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/606708/908112#target">Neil Roy</a> said:</div><div class="quote"><p>Nope, only draw it once. It&#39;s the same code each time, the second one I merely commented out the code to clear the display. Here&#39;s the full code:</p></div></div><p>Yes, but since that code isn&#39;t clearing the area under the text at any point, the text is being drawn over top of itself over and over, thus, blending with itself.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 16 Mar 2011 07:23:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, I just realized that.  <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=";D" border="0" /> <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />  I feel stupid for not seeing that sooner. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I changed my code and reran it:</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="p">#define ALLEGRO_STATICLINK</span>
<span class="number">  2</span>
<span class="number">  3</span><span class="p">#include &lt;iostream&gt;</span>
<span class="number">  4</span><span class="p">#include &lt;allegro5/allegro.h&gt;</span>
<span class="number">  5</span><span class="p">#include &lt;allegro5/allegro_font.h&gt;</span>
<span class="number">  6</span><span class="p">#include &lt;allegro5/allegro_ttf.h&gt;</span>
<span class="number">  7</span><span class="p">#include &lt;allegro5/allegro_native_dialog.h&gt;</span>
<span class="number">  8</span>
<span class="number">  9</span><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span>
<span class="number"> 10</span>
<span class="number"> 11</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span>argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span>
<span class="number"> 12</span><span class="k2">{</span>
<span class="number"> 13</span>   <a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>   <a href="http://www.allegro.cc/manual/al_install_keyboard"><span class="a">al_install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>   <a href="http://www.allegro.cc/manual/al_init_font_addon"><span class="a">al_init_font_addon</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>   <a href="http://www.allegro.cc/manual/al_init_ttf_addon"><span class="a">al_init_ttf_addon</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 17</span>
<span class="number"> 18</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> black <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 19</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> blue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">255</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 20</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a> yellow <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>
<span class="number"> 22</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>display <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">800</span>, <span class="n">600</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>   <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>display<span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 24</span>      <a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>NULL, <span class="s">"Error"</span>, NULL, <span class="s">"Create display failed."</span>,
<span class="number"> 25</span>                                 NULL, ALLEGRO_MESSAGEBOX_ERROR<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span>      <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 27</span>   <span class="k2">}</span>
<span class="number"> 28</span>
<span class="number"> 29</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_FONT"><span class="a">ALLEGRO_FONT</span></a> <span class="k3">*</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_ttf_font"><span class="a">al_load_ttf_font</span></a><span class="k2">(</span><span class="s">"Arial.ttf"</span>, <span class="n">20</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 30</span>   <span class="k1">if</span><span class="k2">(</span><span class="k3">!</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="number"> 31</span>      <a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>display, <span class="s">"Error"</span>, NULL, <span class="s">"Error loading font."</span>,
<span class="number"> 32</span>                                 NULL, ALLEGRO_MESSAGEBOX_ERROR<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 33</span>      <a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>display<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 34</span>      <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 35</span>   <span class="k2">}</span>
<span class="number"> 36</span>
<span class="number"> 37</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_KEYBOARD_STATE"><span class="a">ALLEGRO_KEYBOARD_STATE</span></a> keyboard<span class="k2">;</span>
<span class="number"> 38</span>      <span class="c">//al_clear_to_color(blue);</span>
<span class="number"> 39</span>      <a href="http://www.allegro.cc/manual/al_draw_text"><span class="a">al_draw_text</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>, black, <span class="n">403</span>.<span class="n">0</span>, <span class="n">278</span>.<span class="n">0</span>, ALLEGRO_ALIGN_CENTRE, <span class="s">"Hello World!"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 40</span>      <a href="http://www.allegro.cc/manual/al_draw_text"><span class="a">al_draw_text</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>, yellow, <span class="n">400</span>.<span class="n">0</span>, <span class="n">275</span>.<span class="n">0</span>, ALLEGRO_ALIGN_CENTRE, <span class="s">"Hello World!"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 41</span>
<span class="number"> 42</span>      <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 43</span>
<span class="number"> 44</span>   <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/al_key_down"><span class="a">al_key_down</span></a><span class="k2">(</span><span class="k3">&amp;</span>keyboard, ALLEGRO_KEY_ESCAPE<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 45</span>      <a href="http://www.allegro.cc/manual/al_get_keyboard_state"><span class="a">al_get_keyboard_state</span></a><span class="k2">(</span><span class="k3">&amp;</span>keyboard<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 46</span>   <span class="k2">}</span>
<span class="number"> 47</span>
<span class="number"> 48</span>   <a href="http://www.allegro.cc/manual/al_destroy_font"><span class="a">al_destroy_font</span></a><span class="k2">(</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="number"> 49</span>   <a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>display<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 50</span>
<span class="number"> 51</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 52</span><span class="k2">}</span>
</div></div><p>


Ah well, it&#39;s usually the stupid little things that get you like that. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Wed, 16 Mar 2011 07:27:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, uh, yea, so my guess on the problem had nothing to do with the actual issue. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606708/907933#target">Elias</a> said:</div><div class="quote"><p>What if you use the bold version of Georgia in Allegro? Does it look closer to the photoshop one? It looks like the difference is mostly in the font weight setting - Freetype seems to be using something like &quot;font-weight=normal&quot;.</p></div></div><p>

Here&#39;s Georgia Bold.  The differences aren&#39;t as drastic.  I don&#39;t see why it has to make the &quot;o&quot;s circles. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p><span class="remote-thumbnail"><span class="json">{"name":"603634","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a6580137c9ab91b3f1bb8855c9199558.png","w":567,"h":109,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a6580137c9ab91b3f1bb8855c9199558"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/a/6/a6580137c9ab91b3f1bb8855c9199558-240.jpg" alt="603634" width="240" height="46" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Wed, 16 Mar 2011 09:39:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The allegro version is being drawn a little wider. and/or spaced apart it seems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Wed, 16 Mar 2011 11:47:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, I remember some changes having to do with int-coordinates. Maybe each glyph is drawn at the next integer position, need to double check and maybe fix it. The length of the whole string definitely should stay the same.</p><p>And not sure why it&#39;s drawn lighter. Can you try using a bigger size - like 3 times as big? If it works ok then I suspect it&#39;s Freetype&#39;s hinting kicking in at smaller sizes and removing some extra pixels. If the bigger size has the same problem, I&#39;d guess it has something to do with blending instead.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Wed, 16 Mar 2011 17:08:03 +0000</pubDate>
	</item>
</rss>
