Re: [NTG-context] Missing character in texgyreheros

2008-04-29 Thread luigi scarso
2008/4/28 luigi scarso [EMAIL PROTECTED]:
 Sorry for the noise,
  but i'm in the middle between an old
  context mkii (2005) and mkiv stylesheet for a greek utf-encoded  file
  and i'm a bit confused.

  While using Heros font, I have:
  Missing character: There is no ώ (974) in font
  /home/usr7/tex/texmf/fonts/opentype/public/tex-gyre/texgyreheros-regular.otf!

  But in enco-def.tex there is
  \definecharacter greekomegatonos{'w}

  so I believe that it's possible to replace missing glyph with {'w}
  Maybe some switch ?

  I'm using
  \usetypescript[postscript]
  \setupbodyfont[postscript,10pt,ss]


This works,
but nothing else.

\usetypescript[postscript]
\setupbodyfont[postscript,10pt,ss]

\startluacode
function add_ties (line)
 line = line:gsub('ά','\\buildtextaccent\\textacute\\greekalpha')
 line = line:gsub('έ','\\buildtextaccent\\textacute\\greekepsilon')
 line = line:gsub('ή','\\buildtextaccent\\textacute\\greeketa')
 line = line:gsub('ί','\\buildtextaccent\\textacute\\greekiota')
 line = line:gsub('ό','\\buildtextaccent\\textacute\\greekomicron')
 line = line:gsub('ύ','\\buildtextaccent\\textacute\\greekupsilon')
 line = line:gsub('ώ','\\buildtextaccent\\textacute\\greekomega')
 line = line:gsub('Ό','\\greekOmicron)
 line = line:gsub(Ά,'\\greekAlpha)
 line = line:gsub(Έ,'\\greekEpsilon)
 line = line:gsub(Ή,'\\greekEta)
 line = line:gsub(Ί,'\\greekIota)
 line = line:gsub(ϊ,\\buildtextaccent\\textdiaeresis\\greekiota)
 line = line:gsub(Ύ,'\\greekUpsilon)
 line = line:gsub(Ώ,'\\greekOmega)
 return line
end
\stopluacode

\setupcolors[state=start]
\def\startfiltered{\ctxlua {callback.register('process_input_buffer',
add_ties)}}
\def\stopfiltered{\ctxlua {callback.register('process_input_buffer', nil)}}


\language[gr]

\starttext
\startfiltered
%%  see
%%  http://www.lorem-ipsum.info/generator3
\input Greek-Lipsum.txt
\stopfiltered
\stoptext


-- 
luigi
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
___


Re: [NTG-context] Missing character in texgyreheros

2008-04-29 Thread Taco Hoekwater


luigi scarso wrote:
 2008/4/28 luigi scarso [EMAIL PROTECTED]:
 Sorry for the noise,
  but i'm in the middle between an old
  context mkii (2005) and mkiv stylesheet for a greek utf-encoded  file
  and i'm a bit confused.

  While using Heros font, I have:
  Missing character: There is no ώ (974) in font
  
 /home/usr7/tex/texmf/fonts/opentype/public/tex-gyre/texgyreheros-regular.otf!

  But in enco-def.tex there is
  \definecharacter greekomegatonos{'w}

  so I believe that it's possible to replace missing glyph with {'w}
  Maybe some switch ?

  I'm using
  \usetypescript[postscript]
  \setupbodyfont[postscript,10pt,ss]

 
 This works,
 but nothing else.

This should also work (but untested)

   \catcode`\ώ=\active \def ώ{\buildtextaccent\textacute\greekomega}

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
___