<div dir="ltr">I have implemented a simple solution for substitution / fallback:<div><a href="http://goo.gl/rw2u0J">http://goo.gl/rw2u0J</a><br></div><div><br></div><div>As you can see in the screenshot, it looks like it works, but I would like to test things further:</div>

<div>Does someone have suggestions of combinations to check?</div><div><br></div><div>I also invite you to check the code, hopefully spotting some potential issues:<br></div><div><a href="http://goo.gl/VXHXMS">http://goo.gl/VXHXMS</a><br>

</div><div><br></div><div><div>Note that my solution is before "itemization" (script and BIDI) and rendering optimization...</div></div><div><br></div><div>One assumption I'm making: a cluster is always containing glyphs from the same font.</div>

<div>i.e. When doing multiple shaping-passes, it is not likely that a cluster will contain, say, a letter from font A, and some diacritic from font B.</div><div><br></div><div>Finally, I'm wondering what's the purpose of the "shapers" construct, as used here: <a href="http://goo.gl/jWPzUl">http://goo.gl/jWPzUl</a></div>

<div>I'm not using it so far, as it does not seem to affect shaping.<br></div><div><br></div><div>Thanks!</div><div>Ariel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 7:56 PM, Ariel Malka <span dir="ltr"><<a href="mailto:ariel@chronotext.org" target="_blank">ariel@chronotext.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Update:<div><br></div><div>Thanks to Khaled Hosny in a previous thread for the link to Mapnik, which is indeed a great resource for learning.</div>

<div><br></div><div>I stumbled upon the following, which seems to address my question:</div>
<div><a href="https://github.com/mapnik/mapnik/blob/master/include/mapnik/text/harfbuzz_shaper.hpp" target="_blank">https://github.com/mapnik/mapnik/blob/master/include/mapnik/text/harfbuzz_shaper.hpp</a><br></div><div><br>

</div><div>It's now time to digest all the new info ;)</div><span class="HOEnZb"><font color="#888888">
<div>Ariel<br></div></font></span><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 7:29 PM, Ariel Malka <span dir="ltr"><<a href="mailto:ariel@chronotext.org" target="_blank">ariel@chronotext.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>As an illustration, let's say I'd like to render Biblical Hebrew, solely using Harfbuzz.<br>


</div><div><br></div><div>BIDI should not be required, since we only have Hebrew characters with diacritics, and basic punctuation marks (mainly semicolons...), all in RTL.</div>
<div><br></div><div>It would be straightforward using a font like Arial.ttf.</div><div><br>But I'm trying to simulate the Android environment. So for instance, I would have to use DroidSansHebrew-Regular.ttf for the characters and diacritics and DroidSans.ttf for punctuation.</div>



<div><br></div><div>Note that I don't plan to use advanced solutions like fontconfig at this stage.</div><div><br></div><div>Do I need to itemize the text into runs with the same font, prior to shaping or is there a trick (e.g. at the Freetype or OpenType levels) for handling, say, a "virtual font made of two fonts"?</div>



<div><br></div><div>Thanks!</div><div><br>Ariel</div><div><a href="http://chronotext.org" target="_blank">http://chronotext.org</a></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>