Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Idris Samawi Hamid
On Wed, 02 Jan 2008 08:14:17 -0700, Taco Hoekwater <[EMAIL PROTECTED]>  
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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Taco Hoekwater


Idris Samawi Hamid wrote:
> On Wed, 02 Jan 2008 02:11:22 -0700, Hans Hagen <[EMAIL PROTECTED]> 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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Idris Samawi Hamid

On Wed, 02 Jan 2008 02:11:22 -0700, Hans Hagen <[EMAIL PROTECTED]> 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/

lmos-test.tex
Description: TeX 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Hans Hagen
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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Wolfgang Schuster
On Jan 2, 2008 10:11 AM, Hans Hagen <[EMAIL PROTECTED]> wrote:
> Wolfgang Schuster wrote:
> > On Tue, 01 Jan 2008 20:19:10 -0700
> > "Idris Samawi Hamid" <[EMAIL PROTECTED]> 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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Hans Hagen
Wolfgang Schuster wrote:
> On Tue, 01 Jan 2008 20:19:10 -0700
> "Idris Samawi Hamid" <[EMAIL PROTECTED]> 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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-02 Thread Wolfgang Schuster
On Tue, 01 Jan 2008 20:19:10 -0700
"Idris Samawi Hamid" <[EMAIL PROTECTED]> 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...
> 
> 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
___


Re: [NTG-context] bug in \setfontfeature

2008-01-01 Thread luigi scarso
On Jan 2, 2008 4:19 AM, Idris Samawi Hamid <[EMAIL PROTECTED]> 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...
> 
> 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
___


[NTG-context] bug in \setfontfeature

2008-01-01 Thread Idris Samawi Hamid
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...

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
___