ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Arabic protrosion
@ 2009-04-06  6:40 Khaled Hosny
       [not found] ` <op.uryvrilxfkrasx@your-b27fb1c401>
  0 siblings, 1 reply; 3+ messages in thread
From: Khaled Hosny @ 2009-04-06  6:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1.1: Type: text/plain, Size: 312 bytes --]

The attached patch adds Arabic coma, semicolon, full stop (used in Urdu)
and question mark to font-ext.lua for protrusion.
Now, combined with glyph expansion, I don't get any overfull boxes.

Regards,
 Khaked


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

[-- Attachment #1.1.2: font-ext.lua.diff --]
[-- Type: text/x-diff, Size: 899 bytes --]

--- font-ext.lua	2009-03-03 11:48:35.000000000 +0200
+++ /home/khaled/font-ext.lua	2009-04-06 08:33:26.000000000 +0200
@@ -134,6 +134,9 @@
     [0x2014] = { 0, 0.33 }, -- emdash
     [0x3001] = { 0, 1    }, -- ideographic comma      、
     [0x3002] = { 0, 1    }, -- ideographic full stop  。
+    [0x060C] = { 0, 1    }, -- arabic comma           ،
+    [0x061B] = { 0, 1    }, -- arabic semicolon       ؛
+    [0x06D4] = { 0, 1    }, -- arabic full stop       ۔
 
 }
 
@@ -154,6 +157,10 @@
     [0x002D] = { 0,    0.70 }, -- hyphen
     [0x2013] = { 0,    0.30 }, -- endash
     [0x2014] = { 0,    0.20 }, -- emdash
+    [0x060C] = { 0,    0.70 }, -- arabic comma
+    [0x061B] = { 0,    0.50 }, -- arabic semicolon
+    [0x06D4] = { 0,    0.70 }, -- arabic full stop
+    [0x061F] = { 0,    0.20 }, -- ؟
 
     -- todo: left and right quotes: .5 double, .7 single
 

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 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] 3+ messages in thread

* Re: Arabic protrosion
       [not found] ` <op.uryvrilxfkrasx@your-b27fb1c401>
@ 2009-04-06 13:46   ` Hans Hagen
  2009-04-06 20:20   ` Khaled Hosny
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2009-04-06 13:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Mon, 06 Apr 2009 00:40:12 -0600, Khaled Hosny <khaledhosny@eglug.org> 
> wrote:
> 
>> The attached patch adds Arabic coma, semicolon, full stop (used in Urdu)
>> and question mark to font-ext.lua for protrusion.
>> Now, combined with glyph expansion, I don't get any overfull boxes.
> 
> Arabic-script microtypography is one of the cornerstones of the Oriental 
> TeX project. We've been studying this matter for some time now:
> 
> Because of
> 
> a) the normal wide spacing around Arabic punctuation, and
> 
> b) the large size of Arabic punctuation relative to Latin,
> 
> I'm not sure that protrusion of Arabic-script punctuation is a good 
> idea. It needs a lot of thought, and a lot of testing, before adding it 
> to the system. As for glyph expansion, I don't see how that works at all 
> with the current model, except perhaps with very horizontal fonts. But 
> in that case all that's needed is smart tatweel, not glyph expansion. 
> For hq fonts the current glyph expansion model will mess up the 
> contextual connections.
> 
> Although one can certainly do things with the current model of 
> protrusion and hz, we need more, much more. Khaled, send me some tests 
> off-list and I'll examine them in light of the overall analysis as we 
> prepare for adding Arabic microtypography support, hopefully pretty 
> soon. Thanks plenty for the contributions, and

ok; in the meantime i added his patches since they don't hurt

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] 3+ messages in thread

* Re: Arabic protrosion
       [not found] ` <op.uryvrilxfkrasx@your-b27fb1c401>
  2009-04-06 13:46   ` Hans Hagen
@ 2009-04-06 20:20   ` Khaled Hosny
  1 sibling, 0 replies; 3+ messages in thread
From: Khaled Hosny @ 2009-04-06 20:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Mon, Apr 06, 2009 at 07:30:33AM -0600, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Mon, 06 Apr 2009 00:40:12 -0600, Khaled Hosny <khaledhosny@eglug.org>  
> wrote:
>
>> The attached patch adds Arabic coma, semicolon, full stop (used in Urdu)
>> and question mark to font-ext.lua for protrusion.
>> Now, combined with glyph expansion, I don't get any overfull boxes.
>
> Arabic-script microtypography is one of the cornerstones of the Oriental  
> TeX project. We've been studying this matter for some time now:
>
> Because of
>
> a) the normal wide spacing around Arabic punctuation, and
>
> b) the large size of Arabic punctuation relative to Latin,
>
> I'm not sure that protrusion of Arabic-script punctuation is a good idea. 
> It needs a lot of thought, and a lot of testing, before adding it to the  
> system.

Indeed, more testing is needed, but since neither protrusion nor
expansion is on by default, I think it is safe to have them now so we
can do more testing and tune it later, when someone enables hz features,
he should no enough to judge himself about the quality of the result and
he can always turn it back off and will lose nothing.

> As for glyph expansion, I don't see how that works at all with 
> the current model, except perhaps with very horizontal fonts. But in that 
> case all that's needed is smart tatweel, not glyph expansion. For hq 
> fonts the current glyph expansion model will mess up the contextual 
> connections.

I think the minimal font expansion, that we have, is very unlikely to be
noticed by the reader, but I completely agree that great care should be
taken, I've been reading some Arabic book few months ago and I'm pretty
sure they used the font expansion feature of InDesign because it was
very visible and annoying.

>
> Although one can certainly do things with the current model of protrusion 
> and hz, we need more, much more. Khaled, send me some tests off-list and  
> I'll examine them in light of the overall analysis as we prepare for  
> adding Arabic microtypography support, hopefully pretty soon.

I was preparing some test files, when I accidentally removed all files
that I was working on recently, since I don't have a backup, it'll take
some time.

> سلام
وعليكم السلام

Regards,
 Khaled


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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 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] 3+ messages in thread

end of thread, other threads:[~2009-04-06 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06  6:40 Arabic protrosion Khaled Hosny
     [not found] ` <op.uryvrilxfkrasx@your-b27fb1c401>
2009-04-06 13:46   ` Hans Hagen
2009-04-06 20:20   ` Khaled Hosny

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).