ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Misplaced integral *scripts
@ 2011-04-23 21:57 Khaled Hosny
  2011-04-23 22:11 ` Khaled Hosny
  0 siblings, 1 reply; 5+ messages in thread
From: Khaled Hosny @ 2011-04-23 21:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab

[-- Attachment #2: integrals.cld --]
[-- Type: text/plain, Size: 453 bytes --]

context.setupbodyfont{"xits"}
context.starttext()


for _,s in next, {"text", "display"} do
    context.startTEXpage()
    context.startformula()
    context([[\%sstyle]], s)
    for i = 0x222B, 0x2233 do
        context([[\Umathchar "1"0"%4X\nolimits_{x}^{y}]], i)
        end
    for i = 0x2A0B, 0x2A1C do
        context([[\Umathchar "1"0"%4X\nolimits_{x}^{y}]], i)
    end
    context.stopformula()
    context.stopTEXpage()
end

context.stoptext()

[-- Attachment #3: integrals.pdf --]
[-- Type: application/pdf, Size: 11338 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 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
___________________________________________________________________________________

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

* Re: Misplaced integral *scripts
  2011-04-23 21:57 Misplaced integral *scripts Khaled Hosny
@ 2011-04-23 22:11 ` Khaled Hosny
  2011-04-23 22:32   ` Khaled Hosny
  0 siblings, 1 reply; 5+ messages in thread
From: Khaled Hosny @ 2011-04-23 22:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: Misplaced integral *scripts
  2011-04-23 22:11 ` Khaled Hosny
@ 2011-04-23 22:32   ` Khaled Hosny
  2011-04-24 13:18     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Khaled Hosny @ 2011-04-23 22:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

[-- Attachment #2: ic.diff --]
[-- Type: text/x-diff, Size: 499 bytes --]

--- /home/khaled/vc/tex/context/context/tex/context/base/font-otf.lua	2011-04-20 12:06:32.000000000 +0200
+++ /media/sda8/tex/context/tex/texmf-context/tex/context/base/font-otf.lua	2011-04-24 00:25:52.000000000 +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

[-- Attachment #3: integrals.pdf --]
[-- Type: application/pdf, Size: 11494 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 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
___________________________________________________________________________________

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

* Re: Misplaced integral *scripts
  2011-04-23 22:32   ` Khaled Hosny
@ 2011-04-24 13:18     ` Hans Hagen
  2011-04-24 14:57       ` Khaled Hosny
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2011-04-24 13:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: Misplaced integral *scripts
  2011-04-24 13:18     ` Hans Hagen
@ 2011-04-24 14:57       ` Khaled Hosny
  0 siblings, 0 replies; 5+ messages in thread
From: Khaled Hosny @ 2011-04-24 14:57 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

end of thread, other threads:[~2011-04-24 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-23 21:57 Misplaced integral *scripts Khaled Hosny
2011-04-23 22:11 ` Khaled Hosny
2011-04-23 22:32   ` Khaled Hosny
2011-04-24 13:18     ` Hans Hagen
2011-04-24 14:57       ` 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).