I am trying to change the slant angle of an accent. I have used the fontdimen to adjust the quantity. The first portion of the code that follows adjusts fontdimen5 (the x-height). This works as you can see from the example. However, when I adjust fontdimen1 (slant) there is no change. I would appreciate it if someone can shed some light.
\documentclass[10pt]{article}
\usepackage{graphicx}
\begin{document}
\font \romanfont=cmr10
\font\specroman=cmr10
%% Next, the special registers
\newdimen\savedvalue
\savedvalue=\fontdimen5\romanfont
\newdimen\specialvalue
\specialvalue=4.75pt
%% Finally, definitions.
\def\specrm{%
\aftergroup\restoredimen
\fontdimen5\specroman=\specialvalue
\specroman }
\def\restoredimen{%
\fontdimen5\romanfont=\savedvalue }
\scalebox{10}{\romanfont \'o} {\scalebox{10}{\specrm \' o}}
\medskip
{\noindent\obeylines\specrm
the value of fontdimen1 (slant) is \the\fontdimen1\font
the value of fontdimen2 (interword space) is \the\fontdimen2\font
the value of fontdimen3 (interword stretch) is \the\fontdimen3\font
the value of fontdimen4 (interword shrink) is \the\fontdimen4\font
the value of fontdimen5 (x-height) is \the\fontdimen5\font
the value of fontdimen6 (quad width) is \the\fontdimen6\font
the value of fontdimen7 (extra space) is \the\fontdimen7\font
}
\medskip
\font \romanfont=cmr10
\font\specroman=cmr10
%% Next, the special registers
\newdimen\savedvalue
\savedvalue=\fontdimen1\romanfont
\newdimen\specialvalue
\specialvalue=0.15pt
%% Finally, definitions.
\def\specrm{%
\aftergroup\restoredimen
\fontdimen1\specroman=\specialvalue
\specroman }
\def\restoredimen{%
\fontdimen1\romanfont=\savedvalue }
\scalebox{10}{\romanfont \'o} {\scalebox{10}{\specrm \' o}}
\medskip
{\noindent\obeylines\specrm
the value of fontdimen1 (slant) is \the\fontdimen1\font
the value of fontdimen2 (interword space) is \the\fontdimen2\font
the value of fontdimen3 (interword stretch) is \the\fontdimen3\font
the value of fontdimen4 (interword shrink) is \the\fontdimen4\font
the value of fontdimen5 (x-height) is \the\fontdimen5\font
the value of fontdimen6 (quad width) is \the\fontdimen6\font
the value of fontdimen7 (extra space) is \the\fontdimen7\font
}
\end{document}
Edit: Lots of relevant information have been uploaded to github courtesy of zellyn. https://github.com/zellyn/accentbx
\aftergroup\restoredimenin your first definition of\specrm, then the slant works. – Hendrik Vogt Oct 07 '10 at 21:52