| 1 |
% fixkernaccents.tex |
| 2 |
|
| 3 |
% requires \thenewskewchar to be set to what will be the new skewchar _before_ renaming |
| 4 |
|
| 5 |
\setcommand\fixaccentkern#1#2% |
| 6 |
% parameters: character, accentpos (horiz distance from left edge of character, in ppem units) |
| 7 |
{ |
| 8 |
\ifisglyph{#1}\then % setting a kern or accessing width for a nonexistent glyph causes an error |
| 9 |
\resetint{temp} |
| 10 |
{ |
| 11 |
\sub |
| 12 |
{ |
| 13 |
#2 % accentpos |
| 14 |
} |
| 15 |
{ |
| 16 |
\half |
| 17 |
{ |
| 18 |
\add % width + italic correction gives the real width for a math glyph |
| 19 |
{ |
| 20 |
\width{#1} % distance from the left edge of glyph for positioning the subscript |
| 21 |
} |
| 22 |
{ |
| 23 |
\italic{#1} % offset from subscript for positioning the superscript |
| 24 |
} |
| 25 |
} |
| 26 |
} |
| 27 |
} |
| 28 |
\setkern{#1}{\thenewskewchar}{\strint{temp}} |
| 29 |
% Thanks to Lars Hellstrom for pointing out that the third parameter can't be just the \add macro |
| 30 |
|
| 31 |
%\message{Setting kern for #1 to \strint{temp}. AccentPos=#2, Width=\width{#1}, Italic=\italic{#1}.} |
| 32 |
\Fi |
| 33 |
} |