Re: [NTG-context] Misplaced integral *scripts

2011-04-24 Thread Hans Hagen

On 24-4-2011 12:32, Khaled Hosny wrote:

On Sun, Apr 24, 2011 at 12:11:15AM +0200, Khaled Hosny wrote:

On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote:

See the attached file, it is broken for all OTF fonts; the italic
correction is used the wrong way (added to width while it should be
subtracted from it). It seems to be a ConTeXt issue (testing with same
luatex binary but with TeXLive ConTeXt gives correct output).


Actually, it seems italic correction is just ignored, indeed looking at
the cached lua file there is no italic correction at all.


The attached patch fixes it (it is good to have git repository to
compare different context version, just if it was a real git
repository not just code dumps).


This would have be hard to nail down with diffs I guess as it is part of 
the change to the userdata loading approach which came with lots of 
changes in the code (as I then also changed the cache data model).


Thanks for the patch, applied. (I must admit that the italic bit is 
still the messy part of otf, tfm, math engine.)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Misplaced integral *scripts

2011-04-24 Thread Khaled Hosny
On Sun, Apr 24, 2011 at 03:18:31PM +0200, Hans Hagen wrote:
 On 24-4-2011 12:32, Khaled Hosny wrote:
 On Sun, Apr 24, 2011 at 12:11:15AM +0200, Khaled Hosny wrote:
 On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote:
 See the attached file, it is broken for all OTF fonts; the italic
 correction is used the wrong way (added to width while it should be
 subtracted from it). It seems to be a ConTeXt issue (testing with same
 luatex binary but with TeXLive ConTeXt gives correct output).
 
 Actually, it seems italic correction is just ignored, indeed looking at
 the cached lua file there is no italic correction at all.
 
 The attached patch fixes it (it is good to have git repository to
 compare different context version, just if it was a real git
 repository not just code dumps).
 
 This would have be hard to nail down with diffs I guess as it is
 part of the change to the userdata loading approach which came with
 lots of changes in the code (as I then also changed the cache data
 model).

I actually found it by looking at diffs (after spending an hour or so
wondering through the code until I knew what to look for) using the git
repository here:

http://gitorious.org/context/

It keeps history of beta releases which is good compromise.

 Thanks for the patch, applied. (I must admit that the italic bit is
 still the messy part of otf, tfm, math engine.)

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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
___


Re: [NTG-context] Misplaced integral *scripts

2011-04-23 Thread Khaled Hosny
On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote:
 See the attached file, it is broken for all OTF fonts; the italic
 correction is used the wrong way (added to width while it should be
 subtracted from it). It seems to be a ConTeXt issue (testing with same
 luatex binary but with TeXLive ConTeXt gives correct output).

Actually, it seems italic correction is just ignored, indeed looking at
the cached lua file there is no italic correction at all.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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
___


Re: [NTG-context] Misplaced integral *scripts

2011-04-23 Thread Khaled Hosny
On Sun, Apr 24, 2011 at 12:11:15AM +0200, Khaled Hosny wrote:
 On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote:
  See the attached file, it is broken for all OTF fonts; the italic
  correction is used the wrong way (added to width while it should be
  subtracted from it). It seems to be a ConTeXt issue (testing with same
  luatex binary but with TeXLive ConTeXt gives correct output).
 
 Actually, it seems italic correction is just ignored, indeed looking at
 the cached lua file there is no italic correction at all.

The attached patch fixes it (it is good to have git repository to
compare different context version, just if it was a real git
repository not just code dumps).

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
--- /home/khaled/vc/tex/context/context/tex/context/base/font-otf.lua	2011-04-20 12:06:32.0 +0200
+++ /media/sda8/tex/context/tex/texmf-context/tex/context/base/font-otf.lua	2011-04-24 00:25:52.0 +0200
@@ -817,6 +817,7 @@
 local marks = { }
 for unicode, description in next, descriptions do
 local glyph = description.glyph
+local italic = glyph.italic_correction
 if not italic then
 -- skip
 elseif italic == 0 then


integrals.pdf
Description: Adobe PDF document
___
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
___