<div dir="ltr"><div dir="ltr"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 18, 2019 at 9:23 PM Patrick Gundlach <<a href="mailto:patrick@gundla.ch">patrick@gundla.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Luigi,<br>
<br>
this sounds really great!<br>
<br>
Is there some documentation available how to access harfbuzz from Lua (jit) / FFI?<br>
<br>
Patrick<br>
<br></blockquote><div> </div><div>Well, look at </div><div>luatexdir/luaharfbuzz </div><div>I have also used </div><div><a href="https://github.com/khaledhosny/harf">https://github.com/khaledhosny/harf</a><br></div><div>to check </div><div>%% test2-latex.tex</div><div>\documentclass{article}<br>\usepackage{fontspec}<br>\newfontfamily\deva[Script=Devanagari]{NotoSansDevanagari-Regular.ttf}<br>\newfontfamily\beng[Script=Bengali]{NotoSansBengali-Regular.ttf}<br>\newfontfamily\guru[Script=Gurmukhi]{NotoSansGurmukhi-Regular.ttf}<br>\newfontfamily\gujr[Script=Gujarati]{NotoSansGujarati-Regular.ttf}<br>\newfontfamily\orya[Script=Oriya]{NotoSansOriya-Regular.ttf}<br>\newfontfamily\taml[Script=Tamil]{NotoSansTamil-Regular.ttf}<br>\newfontfamily\telu[Script=Telugu]{NotoSansTelugu-Regular.ttf}<br>\newfontfamily\knda[Script=Kannada]{NotoSansKannada-Regular.ttf}<br>\newfontfamily\mlym[Script=Malayalam]{NotoSansMalayalam-Regular.ttf}<br>\newfontfamily\sinh[Script=Sinhala]{NotoSansSinhala-Regular.ttf}<br><br>\begin{document}<br>{\deva क्रर्कि} % krarki<br>{\beng ক্রর্কি} % krarki<br>{\guru ਕ੍ਰਰ੍ਕਿ} % krarki<br>{\gujr ક્રર્કિ} % krarki<br>{\orya କ୍ରର୍କି} % krarki<br>{\taml கோ} % ko<br>{\telu క్రర్కి} % krarki <br>{\knda ಕ್ರರ್ಕಿ} % krarki<br>{\mlym ക്രര്കി} % krarki<br>{\sinh කෙ} % ke<br>\end{document}<br></div><div><br></div><div>from </div><div><a href="https://tex.stackexchange.com/questions/454031/examples-for-broken-rendering-of-scripts-in-lualatex">https://tex.stackexchange.com/questions/454031/examples-for-broken-rendering-of-scripts-in-lualatex</a></div><div><br></div><div>I have renamed luatex 1.11.0 luatex-hb, build the lualatex format </div><div> luatex-hb --ini '\input lualatex\dump</div><div>and run </div><div> luatex-hb -fmt=lualatex.fmt  test2-latex.tex</div></div>(assuming texlive 2019,  all files & format in the same folder and of course that you are able to compile from svn)<br clear="all"><div><br></div><div>Seems to work. Well, it did it last time, not time to check it now,  busy in other stuffs....</div><div><br></div><div>A few words on this task.</div><div>I have done it very  hurriedly (from commits luatex/branches/luatex-hb  one can see  30 May 2019  15 Jun 2019 ) </div><div>Even if  7 years ago I have done a lua binding to hb by swig and already  I known the  work done by </div><div><a href="https://github.com/tatzetwerk/luatex-harfbuzz">https://github.com/tatzetwerk/luatex-harfbuzz</a> <br></div><div> harftex, put simply,  was more easy to manage in 2 days.</div><div>The idea was  to check if was possible to keep the binary small and use the  hb module on demand. </div><div>I dont know if it will possible to meet the constrains, </div><div>but with ffi  there is always an alternative (well there is if luaffi works on every platforms, which is currently one of my big todo.. )</div><div><br></div><div>Harftex is a different project from luatex: </div><div>even if currently they  share several files, </div><div>harftex is free to modify the core of luatex to adapt it to harftex, possibly reaching the size of xetex (~24M).<br></div><div>So, different projects, at the moment they share some code & some (not all) patches:</div><div>luatex with hb is not a replacement of harftex (at least because at this moment I dont know if hb will stay  in luatex).<br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">luigi<br></div></div>