ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Arabic with LuaTeX vs. XeTeX
@ 2008-06-09  9:13 Otared Kavian
  2008-06-09  9:23 ` Wolfgang Schuster
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Otared Kavian @ 2008-06-09  9:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Dear all,

I just read the thread started by Burak Emir about "Typesetting Arabic  
today", and tried to typeset the sample sent by Idris Samawi Hamid.
One of the Arabic or Persian fonts that I have and LuaTeX can find is  
Nadeem (working on Mac OS X 10.5.3), but what I get after typesetting  
is the following attached PDF: all the characters are typeset with  
their isolated form. However typestting the same text with XeConTeXt  
or XeTeX gives a nice result.

So my question is, what should I add or subtract from the font  
features parameters to get a correct result?

[-- Attachment #2: test-lua.pdf --]
[-- Type: application/pdf, Size: 20572 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1468 bytes --]




The source file is as follows:

% engine=luatex
\starttext

\definefontfeature
   [test]
   [analyze=yes,
   mode=node,
   language=dflt,
   script=arab,
   aalt=yes,
   init=yes,
   medi=yes,
   fina=yes,
   isol=yes,
   liga=yes,
   mset=yes]

\font\TradArabic = Nadeem*test    at 18pt

\startbuffer[paragraph]
الحمدلله حمد معترف بحمده، مغترف من  
بحار مجده، بلسان
الثناۤء شاكرا، ولحسن الاۤئه ناشرا؛  
الذي خلق الموت والحيوة، والخير
والشر، والنفع والضر، والسكون والحركة،  
والأرواح
والأجسام، والذكر والنسيان.

\blank

اَلْحَمْدُ لِلّٰهِ حَمْدَ مُعْتَرِفٍ  
بِحَمْدِهٖ، مُغْتَرِفٌ مِنْ بِحَارِ  
مَجْدِهٖ، بِلِسَانِ
الثَّنَاۤءِ شَاكِرًا، وَلِحُسْنِ  
اٰلاۤئِهٖ نَاشِرًا؛ اَلَّذِيْ خَلَقَ  
الْمَوْتَ وَالْحَيٰوةَ، وَالْخَيْرَ
وَالشَّرَّ، وَالنَّفْعَ وَالضَّرَّ،  
وَالسُّكُوْنَ وَالْحَرَكَةَ،  
وَالْأَرْوَاحَ
وَالْأَجْسَامَ، وَالذِّكْرَ  
وَالنِّسْيَانَ.

\stopbuffer

\start
\TradArabic
\pardir TRT \textdir TRT
\getbuffer[paragraph]
\stop

\stoptext 

[-- Attachment #4: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09  9:13 Arabic with LuaTeX vs. XeTeX Otared Kavian
@ 2008-06-09  9:23 ` Wolfgang Schuster
  2008-06-09 11:38   ` Otared Kavian
  2008-06-09 11:52 ` Khaled Hosny
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Schuster @ 2008-06-09  9:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2008/6/9 Otared Kavian <otared@gmail.com>:
> Dear all,
>
> I just read the thread started by Burak Emir about "Typesetting Arabic
> today", and tried to typeset the sample sent by Idris Samawi Hamid.
> One of the Arabic or Persian fonts that I have and LuaTeX can find is Nadeem
> (working on Mac OS X 10.5.3), but what I get after typesetting is the
> following attached PDF: all the characters are typeset with their isolated
> form. However typestting the same text with XeConTeXt or XeTeX gives a nice
> result.
>
> So my question is, what should I add or subtract from the font features
> parameters to get a correct result?
>
>
>
>
> The source file is as follows:
>
> % engine=luatex
> \starttext
>
> \definefontfeature
>  [test]
>  [analyze=yes,
>  mode=node,
>  language=dflt,
>  script=arab,
>  aalt=yes,
>  init=yes,
>  medi=yes,
>  fina=yes,
>  isol=yes,
>  liga=yes,
>  mset=yes]

What happens with the following setups from Idris.

 \definefontfeature
   [test]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

> \font\TradArabic = Nadeem*test    at 18pt

Can you try Microsofts Arabtype font:
http://groups.msn.com/MicrosoftVOLTuserscommunity/homepage.msnw

> \startbuffer[paragraph]
> الحمدلله حمد معترف بحمده، مغترف من بحار مجده، بلسان
> الثناۤء شاكرا، ولحسن الاۤئه ناشرا؛ الذي خلق الموت والحيوة، والخير
> والشر، والنفع والضر، والسكون والحركة، والأرواح
> والأجسام، والذكر والنسيان.
>
> \blank
>
> اَلْحَمْدُ لِلّٰهِ حَمْدَ مُعْتَرِفٍ بِحَمْدِهٖ، مُغْتَرِفٌ مِنْ بِحَارِ
> مَجْدِهٖ، بِلِسَانِ
> الثَّنَاۤءِ شَاكِرًا، وَلِحُسْنِ اٰلاۤئِهٖ نَاشِرًا؛ اَلَّذِيْ خَلَقَ
> الْمَوْتَ وَالْحَيٰوةَ، وَالْخَيْرَ
> وَالشَّرَّ، وَالنَّفْعَ وَالضَّرَّ، وَالسُّكُوْنَ وَالْحَرَكَةَ،
> وَالْأَرْوَاحَ
> وَالْأَجْسَامَ، وَالذِّكْرَ وَالنِّسْيَانَ.
>
> \stopbuffer
>
> \start
> \TradArabic
> \pardir TRT \textdir TRT
> \getbuffer[paragraph]
> \stop
>
> \stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09  9:23 ` Wolfgang Schuster
@ 2008-06-09 11:38   ` Otared Kavian
  2008-06-09 15:09     ` Burak Emir
  0 siblings, 1 reply; 18+ messages in thread
From: Otared Kavian @ 2008-06-09 11:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 9 juin 08, at 11:23, Wolfgang Schuster wrote:

> […]
> What happens with the following setups from Idris.
>
> \definefontfeature
>   [test]
>   [mode=node,language=dflt,script=arab,
>    init=yes,medi=yes,fina=yes,isol=yes,
>    liga=yes,dlig=yes,rlig=yes,clig=yes,
>    mark=yes,mkmk=yes,kern=yes,curs=yes]
>

Hi Wolfgang,

Thank you for your attention. However this is exactly what I did.


>> \font\TradArabic = Nadeem*test    at 18pt
>
> Can you try Microsofts Arabtype font:
> http://groups.msn.com/MicrosoftVOLTuserscommunity/homepage.msnw
>

I couldn't find the font you are mentioning: since I am on a Mac  
running Mac OS X 10.5.3, I am not sure whether the links there allows  
me to install such fonts.

Also I think that the issue is related to LuaTeX, or at least to my  
installation of LuaTeX…, and so probably the issue is not related to  
the font, since XeTeX and XeConTeXt both typeset correctly the same  
text.

Best regards: OK


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09  9:13 Arabic with LuaTeX vs. XeTeX Otared Kavian
  2008-06-09  9:23 ` Wolfgang Schuster
@ 2008-06-09 11:52 ` Khaled Hosny
  2008-06-09 12:00   ` Wolfgang Schuster
  2008-06-09 14:52 ` Idris Samawi Hamid
  2008-06-09 23:25 ` Idris Samawi Hamid
  3 siblings, 1 reply; 18+ messages in thread
From: Khaled Hosny @ 2008-06-09 11:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2903 bytes --]

On Mon, Jun 09, 2008 at 11:13:06AM +0200, Otared Kavian wrote:
> Dear all,
>
> I just read the thread started by Burak Emir about "Typesetting Arabic  
> today", and tried to typeset the sample sent by Idris Samawi Hamid.
> One of the Arabic or Persian fonts that I have and LuaTeX can find is  
> Nadeem (working on Mac OS X 10.5.3), but what I get after typesetting is 
> the following attached PDF: all the characters are typeset with their 
> isolated form. However typestting the same text with XeConTeXt or XeTeX 
> gives a nice result.

May be the font is built with AAT tables and not OpenType, XeTeX
supports AAT on mac but I don't think LuaTeX does.

 Khaled

>
> So my question is, what should I add or subtract from the font features 
> parameters to get a correct result?


>
>
>
> The source file is as follows:
>
> % engine=luatex
> \starttext
>
> \definefontfeature
>   [test]
>   [analyze=yes,
>   mode=node,
>   language=dflt,
>   script=arab,
>   aalt=yes,
>   init=yes,
>   medi=yes,
>   fina=yes,
>   isol=yes,
>   liga=yes,
>   mset=yes]
>
> \font\TradArabic = Nadeem*test    at 18pt
>
> \startbuffer[paragraph]
> الحمدلله حمد معترف بحمده، مغترف من بحار مجده، بلسان
> الثناۤء شاكرا، ولحسن الاۤئه ناشرا؛ الذي خلق الموت والحيوة، والخير
> والشر، والنفع والضر، والسكون والحركة، والأرواح
> والأجسام، والذكر والنسيان.
>
> \blank
>
> اَلْحَمْدُ لِلّٰهِ حَمْدَ مُعْتَرِفٍ بِحَمْدِهٖ، مُغْتَرِفٌ مِنْ بِحَارِ مَجْدِهٖ، بِلِسَانِ
> الثَّنَاۤءِ شَاكِرًا، وَلِحُسْنِ اٰلاۤئِهٖ نَاشِرًا؛ اَلَّذِيْ خَلَقَ الْمَوْتَ وَالْحَيٰوةَ، وَالْخَيْرَ
> وَالشَّرَّ، وَالنَّفْعَ وَالضَّرَّ، وَالسُّكُوْنَ وَالْحَرَكَةَ، وَالْأَرْوَاحَ
> وَالْأَجْسَامَ، وَالذِّكْرَ وَالنِّسْيَانَ.
>
> \stopbuffer
>
> \start
> \TradArabic
> \pardir TRT \textdir TRT
> \getbuffer[paragraph]
> \stop
>
> \stoptext

> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 11:52 ` Khaled Hosny
@ 2008-06-09 12:00   ` Wolfgang Schuster
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfgang Schuster @ 2008-06-09 12:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2008/6/9 Khaled Hosny <khaledhosny@eglug.org>:
> On Mon, Jun 09, 2008 at 11:13:06AM +0200, Otared Kavian wrote:
>> Dear all,
>>
>> I just read the thread started by Burak Emir about "Typesetting Arabic
>> today", and tried to typeset the sample sent by Idris Samawi Hamid.
>> One of the Arabic or Persian fonts that I have and LuaTeX can find is
>> Nadeem (working on Mac OS X 10.5.3), but what I get after typesetting is
>> the following attached PDF: all the characters are typeset with their
>> isolated form. However typestting the same text with XeConTeXt or XeTeX
>> gives a nice result.
>
> May be the font is built with AAT tables and not OpenType, XeTeX
> supports AAT on mac but I don't think LuaTeX does.

This seem to be the answer, take a look at
http://neowiki.neooffice.org/index.php/Problems_with_Fonts#Problems_when_using_Arabic_and_Indic_script_languages

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09  9:13 Arabic with LuaTeX vs. XeTeX Otared Kavian
  2008-06-09  9:23 ` Wolfgang Schuster
  2008-06-09 11:52 ` Khaled Hosny
@ 2008-06-09 14:52 ` Idris Samawi Hamid
  2008-06-09 23:25 ` Idris Samawi Hamid
  3 siblings, 0 replies; 18+ messages in thread
From: Idris Samawi Hamid @ 2008-06-09 14:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Otared,
Salaam

On Mon, 09 Jun 2008 03:13:06 -0600, Otared Kavian <otared@gmail.com> wrote:

> Dear all,
>
> I just read the thread started by Burak Emir about "Typesetting Arabic
> today", and tried to typeset the sample sent by Idris Samawi Hamid.
> One of the Arabic or Persian fonts that I have and LuaTeX can find is
> Nadeem (working on Mac OS X 10.5.3), but what I get after typesetting
> is the following attached PDF: all the characters are typeset with
> their isolated form. However typestting the same text with XeConTeXt
> or XeTeX gives a nice result.

Can you privately me that font Nadeem please?

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 11:38   ` Otared Kavian
@ 2008-06-09 15:09     ` Burak Emir
  2008-06-09 15:21       ` Otared Kavian
  0 siblings, 1 reply; 18+ messages in thread
From: Burak Emir @ 2008-06-09 15:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1022 bytes --]

On Mon, Jun 9, 2008 at 1:38 PM, Otared Kavian <otared@gmail.com> wrote:


> Hi Wolfgang,
>
> Thank you for your attention. However this is exactly what I did.
>
>
> >> \font\TradArabic = Nadeem*test    at 18pt
>

Hi Otared, I also tried with Nadeem, and I had exactly the same problem.



>
> >
> > Can you try Microsofts Arabtype font:
> > http://groups.msn.com/MicrosoftVOLTuserscommunity/homepage.msnw
> >
>
> I couldn't find the font you are mentioning: since I am on a Mac
> running Mac OS X 10.5.3, I am not sure whether the links there allows
> me to install such fonts.


I was looking for arabtype.ttf too, but I did not want to jump through the
MS group registration hoops, in the end I settled for this file of the same
name IIRC
http://www.4shared.com/file/40464607/d4ea457f/arabtype.html?s=1

installing a ttf on mac os is a matter of double-clicking (font book opens),
and pressing the "install font" button. The font ends up in ~/Library/Fonts
:D

Burak

-- 
Burak Emir
--
http://burak.emir.googlepages.com

[-- Attachment #1.2: Type: text/html, Size: 1847 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 15:09     ` Burak Emir
@ 2008-06-09 15:21       ` Otared Kavian
  2008-06-09 16:07         ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: Otared Kavian @ 2008-06-09 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 9 juin 08, at 17:09, Burak Emir wrote:

> […]
> Hi Otared, I also tried with Nadeem, and I had exactly the same  
> problem.

Hi Burak,

Thank you for testing that font. As a matter of fact I am not  
especially attracted to that font, but for some reason, unknwon to me,  
it is the only one (in Arabic at least…) that LuaTeX can typeset  
without complaining about "metric not found" and such.


> […]
> installing a ttf on mac os is a matter of double-clicking (font book  
> opens), and pressing the "install font" button. The font ends up in  
> ~/Library/Fonts :D
>
> Burak

Indeed… it so simple! But how should one let LuaTeX know about those  
fonts?

Best regards: OK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 15:21       ` Otared Kavian
@ 2008-06-09 16:07         ` Hans Hagen
  2008-06-09 16:43           ` Otared Kavian
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2008-06-09 16:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared Kavian wrote:

> Indeed… it so simple! But how should one let LuaTeX know about those  
> fonts?

set the OSFONTDIR environment variable

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:07         ` Hans Hagen
@ 2008-06-09 16:43           ` Otared Kavian
  2008-06-09 16:53             ` Mojca Miklavec
                               ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Otared Kavian @ 2008-06-09 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 9 juin 08, at 18:07, Hans Hagen wrote:

> Otared Kavian wrote:
>
>> Indeed… it so simple! But how should one let LuaTeX know about those
>> fonts?
>
> set the OSFONTDIR environment variable

Many thanks Hans: indeed that's what I did

	export OSFONTDIR=Library/Fonts
	export OSFONTDIR=System/Library/Fonts
	luatools --generate

and out of ignorance (whether is it OSFONTDIR or OSFONTSDIR…) I tried  
also
	export ODFONTSDIR=Library/Fonts
	export ODFONTSDIR=System/Library/Fonts
	luatools --generate

but LuaTeX cannot find the fonts in the fonts directory of my system,  
issuing the error message (this is for the font suggested by Wolfgang  
S.):
[…]
define font | font with name "Arabic Typesetting is not found
define font | unknown font "Arabic Typesetting, loading aborted
! Font \TradArabic="Arabic Typesetting*test" at 18pt not loadable:  
metric data not found or bad.
<to be read again>
                    \par


Best regards: OK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:43           ` Otared Kavian
@ 2008-06-09 16:53             ` Mojca Miklavec
  2008-06-09 20:45               ` Otared Kavian
  2008-06-09 21:40               ` Oliver Buerschaper
  2008-06-09 17:00             ` Hans Hagen
  2008-06-09 17:03             ` Burak Emir
  2 siblings, 2 replies; 18+ messages in thread
From: Mojca Miklavec @ 2008-06-09 16:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jun 9, 2008 at 6:43 PM, Otared Kavian wrote:
>
> On 9 juin 08, at 18:07, Hans Hagen wrote:
>
>> Otared Kavian wrote:
>>
>>> Indeed… it so simple! But how should one let LuaTeX know about those
>>> fonts?
>>
>> set the OSFONTDIR environment variable
>
> Many thanks Hans: indeed that's what I did
>
>        export OSFONTDIR=Library/Fonts
>        export OSFONTDIR=System/Library/Fonts
>        luatools --generate

You need to use
    export OSFONTDIR=/Library/Fonts;/System/Library/Fonts;~/Library/Fonts

Not sure if LuaTeX handles the tilde; in case it doesn't, put the
whole path there.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:43           ` Otared Kavian
  2008-06-09 16:53             ` Mojca Miklavec
@ 2008-06-09 17:00             ` Hans Hagen
  2008-06-09 17:03             ` Burak Emir
  2 siblings, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2008-06-09 17:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared Kavian wrote:
> On 9 juin 08, at 18:07, Hans Hagen wrote:
> 
>> Otared Kavian wrote:
>>
>>> Indeed… it so simple! But how should one let LuaTeX know about those
>>> fonts?
>> set the OSFONTDIR environment variable
> 
> Many thanks Hans: indeed that's what I did
> 
> 	export OSFONTDIR=Library/Fonts
> 	export OSFONTDIR=System/Library/Fonts
> 	luatools --generate
> 
> and out of ignorance (whether is it OSFONTDIR or OSFONTSDIR…) I tried  
> also
> 	export ODFONTSDIR=Library/Fonts
> 	export ODFONTSDIR=System/Library/Fonts
> 	luatools --generate
> 
> but LuaTeX cannot find the fonts in the fonts directory of my system,  
> issuing the error message (this is for the font suggested by Wolfgang  
> S.):
> […]
> define font | font with name "Arabic Typesetting is not found
> define font | unknown font "Arabic Typesetting, loading aborted
> ! Font \TradArabic="Arabic Typesetting*test" at 18pt not loadable:  
> metric data not found or bad.
> <to be read again>
>                     \par

if you want access by name ...

mtxrun --script font --reload

which will regenerate the database with names


-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:43           ` Otared Kavian
  2008-06-09 16:53             ` Mojca Miklavec
  2008-06-09 17:00             ` Hans Hagen
@ 2008-06-09 17:03             ` Burak Emir
  2 siblings, 0 replies; 18+ messages in thread
From: Burak Emir @ 2008-06-09 17:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 670 bytes --]

On Mon, Jun 9, 2008 at 6:43 PM, Otared Kavian <otared@gmail.com> wrote:

>
> On 9 juin 08, at 18:07, Hans Hagen wrote:
>
> > Otared Kavian wrote:
> >
> >> Indeed… it so simple! But how should one let LuaTeX know about those
> >> fonts?
> >
> > set the OSFONTDIR environment variable
>
> Many thanks Hans: indeed that's what I did
>
>        export OSFONTDIR=Library/Fonts
>        export OSFONTDIR=System/Library/Fonts
>        luatools --generate
>

Use /Users/<your_username>/Library/Fonts?
If you want several dirs, separate them as so
export OSFONTDIR=dir1;dir2

wash; rinse; repeat : )

hope this helps,
Burak

-- 
Burak Emir
--
http://burak.emir.googlepages.com

[-- Attachment #1.2: Type: text/html, Size: 1152 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:53             ` Mojca Miklavec
@ 2008-06-09 20:45               ` Otared Kavian
  2008-06-09 21:09                 ` Hans Hagen
  2008-06-09 21:40               ` Oliver Buerschaper
  1 sibling, 1 reply; 18+ messages in thread
From: Otared Kavian @ 2008-06-09 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 9 juin 08, at 18:53, Mojca Miklavec wrote:

> […]
> You need to use
>    export OSFONTDIR=/Library/Fonts;/System/Library/Fonts;~/Library/ 
> Fonts
>
> Not sure if LuaTeX handles the tilde; in case it doesn't, put the
> whole path there.
>
> Mojca

Hi Mojca and all,

As a matter of fact here is what I have in a file named "ok-lua" which  
is sourced upon loging in:

export TEXMFCACHE="/tmp"
export TEXMFCNF="{/usr/local/gwTeX/texmf/web2c/,/usr/local/gwTeX/}"
export TEXMF="{/Users/kavian/Library/texmf,/usr/local/gwTeX/ 
texmf.local,/usr/local/gwTeX/texmf.pkgs,/usr/local/gwTeX/texmf.gwtex,/ 
usr/local/gwTeX/texmf.texlive,/usr/local/gwTeX/texmf}"
export LUAINPUTS="{/usr/local/gwTeX/texmf.local/scripts/context/lua,/ 
usr/local/gwTeX/texmf.local/tex/context/base,/usr/local/gwTeX/ 
texmf.texlive/tex/context/base}"
export OSFONTDIR="{/System/Library/Fonts;/Library/Fonts;/Users/kavian/ 
Library/Fonts}"

But despite this LuaTeX doesn't find any arabic, system wide font.  
(The shell I use is bash: would thi sbe a cause?).

Best regards: OK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 20:45               ` Otared Kavian
@ 2008-06-09 21:09                 ` Hans Hagen
  0 siblings, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2008-06-09 21:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared Kavian wrote:
> On 9 juin 08, at 18:53, Mojca Miklavec wrote:
> 
>> […]
>> You need to use
>>    export OSFONTDIR=/Library/Fonts;/System/Library/Fonts;~/Library/ 
>> Fonts
>>
>> Not sure if LuaTeX handles the tilde; in case it doesn't, put the
>> whole path there.
>>
>> Mojca
> 
> Hi Mojca and all,
> 
> As a matter of fact here is what I have in a file named "ok-lua" which  
> is sourced upon loging in:
> 
> export TEXMFCACHE="/tmp"
> export TEXMFCNF="{/usr/local/gwTeX/texmf/web2c/,/usr/local/gwTeX/}"
> export TEXMF="{/Users/kavian/Library/texmf,/usr/local/gwTeX/ 
> texmf.local,/usr/local/gwTeX/texmf.pkgs,/usr/local/gwTeX/texmf.gwtex,/ 
> usr/local/gwTeX/texmf.texlive,/usr/local/gwTeX/texmf}"
> export LUAINPUTS="{/usr/local/gwTeX/texmf.local/scripts/context/lua,/ 
> usr/local/gwTeX/texmf.local/tex/context/base,/usr/local/gwTeX/ 
> texmf.texlive/tex/context/base}"
> export OSFONTDIR="{/System/Library/Fonts;/Library/Fonts;/Users/kavian/ 
> Library/Fonts}"

can you try:


export OSFONTDIR="{/System/Library/Fonts;/Library/Fonts,/Users/kavian/
Library/Fonts}"


comma, no ;

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 16:53             ` Mojca Miklavec
  2008-06-09 20:45               ` Otared Kavian
@ 2008-06-09 21:40               ` Oliver Buerschaper
  1 sibling, 0 replies; 18+ messages in thread
From: Oliver Buerschaper @ 2008-06-09 21:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> You need to use
>    export OSFONTDIR=/Library/Fonts;/System/Library/Fonts;~/Library/ 
> Fonts

Actually, I think the order of the directories should be slightly  
different ... if LuaTeX wants to blend in nicely with the Mac file  
system domains it should search for the fonts in the following order:

OSFONTDIR = $HOME/Library/Fonts:/Library/Fonts:/System/Library/Fonts

Oliver
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09  9:13 Arabic with LuaTeX vs. XeTeX Otared Kavian
                   ` (2 preceding siblings ...)
  2008-06-09 14:52 ` Idris Samawi Hamid
@ 2008-06-09 23:25 ` Idris Samawi Hamid
  2008-06-10  8:09   ` Hans Hagen
  3 siblings, 1 reply; 18+ messages in thread
From: Idris Samawi Hamid @ 2008-06-09 23:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Otared and all,

On Mon, 09 Jun 2008 03:13:06 -0600, Otared Kavian <otared@gmail.com> wrote:

> I just read the thread started by Burak Emir about "Typesetting Arabic
> today", and tried to typeset the sample sent by Idris Samawi Hamid.
> One of the Arabic or Persian fonts that I have and LuaTeX can find is
> Nadeem (working on Mac OS X 10.5.3), but what I get after typesetting
> is the following attached PDF: all the characters are typeset with
> their isolated form. However typestting the same text with XeConTeXt
> or XeTeX gives a nice result.

As Khaled and Wolfgang already intimated, the problem is that Nadeem is  
not an OpenType font, but rather AAT. XeTeX is mainly Mac-based so it's  
natural that it supports AAT.

It should not be too hard to overload GSUB and GPOS features for this  
particular font using the fea file overload feature of luatex (not sure if  
that has been fixed.)

I looked at the AAT code, and saved an fea file using FontForge: but the  
contextual analysis is not there, so I suspect that AAT fonts depend on  
something like uniscribe for certain basic features. We (=Hans) need to  
know what that is.

But at this stage of development, only pure OpenType fonts will be  
supported out of the box. For example: Traditional Arabic, which comes  
with XP, has OpenType tables but depends on Uniscribe instead of OpenType  
for, eg, making marks exceptions to the contextual analysis. Since the  
mark exception was not added to the GSUB table, voweled text appears  
unjoined in Trad. Arabic processed by luaTeX.

I suppose we (=Hans) could add some "spell-checking" to the otf analyzer,  
but that's dangerous and needs some careful thought. Maybe we can come up  
with various "spell-checking" options that could be turned on and off, so  
that old-technology (Nadeem is 1998), platform-dependent (like Nadeem and  
Trad. Ar.) fonts can be used.

In any case, we want to stay as platform-independent as possible. So for  
AAT, we may need to wait at least till someone (maybe one of you?) can  
come up with a spec so that we can implement a cross-platform solution for  
AAT.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Arabic with LuaTeX vs. XeTeX
  2008-06-09 23:25 ` Idris Samawi Hamid
@ 2008-06-10  8:09   ` Hans Hagen
  0 siblings, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2008-06-10  8:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Idris Samawi Hamid wrote:

> But at this stage of development, only pure OpenType fonts will be  
> supported out of the box. For example: Traditional Arabic, which comes  
> with XP, has OpenType tables but depends on Uniscribe instead of OpenType  
> for, eg, making marks exceptions to the contextual analysis. Since the  
> mark exception was not added to the GSUB table, voweled text appears  
> unjoined in Trad. Arabic processed by luaTeX.

one problem there is that the open type spec is not always clear which 
in turn can mean that apps do things different or maybe even know how to 
deal with certain fonts; another problem is that there is no prescribed 
behaviour ... ok, some dtp app can claim that version n+3 supports this 
or that feature, or adapts automatically to this or that situations but 
if that's then the 'standard' there is no reason why version n+1 should 
not have supported it (or should have been tagged as bugged)

> I suppose we (=Hans) could add some "spell-checking" to the otf analyzer,  
> but that's dangerous and needs some careful thought. Maybe we can come up  
> with various "spell-checking" options that could be turned on and off, so  
> that old-technology (Nadeem is 1998), platform-dependent (like Nadeem and  
> Trad. Ar.) fonts can be used.

we can add all kind of checking and compensation and make them pseudo 
features and then have them enabled based on info that we keep in a font 
database (like .. this font lacks this or that and therefore we need to 
enable such or so; of this feature in font foo is bugged so we disable it)

> In any case, we want to stay as platform-independent as possible. So for  
> AAT, we may need to wait at least till someone (maybe one of you?) can  
> come up with a spec so that we can implement a cross-platform solution for  
> AAT.

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-06-10  8:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-09  9:13 Arabic with LuaTeX vs. XeTeX Otared Kavian
2008-06-09  9:23 ` Wolfgang Schuster
2008-06-09 11:38   ` Otared Kavian
2008-06-09 15:09     ` Burak Emir
2008-06-09 15:21       ` Otared Kavian
2008-06-09 16:07         ` Hans Hagen
2008-06-09 16:43           ` Otared Kavian
2008-06-09 16:53             ` Mojca Miklavec
2008-06-09 20:45               ` Otared Kavian
2008-06-09 21:09                 ` Hans Hagen
2008-06-09 21:40               ` Oliver Buerschaper
2008-06-09 17:00             ` Hans Hagen
2008-06-09 17:03             ` Burak Emir
2008-06-09 11:52 ` Khaled Hosny
2008-06-09 12:00   ` Wolfgang Schuster
2008-06-09 14:52 ` Idris Samawi Hamid
2008-06-09 23:25 ` Idris Samawi Hamid
2008-06-10  8:09   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).