Hi Hans Thanks for the code so that we can use fonts in Plain and LaTeX. I just had two questions 1- I got the code from Khaled. How can I get the beta myself from your repository? I just joined ConTeXt mailing list. 2- Your code works fine but if in LaTeX, I compile a document like %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \directlua { dofile(kpse.find_file("luatex-fonts.lua","tex")) } \font\body=file:XBZar.ttf:mode=node;script=arab;language=ara;+init;+medi;+fina;+liga;+rlig;+mark;+mkmk at 14pt \def\normalfont{\body} \AtBeginDocument{\body} \begin{document} این یک آزمایش است که در حال وقوع است. \section{مقدمه} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Then it gives this error ! LuaTeX error /home/vafa/texmf/tex/luatex-fonts/font-def.lua:337: attempt to c all field 'read_from_afm' (a nil value). <to be read again> relax l.16 \section{مقدمه} ? Do you know how I can resolve this issue. The issue is when you use \section and similarly when you use \chapter, \textbf, \begin{....} \end{.....} If I can resolve this, Then I will be writting a LaTeX interface for the fonts.
وفا خلیقی wrote:
Hi Hans
Thanks for the code so that we can use fonts in Plain and LaTeX.
I just had two questions
1- I got the code from Khaled. How can I get the beta myself from your repository? I just joined ConTeXt mailing list.
in most cases it's the same as on the website (the ftp is low bandwidth so only used by a few) http://www.pragma-ade.com/context/latest/cont-tmf.zip
2- Your code works fine but if in LaTeX, I compile a document like %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT
\directlua {
dofile(kpse.find_file("luatex-fonts.lua","tex"))
}
\font\body=file:XBZar.ttf:mode=node;script=arab;language=ara;+init;+medi;+fina;+liga;+rlig;+mark;+mkmk at 14pt
\def\normalfont{\body}
\AtBeginDocument{\body}
\begin{document}
این یک آزمایش است که در حال وقوع است.
\section{مقدمه}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Then it gives this error
! LuaTeX error /home/vafa/texmf/tex/luatex-fonts/font-def.lua:337: attempt to c
all field 'read_from_afm' (a nil value).
<to be read again>
indeed, has to do with the fact that (since we use the xetex syntax there) we default to name lookups and those are tagged as afm while luatex-fonts does not have that code (does not make sense) you can try the attached file (probably enough, else i have to send more) as we're in transition to luatex 0.38 i cannot post a zip today (some fundamental math changes) Hans ps. keep in mind that the real advanced stuff with respect to fonts is context only although node mode should work ok in luatex-fonts (add mode=yes to the specification) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
وفا خلیقی wrote:
Thanks. So to use font-dum.lua, Should I have
\directlua {
dofile(kpse.find_file("fonts-dum.lua","tex"))
no, just put that file in tex/context/base as it is already loaded ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks. But it still gives error and that is
(/home/vafa/texmf/tex/luabidi/luabidi.sty)
وفا خلیقی wrote:
Thanks. But it still gives error and that is
(/home/vafa/texmf/tex/luabidi/luabidi.sty)
conds> ) (test.aux)
! Font \OT1/cmr/m/n/17.28=cmr17 at 17.28pt not loadable: metric data not found
or bad.
<to be read again>
relax
l.10 \section{مقدمه}
?
The error is understanable. But can it be fixed in the .lua codes or I have to write some macros to change this?
no, the lua code should do it (i attached a few more files; yesterday i fixed this afm aspect and it works here, at least in plain) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
In ConTeXt, How do you make page numbers Arabic/Persian? Do you do that by some mappings? Thanks
وفا خلیقی wrote:
In ConTeXt, How do you make page numbers Arabic/Persian? Do you do that by some mappings?
there are numerous converters that you can hook into the numbering mechanisms but i leave it to the arabic experts to tell which one is best suited ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi again. This is a sample Plain document. with Iran Nastaliq font Arabic alphabets are isolated. but in XB Zar font, we obtain the desired results.
وفا خلیقی wrote:
Hi again.
This is a sample Plain document. with Iran Nastaliq font Arabic alphabets are isolated. but in XB Zar font, we obtain the desired results.
this works ok \font\body=file:IranNastaliq.ttf:mode=node;script=arab;language=dflt;+calt;+ccmp;+init;+isol;+medi;+fina;+liga;+rlig;+kern;+mark;+mkmk at 14pt\body the font has no language ara as mtxrun --script font --list --info irannastaliq shows also, in luatex-fonts you need to add node-res.lua loadmodule('node-ini.lua') loadmodule('node-res.lua') -- will be stripped loadmodule('node-inj.lua') -- will be replaced (luatex > .50) loadmodule('node-fnt.lua') loadmodule('node-dum.lua') ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks. What I did that. But still that does not get the desired output. (pdf attached.). Maybe it is my fault. Do you get the correct output?
وفا خلیقی wrote:
Thanks. What I did that. But still that does not get the desired output. (pdf attached.). Maybe it is my fault. Do you get the correct output?
i don't read arabic so maybe others can comment ... i'll upload a new zip later this afternoon (does ik work ok in context?) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks Can you also if you can prepare a short document explaining the syntaxt of the font command and options in the font argument? I thought ConTeXt reference should be a starting point. Can you also once you upload it, announce it so that I know? and the link will be http://www.pragma-ade.com/context/latest/cont-tmf.zip?
وفا خلیقی wrote:
Thanks
Can you also if you can prepare a short document explaining the syntaxt of the font command and options in the font argument? I thought ConTeXt reference should be a starting point.
it's just the xetex syntax + a few extra keys (like mode=node) and a prefixes like file: and name: keep in mind that this is not the same as in context (although we support the xetex syntax) as there we use featuressets with symbolic names
Can you also once you upload it, announce it so that I know? and the link will be http://www.pragma-ade.com/context/latest/cont-tmf.zip?
normally i mention it on this list and indeed it's that link; although in most cases users will sync with the minimals on the garden as it also has the latest luatex binaries Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Apr 08, 2009 at 09:39:22PM +1000, وفا خلیقی wrote:
Thanks. What I did that. But still that does not get the desired output. (pdf attached.). Maybe it is my fault. Do you get the correct output?
You need '+curs' as well, since the font relays on cursive attachments extensively. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
participants (3)
-
Hans Hagen
-
Khaled Hosny
-
وفا خلیقی