ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Khaled Hosny <khaledhosny@eglug.org>
To: Hans Hagen <pragma@wxs.nl>
Cc: "mailing list for ConTeXt users" <ntg-context@ntg.nl>,
	"Idris Samawi Hamid ادريس سماوي حامد" <ishamid@colostate.edu>,
	"Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: 10+ reasons why I still use MKII
Date: Fri, 14 May 2010 15:37:02 +0300	[thread overview]
Message-ID: <20100514123702.GA6064@khaled-laptop> (raw)
In-Reply-To: <4BEC70BE.6020004@wxs.nl>

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

On Thu, May 13, 2010 at 11:35:58PM +0200, Hans Hagen wrote:
> On 13-5-2010 11:26, Khaled Hosny wrote:
> >On Thu, May 13, 2010 at 10:25:06PM +0200, Hans Hagen wrote:
> >>On 13-5-2010 10:06, Khaled Hosny wrote:
> >>
> >>>Nothing special, I always expect interline space to be fixed, I don't
> >>>know if TeX always make interline spacing variable, but this wasn't an
> >>>issue with English text. However, with Arabic, Tashkil marks seems to
> >>>always cause a noticeable extra whitespace above the line.
> >>>See the uneven distribution of vertical whitespace in this example (it
> >>>can be even worse than this in reality):
> >>
> >>for arabic you really need to set the interline space (idris might
> >>have more input on this)
> >>
> >>- it has more height than depth
> >
> >Not always عٍ or فيٍ is as deep as high is أً.
> 
> so for say 12pt arabic we should use 8pt ht and 8pt depth?

I'm not sure about this, but I'd rather trust the font designer for
knowing better about his font, and something like in the attached file
(except it doesn't work :) see my other mail)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #2: linespace.tex --]
[-- Type: text/x-tex, Size: 719 bytes --]

\usemodule[simplefonts]
\setmainfont[Arabic Typesetting][features=arabic]

\setuplayout[grid=force]
\showgrid

\starttext

\startluacode
  local otfdata  = fonts.ids[font.current()].shared.otfdata
  local ascent   = otfdata.metadata.ascent
  local descent  = otfdata.metadata.descent

  local tascent  = (otfdata.pfminfo.os2_typoascent  + ascent ) / 1000
  local tdescent =-(otfdata.pfminfo.os2_typodescent - descent) / 1000
  local linegap  = (otfdata.pfminfo.linegap)                   / 1000

  tex.sprint(
    string.format(
      "\\setupinterlinespace[height=\%sem, depth=\%sem, distance=\%sem]",
      tascent, -tdescent, linegap
    )
  )
\stopluacode

\pardir TRT \textdir TRT
\input ibn_hisham.txt

\stoptext

[-- Attachment #3: ibn_hisham.txt --]
[-- Type: text/plain, Size: 4668 bytes --]

طَرَحَتْنِي النَّوَى مَطَارِحَهَا حَتّى إذَا وَطِئْتُ جُرْجَان الأَقْصى. فاسْتَظْهَرْتُ عَلَى الأَيامِ بِضِياعٍ أَجَلْتُ فِيهاَ يَدَ الْعِمَارةِ، وَأَمْوَالٍ وَقَفْتُهَا عَلى التِّجَارَةِ، وَحَانُوتٍ جَعَلْتُهُ مَثَابَةٍ، وَرُفْقَةٍ اتَّخَذْتُهَا صَحَابَةً، وَجَعَلْتُ لِلْدَّارِ، حَاشِيَتَيِ النَّهَار، وللحَانُوتِ بَيْنَهُمَا، فَجَلَسْنَا يَوْمًا نَتَذَاكَرُ القرِيضَ وَأَهْلَهُ، وَتِلْقَاءَنا شَابّ قَدْ جَلَسَ غَيْرَ بَعِيدٍ يُنْصِتُ وَكَأَنّهُ يَفْهَمُ، وَيَسْكتُ وَكَأَنّهُ لاَ يَعْلَمُ حَتّى إِذَا مَالَ الكَلاَمُ بِنَا مَيْلَهُ، وَجَرّ الْجِدَالُ فِينَا ذَيْلَهُ، قَالَ: قَدْ أَصَبْتُمْ عُذَيَقَهُ، وَوَافَيتُمْ جُذَيْلَهُ، وَلَوْ شِئْتُ لَلَفْظْتُ وَأَفَضْتُ، وَلَوْ قُلْتُ لأَصْدَرْتُ وَأَوْرَدْتُ، وَلَجَلَوْتُ الْحقّ في مَعْرَضِ بَيَانٍ يُسْمِعُ الصُّمَّ، وَيُنزلُ الْعُصْمَ، فَقُلْتُ: يَا فَاضِلُ أدْنُ فَقَدْ مَنَّيْتَ، وَهَاتِ فَقَدْ أَثْنَيتَ، فَدَنَا وَقَالَ: سَلُونِي أُجِبْكُمْ، وَاسْمَعُوا أُعْجِبْكُمْ. فَقُلْنَا: مَا تَقُولُ فِي امْرِىءِ الْقَيسِ؟ قَالَ: هُوَ أَوَّلُ مَنْ وَقَفَ بِالدِّيارِ وَعَرَصَاتِهَا، وَاغْتَدَى وَالطَّيرُ فِي وَكَنَاتِهَا، وَوَصَفَ الْخيلَ بِصِفَاِتهَا، وَلَمْ يَقُلِ الشِّعْرَ كَاسِيًا. وَلَمْ يُجِدِ القَوْلَ رَاغِبًا، فَفَضَلَ مَنْ تَفَتَّقَ للْحِيلةِ لِسَانُهُ، وَانْتَجَعَ لِلرَّغْبَة بَنَانُهُ، قُلْنَا: فَما تَقُولُ فِي الْنَّابِغَةِ؟ قالَ: يَثلِبُ إِذَا حَنِقَ، وَيَمْدَحُ إِذَا رَغِبَ، وَيَعْتَذِرُ إِذَا رَهِبَ، فَلاَ يَرْمي إِلاَّ صَائِبًا، قُلْنَا:فَمَا تَقُولُ فِي زُهَيرٍ؟ قَالَ يُذِيبُ الشِّعرَ، والشعْرُ يُذيبَهُ، وَيَدعُو القَولَ وَالسِّحْرَ يُجِيبُهُ، قُلْنَا: فَمَا تَقُولُ فِي طَرَفَةَ: قَالَ: هُوَ ماَءُ الأشْعَارِ وَطينَتُها، وَكَنْزُ الْقَوَافِي وَمَديِنَتُهَا، مَاتَ وَلَمْ تَظْهَرْ أَسْرَارُ دَفَائِنِهِ وَلَمْ تُفْتَحْ أَغْلاَقُ خَزَائِنِهِ، قُلْنَا: فَمَا تَقُولُ فِي جَرِيرٍ وَالْفَرَزْدَقِ؟ أَيُّهُمَا أَسْبَقُ؟ فَقَالَ: جَرِيرٌ أَرَقُّ شِعْرًا، وَأَغْزَرُ غَزْرًا وَالْفَرَزْدَقُ أَمْتَنُ صَخْرًا، وَأَكْثَرُ فَخْرًا وَجَرِيرٌ أَوْجَعُ هَجْوًا، وَأَشْرَفُ يَوْمًا وَالْفَرَزْدَقُ أَكَثَرُ رَوْمًا، وَأَكْرَمُ قَوْمًا، وَجَرِيرٌ إِذَا نَسَبَ أَشْجَى، وَإِذَا ثَلَبَ أَرْدَى، وَإِذَا مَدَحَ أَسْنَى، وَالْفَرزدقُ إِذَا افْتَخَرَ أَجْزَى، وَإِذَا احْتَقرَ أَزرَى، وَإِذا وصَفَ أَوفَى، قُلنَا: فَمَا تَقُولُ فِي المُحْدَثِينَ منْ الشُّعَراءِ والمُتَقَدِّمينَ مِنهُمْ؟ قالَ: المُتَقَدِّمونَ أَشْرفُ لَفْظًا، وَأَكثرُ منْ المَعَاني حَظًا، وَالمُتَأَخِّرونَ أَلْطَفُ صُنْعًا، وَأَرَقُّ نَسْجًا، قُلْنا: فَلَو أَرَيْتَ مِنْ أَشْعارِكَ، وَرَوَيْتَ لَنا مِنْ أَخْبارِكَ، قالَ: خُذْهَما في مَعْرِضٍ واحِدٍ، وَقالَ:

[-- Attachment #4: Type: text/plain, Size: 486 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2010-05-14 12:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 13:48 Mojca Miklavec
2010-05-12 14:44 ` Taco Hoekwater
2010-05-12 15:15 ` Hans Hagen
2010-05-13 13:42   ` Mojca Miklavec
2010-05-13 13:55     ` luigi scarso
2010-05-13 14:16     ` Hans Hagen
2010-05-13 14:32       ` Khaled Hosny
2010-05-13 15:00         ` Hans Hagen
2010-05-13 17:08           ` Khaled Hosny
2010-05-13 21:09             ` Hans Hagen
2010-05-14 13:52               ` Henning Hraban Ramm
2010-05-13 18:46           ` Idris Samawi Hamid ادريس  سماوي حامد
2010-05-13 20:06             ` Khaled Hosny
2010-05-13 19:31               ` Idris Samawi Hamid ادريس  سماوي حامد
2010-05-13 21:05                 ` Hans Hagen
2010-05-13 20:25               ` Hans Hagen
2010-05-13 21:26                 ` Khaled Hosny
2010-05-13 21:35                   ` Hans Hagen
2010-05-14 12:37                     ` Khaled Hosny [this message]
2010-05-14 12:54                       ` Hans Hagen
2010-05-14 13:10                         ` Khaled Hosny
2010-05-14 14:52                       ` Idris Samawi Hamid ادريس   سماوي حامد
2010-05-13 18:34       ` Mojca Miklavec
2010-05-13 21:49         ` Hans Hagen
2010-05-14  5:23     ` Taco Hoekwater
2010-05-12 15:20 ` Aditya Mahajan
2010-05-12 15:23   ` Taco Hoekwater
2010-05-12 15:41     ` Aditya Mahajan
2010-05-12 15:45       ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100514123702.GA6064@khaled-laptop \
    --to=khaledhosny@eglug.org \
    --cc=ishamid@colostate.edu \
    --cc=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).