ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in mark to ligature handling
@ 2009-03-03 22:13 Khaled Hosny
  2009-03-04  8:37 ` Hans Hagen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Khaled Hosny @ 2009-03-03 22:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Marks don't get positioned correctly unless all marks are supplied, if
one mark is omitted, the next mark will be positioned at the first
anchor point, not in the second one etc, in some cases it'll even not
positioned on the anchor point at all.

In the attached sample, the first word in the line is correct,
subsequent ones aren't.
(The font used: 
http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)

Regards,
 Khaled

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

[-- Attachment #1.1.2: ligatures.tex --]
[-- Type: text/x-tex, Size: 415 bytes --]

\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT
\definefontfeature[otfnaskhi]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,calt=yes,
    rlig=yes,liga=yes,dlig=yes,curs=yes,
    mark=yes,mkmk=yes]
\font\test=SimpleNaskhi*otfnaskhi at 48pt\test
\obeylines
لِلَّهِ : للَّهِ : للهِ : للهُ
\hbox{}
\hbox{}
\hbox{}
شَيْ : شيْ : شِيْ : شيِ
\bye

[-- Attachment #1.1.3: ligatures.pdf --]
[-- Type: application/pdf, Size: 12200 bytes --]

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

* Re: Bug in mark to ligature handling
  2009-03-03 22:13 Bug in mark to ligature handling Khaled Hosny
@ 2009-03-04  8:37 ` Hans Hagen
  2009-03-04 10:56   ` Khaled Hosny
  2009-03-04 11:48 ` Hans Hagen
  2009-06-12 16:30 ` Khaled Hosny
  2 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2009-03-04  8:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> Marks don't get positioned correctly unless all marks are supplied, if
> one mark is omitted, the next mark will be positioned at the first
> anchor point, not in the second one etc, in some cases it'll even not
> positioned on the anchor point at all.

so, how are we supposed to know what marks are omitted

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

* Re: Bug in mark to ligature handling
  2009-03-04  8:37 ` Hans Hagen
@ 2009-03-04 10:56   ` Khaled Hosny
  0 siblings, 0 replies; 8+ messages in thread
From: Khaled Hosny @ 2009-03-04 10:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, Mar 04, 2009 at 09:37:26AM +0100, Hans Hagen wrote:
> Khaled Hosny wrote:
>> Marks don't get positioned correctly unless all marks are supplied, if
>> one mark is omitted, the next mark will be positioned at the first
>> anchor point, not in the second one etc, in some cases it'll even not
>> positioned on the anchor point at all.
>
> so, how are we supposed to know what marks are omitted

The order of the marks/base letters are inserted in the text string
should tell us, say we've a_b_c ligature, if the text string is 
"a b <mark1> c <mark2>", then we omitted the first mark in the, so
<mark1> will be applied to the second anchor point and <mark2> to the
third one.

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

* Re: Bug in mark to ligature handling
  2009-03-03 22:13 Bug in mark to ligature handling Khaled Hosny
  2009-03-04  8:37 ` Hans Hagen
@ 2009-03-04 11:48 ` Hans Hagen
  2009-03-04 12:46   ` Khaled Hosny
  2009-06-12 16:30 ` Khaled Hosny
  2 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2009-03-04 11:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> Marks don't get positioned correctly unless all marks are supplied, if
> one mark is omitted, the next mark will be positioned at the first
> anchor point, not in the second one etc, in some cases it'll even not
> positioned on the anchor point at all.
> 
> In the attached sample, the first word in the line is correct,
> subsequent ones aren't.
> (The font used: 
> http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)

can you check the new beta?

btw, use \starttext ... \stoptext and not \bye


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

* Re: Bug in mark to ligature handling
  2009-03-04 11:48 ` Hans Hagen
@ 2009-03-04 12:46   ` Khaled Hosny
  2009-03-04 14:14     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2009-03-04 12:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, Mar 04, 2009 at 12:48:36PM +0100, Hans Hagen wrote:
> Khaled Hosny wrote:
>> Marks don't get positioned correctly unless all marks are supplied, if
>> one mark is omitted, the next mark will be positioned at the first
>> anchor point, not in the second one etc, in some cases it'll even not
>> positioned on the anchor point at all.
>>
>> In the attached sample, the first word in the line is correct,
>> subsequent ones aren't.
>> (The font used:  
>> http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)
>
> can you check the new beta?

It is fixed in the beta, thanks.

Now I found another bug, when having two marks on the same base glyph,
the first one is positioned correctly but not the second one.
See the attached sample (I swapped the marks on the next word).

>
> btw, use \starttext ... \stoptext and not \bye

Will do, thanks.

Regards,
 Khaled


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

[-- Attachment #1.1.2: ligatures.tex --]
[-- Type: text/x-tex, Size: 320 bytes --]

\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT
\definefontfeature[otfnaskhi]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,calt=yes,
    rlig=yes,liga=yes,dlig=yes,curs=yes,
    mark=yes,mkmk=yes]
\starttext
\font\test=SimpleNaskhi*otfnaskhi at 48pt\test

تِّ : تِّ
\stoptext

[-- Attachment #1.1.3: ligatures.pdf --]
[-- Type: application/pdf, Size: 11053 bytes --]

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

* Re: Bug in mark to ligature handling
  2009-03-04 12:46   ` Khaled Hosny
@ 2009-03-04 14:14     ` Hans Hagen
  2009-03-04 16:25       ` Khaled Hosny
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2009-03-04 14:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> On Wed, Mar 04, 2009 at 12:48:36PM +0100, Hans Hagen wrote:
>> Khaled Hosny wrote:
>>> Marks don't get positioned correctly unless all marks are supplied, if
>>> one mark is omitted, the next mark will be positioned at the first
>>> anchor point, not in the second one etc, in some cases it'll even not
>>> positioned on the anchor point at all.
>>>
>>> In the attached sample, the first word in the line is correct,
>>> subsequent ones aren't.
>>> (The font used:  
>>> http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)
>> can you check the new beta?
> 
> It is fixed in the beta, thanks.
> 
> Now I found another bug, when having two marks on the same base glyph,
> the first one is positioned correctly but not the second one.
> See the attached sample (I swapped the marks on the next word).

another attempt ..

can you coordinate your tests with idris (he collects test snippets so 
that eventually we have some kind of regression test)

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

* Re: Bug in mark to ligature handling
  2009-03-04 14:14     ` Hans Hagen
@ 2009-03-04 16:25       ` Khaled Hosny
  0 siblings, 0 replies; 8+ messages in thread
From: Khaled Hosny @ 2009-03-04 16:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, Mar 04, 2009 at 03:14:17PM +0100, Hans Hagen wrote:
> Khaled Hosny wrote:
>> On Wed, Mar 04, 2009 at 12:48:36PM +0100, Hans Hagen wrote:
>>> Khaled Hosny wrote:
>>>> Marks don't get positioned correctly unless all marks are supplied, if
>>>> one mark is omitted, the next mark will be positioned at the first
>>>> anchor point, not in the second one etc, in some cases it'll even not
>>>> positioned on the anchor point at all.
>>>>
>>>> In the attached sample, the first word in the line is correct,
>>>> subsequent ones aren't.
>>>> (The font used:   
>>>> http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)
>>> can you check the new beta?
>>
>> It is fixed in the beta, thanks.
>>
>> Now I found another bug, when having two marks on the same base glyph,
>> the first one is positioned correctly but not the second one.
>> See the attached sample (I swapped the marks on the next word).
>
> another attempt ..

That one is fixed too, thanks. (Time to find another bug :) )

> can you coordinate your tests with idris (he collects test snippets so  
> that eventually we have some kind of regression test)

I uploaded the files in the svn repository with font:
http://code.google.com/p/raqm/source/browse/#svn/trunk/fonts/simplenaskhi/tests

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

* Re: Bug in mark to ligature handling
  2009-03-03 22:13 Bug in mark to ligature handling Khaled Hosny
  2009-03-04  8:37 ` Hans Hagen
  2009-03-04 11:48 ` Hans Hagen
@ 2009-06-12 16:30 ` Khaled Hosny
  2 siblings, 0 replies; 8+ messages in thread
From: Khaled Hosny @ 2009-06-12 16:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, Mar 04, 2009 at 12:13:38AM +0200, Khaled Hosny wrote:
> 
> Marks don't get positioned correctly unless all marks are supplied, if
> one mark is omitted, the next mark will be positioned at the first
> anchor point, not in the second one etc, in some cases it'll even not
> positioned on the anchor point at all.
> 
> In the attached sample, the first word in the line is correct,
> subsequent ones aren't.
> (The font used: 
> http://raqm.googlecode.com/svn/trunk/fonts/simplenaskhi/SimpleNaskhi.ttf)

I think I found another similar bug. In the attached file, the mark
should have applied to index 4 not index 1 (since it comes after the
last component in the ligature).

BTW, thanks for \showotfcomposition command, it is very handy in
"visually" debugging opentype fonts :)

P.S. You need the latest version of the font to trigger this bug.

Regards,
 Khaled


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

[-- Attachment #1.1.2: liga_mark.tex --]
[-- Type: text/x-tex, Size: 273 bytes --]

\definefontfeature[otfnaskhi]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,calt=yes,
    rlig=yes,liga=yes,dlig=yes,curs=yes,
    mark=yes,mkmk=yes]
\starttext
\showotfcomposition{SimpleNaskhi*otfnaskhi at 40pt}{-1}{اللهِ}
\stoptext

[-- Attachment #1.1.3: liga_mark.pdf --]
[-- Type: application/pdf, Size: 22739 bytes --]

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

end of thread, other threads:[~2009-06-12 16:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-03 22:13 Bug in mark to ligature handling Khaled Hosny
2009-03-04  8:37 ` Hans Hagen
2009-03-04 10:56   ` Khaled Hosny
2009-03-04 11:48 ` Hans Hagen
2009-03-04 12:46   ` Khaled Hosny
2009-03-04 14:14     ` Hans Hagen
2009-03-04 16:25       ` Khaled Hosny
2009-06-12 16:30 ` 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).