ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bug in \setfontfeature
@ 2008-01-02  3:19 Idris Samawi Hamid
  2008-01-02  7:16 ` luigi scarso
  2008-01-02  8:43 ` Wolfgang Schuster
  0 siblings, 2 replies; 9+ messages in thread
From: Idris Samawi Hamid @ 2008-01-02  3:19 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen, Taco Hoekwater

Dear consortium,

check this out:

==============================================
% engine=luatex

\definefontfeature
   [oldstyle]
   [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]

\setfontfeature{oldstyle}

\starttext
1234567890

\startitemize
\item test
\stopitemize

\stoptext
==============================================

log:

============
error: ...onTeXt/tex/texmf-local/tex/context/base/font-otf.lua:1890:  
attempt to index local 'shared' (a nil value)
.
\dolistitem ...tyle \c!color {\listitem }\fi \fi }
                                                   \ifconditional  
\fittinglis...
\complexdoitemgroupitem ...obreak \fi \dolistitem
                                                   \relax \ifconditional  
\pac...
<to be read again>
                    t
l.13 \item t
             est
============

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02  3:19 bug in \setfontfeature Idris Samawi Hamid
@ 2008-01-02  7:16 ` luigi scarso
  2008-01-02  8:43 ` Wolfgang Schuster
  1 sibling, 0 replies; 9+ messages in thread
From: luigi scarso @ 2008-01-02  7:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Jan 2, 2008 4:19 AM, Idris Samawi Hamid <ishamid@colostate.edu> wrote:
> Dear consortium,
>
> check this out:
>
> ==============================================
> % engine=luatex
>
> \definefontfeature
>    [oldstyle]
>    [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]
>
> \setfontfeature{oldstyle}
>
> \starttext
> 1234567890
>
> \startitemize
> \item test
> \stopitemize
>
> \stoptext
> ==============================================
>
> log:
>
> ============
> error: ...onTeXt/tex/texmf-local/tex/context/base/font-otf.lua:1890:
> attempt to index local 'shared' (a nil value)
> .
> \dolistitem ...tyle \c!color {\listitem }\fi \fi }
>                                                    \ifconditional
> \fittinglis...
> \complexdoitemgroupitem ...obreak \fi \dolistitem
>                                                    \relax \ifconditional
> \pac...
> <to be read again>
>                     t
> l.13 \item t
>              est
> ============

Same error here.

ConTeXt  ver: 2007.12.29 22:30 MKIV  fmt: 2007.12.30  int: english/english
This is LuaTeX, Version snapshot-0.20.2-2007121721 (Web2C 7.5.6)

-- 
luigi
http://wiki.contextgarden.net/User:Luigi.scarso/Merry_Christmas_2007
....
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
___________________________________________________________________________________
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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02  3:19 bug in \setfontfeature Idris Samawi Hamid
  2008-01-02  7:16 ` luigi scarso
@ 2008-01-02  8:43 ` Wolfgang Schuster
  2008-01-02  9:11   ` Hans Hagen
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2008-01-02  8:43 UTC (permalink / raw)
  To: ntg-context

On Tue, 01 Jan 2008 20:19:10 -0700
"Idris Samawi Hamid" <ishamid@colostate.edu> wrote:

> Dear consortium,
> 
> check this out:
> 
> ==============================================
> % engine=luatex
> 
> \definefontfeature
>    [oldstyle]
>    [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]
> 
> \setfontfeature{oldstyle}
> 
> \starttext
> 1234567890
> 
> \startitemize
> \item test
> \stopitemize
> 
> \stoptext
> ==============================================
> 
> log:
> 
> ============
> error: ...onTeXt/tex/texmf-local/tex/context/base/font-otf.lua:1890:  
> attempt to index local 'shared' (a nil value)
> .
> \dolistitem ...tyle \c!color {\listitem }\fi \fi }
>                                                    \ifconditional  
> \fittinglis...
> \complexdoitemgroupitem ...obreak \fi \dolistitem
>                                                    \relax \ifconditional  
> \pac...
> <to be read again>
>                     t
> l.13 \item t
>              est
> ============
> 
> Best wishes
> Idris

I have another one.

% engine=luatex

\definefontfeature[texlig][tlig=yes]
\setfontfeature{texlig}

\starttext
--
\stoptext

If I set tlig=no everything works fine, but with tlig=yes I get the
following error message.

error: ...2tex/share/texmf-local/tex/context/base/font-otf.lua:2017:
attempt to index field 'description' (a nil value)
.
\doejectpage ->\par
                    \ifvmode \ifdim \pagetotal >\pagegoal \else
\normalvfil ... \superejectpage ->\doejectpage
                               \supereject
\@@pe:last ->\ejectinsert \gotonextpageX
                                         \relax \doifbothsidesoverruled
{\sh... \next1 #1,->\executepagebreakhandler {#1}
                                         \doprocesscommaitem
\doprocesscommalist ...item \gobbleoneargument #1,
                                                  ]\relax \global
\advance \... \dopagebreak ...tes \executepagebreakhandlers {#1}
                                                  \else \flushnotes
\execute... ...
l.9 \stoptext

?

Wolfgang
___________________________________________________________________________________
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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02  8:43 ` Wolfgang Schuster
@ 2008-01-02  9:11   ` Hans Hagen
  2008-01-02 10:01     ` Wolfgang Schuster
  2008-01-02 15:00     ` Idris Samawi Hamid
  0 siblings, 2 replies; 9+ messages in thread
From: Hans Hagen @ 2008-01-02  9:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Tue, 01 Jan 2008 20:19:10 -0700
> "Idris Samawi Hamid" <ishamid@colostate.edu> wrote:
> 
>> Dear consortium,
>>
>> check this out:
>>
>> ==============================================
>> % engine=luatex
>>
>> \definefontfeature
>>    [oldstyle]
>>    [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]
>>
>> \setfontfeature{oldstyle}
>>
>> \starttext
>> 1234567890
>>
>> \startitemize
>> \item test
>> \stopitemize
>>
>> \stoptext
>> ==============================================

in font=otf.lua, patch ...

     function fonts.otf.set_dynamics(tfmdata,attribute,features)
         local shared = tfmdata.shared
         if shared then


	end
     end

and remake


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

* Re: bug in \setfontfeature
  2008-01-02  9:11   ` Hans Hagen
@ 2008-01-02 10:01     ` Wolfgang Schuster
  2008-01-02 10:03       ` Hans Hagen
  2008-01-02 15:00     ` Idris Samawi Hamid
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2008-01-02 10:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Jan 2, 2008 10:11 AM, Hans Hagen <pragma@wxs.nl> wrote:
> Wolfgang Schuster wrote:
> > On Tue, 01 Jan 2008 20:19:10 -0700
> > "Idris Samawi Hamid" <ishamid@colostate.edu> wrote:
> >
> >> Dear consortium,
> >>
> >> check this out:
> >>
> >> ==============================================
> >> % engine=luatex
> >>
> >> \definefontfeature
> >>    [oldstyle]
> >>    [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]
> >>
> >> \setfontfeature{oldstyle}
> >>
> >> \starttext
> >> 1234567890
> >>
> >> \startitemize
> >> \item test
> >> \stopitemize
> >>
> >> \stoptext
> >> ==============================================
>
> in font=otf.lua, patch ...
>
>      function fonts.otf.set_dynamics(tfmdata,attribute,features)
>          local shared = tfmdata.shared
>          if shared then

you forgot "local dynamics", the following works

    function fonts.otf.set_dynamics(tfmdata,attribute,features)
        local shared = tfmdata.shared
        local dynamics = shared.dynamics
        if shared then

>         end
>      end
>
> and remake

Wolfgang
___________________________________________________________________________________
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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02 10:01     ` Wolfgang Schuster
@ 2008-01-02 10:03       ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2008-01-02 10:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:

> you forgot "local dynamics", the following works
> 
>     function fonts.otf.set_dynamics(tfmdata,attribute,features)
>         local shared = tfmdata.shared
>         local dynamics = shared.dynamics
>         if shared then

hm, you need to to test shared before using it, so it really is:

    function fonts.otf.set_dynamics(tfmdata,attribute,features)
        local shared = tfmdata.shared
        if shared then
           local dynamics = shared.dynamics

i wonder what you tested -)

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

* Re: bug in \setfontfeature
  2008-01-02  9:11   ` Hans Hagen
  2008-01-02 10:01     ` Wolfgang Schuster
@ 2008-01-02 15:00     ` Idris Samawi Hamid
  2008-01-02 15:14       ` Taco Hoekwater
  1 sibling, 1 reply; 9+ messages in thread
From: Idris Samawi Hamid @ 2008-01-02 15:00 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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

On Wed, 02 Jan 2008 02:11:22 -0700, Hans Hagen <pragma@wxs.nl> wrote:

> in font=otf.lua, patch ...
>
>      function fonts.otf.set_dynamics(tfmdata,attribute,features)
>          local shared = tfmdata.shared
>          if shared then
>
>
> 	end
>      end
>
> and remake

Does this handle the other [off-list] utf-8 bug that generates an error  
message from font-tfm.lua:591?

(I sent the wrong test file before, sorry)

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

[-- Attachment #2: lmos-test.tex --]
[-- Type: application/x-tex, Size: 205 bytes --]

[-- Attachment #3: 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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02 15:00     ` Idris Samawi Hamid
@ 2008-01-02 15:14       ` Taco Hoekwater
  2008-01-02 15:39         ` Idris Samawi Hamid
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-01-02 15:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen



Idris Samawi Hamid wrote:
> On Wed, 02 Jan 2008 02:11:22 -0700, Hans Hagen <pragma@wxs.nl> wrote:
> 
>> in font=otf.lua, patch ...
>>
>>      function fonts.otf.set_dynamics(tfmdata,attribute,features)
>>          local shared = tfmdata.shared
>>          if shared then
>>
>>
>>     end
>>      end
>>
>> and remake
> 
> Does this handle the other [off-list] utf-8 bug that generates an error 
> message from font-tfm.lua:591?

No. You get that error because the font does not have a non-breaking 
hyphen, and you can "fix" it by changing that line into

   if characters[current.char] and  characters[current.char].class == 
"mark" then

and regenerating the format. But it will still not "work", because
the glyph still does not exist.

Best wishes, Taco
___________________________________________________________________________________
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] 9+ messages in thread

* Re: bug in \setfontfeature
  2008-01-02 15:14       ` Taco Hoekwater
@ 2008-01-02 15:39         ` Idris Samawi Hamid
  0 siblings, 0 replies; 9+ messages in thread
From: Idris Samawi Hamid @ 2008-01-02 15:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 02 Jan 2008 08:14:17 -0700, Taco Hoekwater <taco@elvenkind.com>  
wrote:

>> Does this handle the other [off-list] utf-8 bug that generates an error
>> message from font-tfm.lua:591?
>
> No. You get that error because the font does not have a non-breaking
> hyphen, and you can "fix" it by changing that line into
>
>    if characters[current.char] and  characters[current.char].class ==
> "mark" then
>
> and regenerating the format. But it will still not "work", because
> the glyph still does not exist.

Actually, this bug had the nice side-effect of identiying a few spots in  
this huge project (journal) where the conversion of articles to context  
was buggy (like that u-2011 example, they were all supposed to be  
converted). Nice to get a _helpful_ bug for a change. OTOH that should be  
fixed anyway...

The interesting thing is that using the default lm setup it does not show  
up, but as soon as font features are activated it does.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2008-01-02 15:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-02  3:19 bug in \setfontfeature Idris Samawi Hamid
2008-01-02  7:16 ` luigi scarso
2008-01-02  8:43 ` Wolfgang Schuster
2008-01-02  9:11   ` Hans Hagen
2008-01-02 10:01     ` Wolfgang Schuster
2008-01-02 10:03       ` Hans Hagen
2008-01-02 15:00     ` Idris Samawi Hamid
2008-01-02 15:14       ` Taco Hoekwater
2008-01-02 15:39         ` Idris Samawi Hamid

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