<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Problem wiht non english text drawing</title>
		<link>http://www.allegro.cc/forums/view/609933</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 08 Apr 2012 04:41:27 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hello everyone..<br />I have an issue with text rendering in allegro 5.1 .. I&#39;m running this under linux ubuntu 12.04</p><p>the result should be </p><p>مرحبا</p><p>I included snapshots for a correct rendering and the rendering I&#39;m getting from allegro..</p><p>I&#39;m not sure how to fix this and if this bug is from the library being used in allegro..</p><p>thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mustafa S.)</author>
		<pubDate>Thu, 05 Apr 2012 20:34:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro&#39;s ttf addon has no rtl support right now. Could that be the problem?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Thu, 05 Apr 2012 22:08:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>We would also need a smarter way to convert the string into glyphs, I think, due to the different letter forms depending on where they appear. Do we need to create an addon using Pango?</p><p>edit: attached test programs for fun. One using the pango-cairo backend, one using pango-freetype backend.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Fri, 06 Apr 2012 04:49:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>thanks for the response guys..</p><p>@Ellas<br />I don&#39;t think that is the problem..</p><p>from the way I understand how arabic character are encoded..</p><p>there are 4 or less representation for the same character</p><p>for example م which is M in english pronounced &quot;meem&quot;</p><p>Isolated ( م ) UFEE1 <br />beginning of the word ( مـ ) UFEE3 <br />middle of the word ( ـمـ ) FEE4 <br />end of the word ( ـم ) UFEE2 </p><p>and from what I believe that all representations are included in utf8</p><p>so when rendering م the render library should render it as different latter based on it&#39;s position in the word ,, but based on the result it&#39;s always maps م to UFEE1 without caring about it&#39;s position..</p><p>@Peter can you attach a snapshot.. it seems that I&#39;m having a hard time compiling the code not knowing what to include.. :/</p><p>thanks again guys for the help.. I just want you to know I&#39;m just pointing this out and it&#39;s not that important for me.. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> but it&#39;s always fun to share problems &amp; solution.. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mustafa S.)</author>
		<pubDate>Fri, 06 Apr 2012 07:13:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Attached screenshots. To compile you need something like:</p><pre>
gcc ex_pango.c $(pkg-config --cflags --libs pangocairo allegro-5.0)
</pre><p>

The second one uses a feature from Allegro 5.1, and you need pangoft2 instead of pangocairo.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Fri, 06 Apr 2012 08:58:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>@peter thanks..<br />and woow it&#39;s working as I see from your shapshot..<br />so does this mean the problem is with allego draw text..??<br />again I had no luck compiling the code maybe because I&#39;m missing the dev lib or the lib it self.. I&#39;m running ubuntu 12.04 what package should I install..<br />and I wondering will allegro fix this issue in later versions and is this problem platform dependent or independent thanks again.. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>@Ellas.. I generated the the assembly code for my program.. and it seems that the string stored in memory as<br />.string	&quot;\331\205\330\261\330\255\330\250\330\247&quot; (this is in octal)<br />that means م is represented by \331\205 always even if it&#39;s in middle, end, beginning or isolated it has a fixed representation.. and it depends on the rendering lib to care about it&#39;s position and render it correctly according to it&#39;s position
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mustafa S.)</author>
		<pubDate>Sat, 07 Apr 2012 15:12:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Exactly. The Allegro TTF addon is not smart enough for complex scripts. It just draws each code point one at a time from left to right, so for Arabic there are at least those two problems to solve. I would like Allegro to have a built-in solution, but in general it will be too much work to do it ourselves. That&#39;s why I&#39;m thinking about a new addon using pango. It would <i>not</i> replace allegro_ttf, which is sufficient for many users and probably easier to install on platforms other than Linux.</p><p>I don&#39;t use Ubuntu but if you search for pangocairo you should be able to figure out the packages.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Sun, 08 Apr 2012 04:41:27 +0000</pubDate>
	</item>
</rss>
