MinionPro: math accents on swash capitals

Please try the fixed scripts here to generate the corrected metrics automatically. My result from your code:

enter image description here


There are four classes of solution to the problem:

1. Use an alternative font

One that has the letter shapes and accent positioning to your liking.

2. Create a new command for the accented characters

This can apply the appropriate amount of skew for each required character:

\newcommand*{\Khatcal}{\skew{3}{\hat}{\mathcal{K}}}

Alternatively, your suggested \newcommand is fine if all the \skew values are the same.

Defining special control sequences for accented letters that you need frequently is recommended in the TeXbook (p136) and this extends that to improve the look of the character but is no more work in the text and is easy to change.

3. Use a different accent

For example, with \hat, rather than use the standard accent, use a wide form, albeit over a single character. These can be clearer for math use, unless you are distinguishing between 'hat' and 'big hat' over a single character, and look to better fit the (full width) of the letter.

Many math accents are available in wide forms, e.g. The Comprehensive LaTeX Symbol List (texdoc comprehensive) pp59-60. These symbols are made more extensible by the MnSymbol package (which may be particularly well-suited for use with MinionPro: as I do not have the font installed I cannot verify that) and even more extensible by the yhmath package.

As an example, using the mtpro2 fonts as these are fonts I have installed that give a range of math capitals, rather than because the default small accent positioning is poor:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[mtpscr]{mtpro2}
\begin{document}
\[\begin{array}{ccc}
\hat{K} & \hat{\mathcal{K}} & \hat{\mathscr{K}}\\
\hat{C} & \hat{\mathcal{C}} & \hat{\mathscr{C}}
\end{array}\]

\[\begin{array}{ccc}
\widehat{K} & \widehat{\mathcal{K}} & \widehat{\mathscr{K}}\\
\widehat{C} & \widehat{\mathcal{C}} & \widehat{\mathscr{C}}
\end{array}\]
\end{document}

mathmode hat accents using some mtpro2 fonts

The accent could be widened toward either side (e.g. add a thin space or phantom character) or moved (e.g. by kerning) but these solutions are as complex as the original kerning suggestion on the smaller accent. As mentioned above, trying the MnSymbol and yhmath wide forms may be simpler if the symbols they define are not already defined in earlier packages.

4. Fix the kerning for the font

This is probably the hardest option and uses tftopl and pltotf to modify the character kerning in the font's .tfm file.

You should check that the licence of the font and its supporting files allows such changes. You should also keep a backup of the unchanged font files. You may also want to use different names for the modified files (if allowed under the licence). Remember, too, if the system's .tfm file for the font is changed that the change could affect other documents compiled on the system that use the font. Lastly, if the fonts are kept with the same name a reinstallation or update of the font will lose the changes.

The process is discussed in Bad positioning of math accents for the beamer standard font.