[NTG-context] rotated accented character

Hans Hagen pragma at wxs.nl
Sun Aug 21 20:31:19 CEST 2005


Mojca Miklavec wrote:

>So now that I have the properly rotated letter, is it possible to do
>the following:
>
>% U0259 LATIN SMALL LETTER SCHWA
>\definecharacter schwa {\rotate[rotation=180,location=high]{\hbox{e}}}
>\definecharacter schwagrave {\buildtextaccent\textgrave{\schwa}}
>\schwagrave
>  
>

Hm, probably needed for old-slovenian or so:

\starttext

\unexpanded\def\topaccent#1#2#3#4#5% down right slantcorrection accent char
  {\dontleavehmode
   \bgroup
     \setbox0\hbox{#4}%
     \setbox2\hbox{#5}%
     \hbox to \wd2 \bgroup
        \hss\copy2\hss
        \hskip-\wd2
        \hss\hskip#2\wd0\hskip-#3\fontdimen1\font\raise#1\hbox{#4}\hss
     \egroup
   \egroup}

\def\buildtextgrave{\topaccent{0pt}{0}{15}{\textgrave}}

\startencoding[default]

\definecharacter schwa      {\hbox{\rotate[rotation=180,location=high]{\hbox{e}}}}
\definecharacter schwagrave {\buildtextgrave\schwa}

\stopencoding

test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave

\sl test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave
test test \ruledhbox{\schwa} test \schwagrave

\stoptext

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



More information about the ntg-context mailing list