%D \module
%D   [       file=symb-lsy,
%D        version=2001.10.23,
%D          title=\CONTEXT\ Symbol Libraries,
%D       subtitle=Guillemots from LaTeX Symbols,
%D         author=Giuseppe Bilotta,
%D           date=\currentdate,
%D      copyright={PRAGMA / Giuseppe Bilotta}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

\unprotect

%D First of all, define the font file. TODO: how to choose the
%D appropriate font design size?

\definefontsynonym [LasySerif]        [lasy10]

\def\Lasy#1{\getglyph{Lasy}{\char#1}}

%D The LaSy font doesn't have double guillemots, but only left
%D and right single guillemots; we build the double ones by
%D duplicating the single one, shifted by half their size

\newdimen\LeftLazyShift
\newdimen\RightLazyShift

%D Since different sizes require different shifts, we have to
%D calculate it each time. Another way would be to plug into the
%D typescript stuff, and recalculate only at size-change time.
%D This way is slower but doesn't mess with internal stuff

\def\SetLeftLazyShift%
    {\setbox\scratchbox\hbox{\Lasy{40}}%
     \LeftLazyShift=.5\wd\scratchbox}

\def\SetRightLazyShift%
    {\setbox\scratchbox\hbox{\Lasy{41}}%
     \RightLazyShift=.5\wd\scratchbox}

%D Here we define the quick-access commands

\def\leftguillemot%
  {\dontleavehmode\hbox{\SetLeftLazyShift%
      \Lasy{40}\kern-\LeftLazyShift\Lasy{40}}}

\def\rightguillemot%
  {\hbox{\SetRightLazyShift%
      \Lasy{41}\kern-\RightLazyShift\Lasy{41}}}

\def\leftsubguillemot{\Lasy{40}}

\def\rightsubguillemot{\Lasy{41}}

\protect

\endinput 
