\def\.#1{\oalign{#1\crcr\hidewidth.\hidewidth}}
%\def\h#1{\leavevmode\rlap{\kern-.44ex\lower1.8ex\hbox{\accent"15}}#1}
\def\SHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font
    \kern-.0156\dimen0} % compensate for slant/italic in lower accents

\def\USHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font
             \kern.0156\dimen0} % compensate for slant/italic in upper accents

\def\talign#1{\leavevmode\vtop{\baselineskip0pt \lineskip-2.05ex
  \ialign{##\crcr#1\crcr}}}

\def\ttalign#1{\leavevmode\vtop{\baselineskip0pt \lineskip-2.22ex
  \ialign{##\crcr#1\crcr}}}

\def\TIE#1{\talign{#1\crcr\hidewidth\USHIFT{18}%
    \vbox to.2ex{\hbox{\the\textfont3\kern-1.15ex\char'145}\vss}\hidewidth}}

\def\ITIE#1{\talign{#1\crcr\hidewidth\USHIFT{18}%
    \vbox to.2ex{\hbox{\the\textfont3\kern-0.85ex\char'145}\vss}\hidewidth}}

\def\TTIE#1{\ttalign{#1\crcr\hidewidth\USHIFT{18}%
    \vbox to.2ex{\hbox{\the\textfont3\kern-1.25ex\char'145}\vss}\hidewidth}}

\def\AL{A\TTIE{l}} % will rarely be used

%\def\Al{a\TIE{l}} % will be used often

\def\Al{\~a\~l}

\def\Il{i\ITIE{l}} % will rarely be used

\def\Ul{u\TIE{l}} % will rarely be used

\def\h#1{{\oalign{\relax#1\crcr\hidewidth\SHIFT{34}%
    \vbox to.2ex{\hbox{\char'25}\vss}\hidewidth}}}

%\catcode`\@=11
%
%\def\b#1{{\o@lign{\relax#1\crcr\hidewidth\sh@ft{-3ex}%
%    \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
%
%\catcode`\@=12

%\def\h#1{\leavevmode\vbox{\offinterlineskip\lineskip0.295ex%
%\ialign{##\cr #1\cr\SHIFT{3}\hfill\hbox{\char'25}\hfill\SHIFT{0}\cr}}}

\def\~#1{{\struttedbox{\accent"7E #1}}}

\def\ulap#1{\vbox to 0pt{\vss #1}}
\def\dlap#1{\vbox to 0pt{#1\vss}}
\def\rlap#1{\hbox to 0pt{#1\hss}}
\def\llap#1{\hbox to 0pt{\hss #1}}

\long\def\xlap#1{\hbox to 0pt{\hss #1\hss}}
\long\def\ylap#1{\vbox to 0pt{\vss #1\vss}} %
\long\def\zlap#1{\ylap{\xlap{#1}}}

%\def\KH{{H}\rlap{\dlap{\leavevmode\lower.8em\hbox{\hskip-1.44ex\char'25}}}}  % for bib-mod bug
\def\KH{H{\leavevmode\lower.465em\hbox{\hskip-.85ex\zlap{\char'25}}\kern.4em}}
\def\Kh{h{\leavevmode\lower.465em\hbox{\hskip-.625ex\zlap{\char'25}}\kern.275em}}
%\def\KH{\leavevmode\vtop{\offinterlineskip\lineskip0.295ex%
%        \ialign{##\cr H\cr\hfill\hbox{\char'25}\hfill\cr}}}

%\def\h#1{\OSOF{\oalign{#1\crcr\hidewidth\SHIFT{34}%
%    \vbox to.2ex{\hbox{\char'25}\vss}\hidewidth}}\OSO}

\def\:#1{{\accent"5F #1}}

\def\Grave#1{{\accent"12 #1}}
\def\Acute#1{{\accent"13 #1}}

%%%=====================ayn-hamzah====================
\def\cupd{\leavevmode\USHIFT{14}\rotate[rotation=180,location=high]{\txx c}\SHIFT{14}} % ConTeXt dependent!
\def\cupds{\leavevmode\USHIFT{21}\rotate[rotation=180,location=high]{\switchtobodyfont[small]\txx c}\SHIFT{14}} % ConTeXt dependent!

\def\HAMZAH{\leavevmode\raise.9ex\hbox{\cupd}{}}
\def\HAMZAHS{\leavevmode\raise.9ex\hbox{\cupds}{}}
\def\AYN   {\leavevmode\raise.9ex\hbox{\txx \USHIFT{1} c\SHIFT{0}}{}}
%\def\AYN   {\leavevmode\raise.9ex\hbox{\switchtobodyfont[small]\txx \USHIFT{1} c\SHIFT{1}}{}}
\def\AYNS   {\leavevmode\raise.9ex\hbox{\switchtobodyfont[small]\txx \USHIFT{1} c\SHIFT{1}}{}}

\def\'{\HAMZAH}
\def\`{\AYN}
%%%=====================imacron====================
\def\IBAR%
{\leavevmode\vbox{\offinterlineskip\lineskip0.295ex%
%\ialign{##\cr\USHIFT{120}\hbox to .27777em{\leaders\hrule height .067354ex\hfill}\SHIFT{1}\cr\i\cr}}}
%\ialign{##\cr\USHIFT{120}\hfill\hbox to .21243em{\leaders\hrule height .067354ex\hfill}\hfill\SHIFT{1}\cr\i\cr}}}
\ialign{##\cr\USHIFT{120}\hfill\hbox to .21243em{\leaders\hrule height .07ex\hfill}\hfill\SHIFT{1}\cr\i\cr}}}

\definecharacter imacron          {\IBAR} % ConTeXt-dependent!



\endinput
