It's my first time with the tools I will describe below, but let me explain what I just tried (I am sure at least one crucial step is likely to be wrong and will have to be corrected.)
[edited below to make such a presumably necessary addition to the steps]
[of course in the .tex source below, this is just for testing, and I brutally reassigned the letters symbol font without caring at all for the Greek alphabet; naturally, some additional steps are missing here to separate the Greek letters from the Latin letters, and only re-assign the Latin letters to use the Times Italic font in the T1 encoding]
- I created a temporary directory
- I then did
tftopl ptmri8r.tfm ptmmi8r.pl. In this way I obtained a human-readable form of the font metrics for the Times font, from psnfss.
- In my text editor I opened
ptmmi8r.pl and then replaced (SPACE R 0.25) with (SPACE R 0.0).
Near the top of the file ptmmi8r.pl created in step 2 there is:
(FONTDIMEN
(SLANT R 0.277)
(SPACE R 0.25) <-- this is the 0.25 which I replace with 0.0
(STRETCH R 0.15)
(SHRINK R 0.0599985)
(XHEIGHT R 0.440991)
(QUAD R 1.0)
(EXTRASPACE R 0.0599985)
)
continued (sorry I don't know how to resume enumeration with 4, 5, 6...):
I saved the file and then did pltotf ptmmi8r.pl ptmmi8r.tfm. I now have this file ptmmi8r.tfm in my working directory.
I created a file ptmm.map with the single line:
ptmmi8r NimbusRomNo9L-ReguItal "TeXBase1Encoding ReEncodeFont" <8r.enc <utmri8a.pfb
This required a bit of research as I had to dig out the pdftex.map file from my installation to just copy the line with ptmri8r to the one above.
- I then created the following test file, to be compiled with
pdftex. And it works.
However: there seems to be a checksum in the tfm file, and I don't know if modifying the font dimension 2 parameter needs an update in the checksum.
However two: it seems that the standard psnfss use of the Times font is via a virtual font ptmri8t and there must be excellent reasons for it. I tried doing the same steps as above but with the vftovp and vptovf tools, but somehow never managed to understand what to do exactly.
Update: ok, so perhaps I now understand some additional steps necessary to get correctly the files for T1 encoding. Additionally to the above, I have done:
vftovp ptmri8t.vf ptmri8t.tfm ptmmi8t.vpl
- I have edited the produced ptmmi8t.vpl in two places: first the fontdimen 2, and then a bit further down the
FONTNAME entry: I changed it into (FONTNAME ptmmi8r)
- after these two edits, I did
vptovf ptmmi8t.vpl ptmmi8t.vf ptmmi8t.tfm
- then
\DeclareFontShape {T1}{ptmm}{m}{it} uses ptmmi8t and not ptmmi8r.
end of update
Again, my only knowledge in this area dates back to thirty minutes ago, from reading page 9 of the font installation guide, then typing man tftopl and man pltotf. I hope the font experts will come to correct my steps: the only goal was to get a copy of an existing font with its interword space set to zero, so that TeX would automatically insert italic corrections in math mode.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% for pdf output only
\pdfmapfile{+ptmm.map}
% ptmmi8r NimbusRomNo9L-ReguItal "TeXBase1Encoding ReEncodeFont" <8r.enc <utmri8a.pfb
\DeclareFontFamily{T1}{ptmm}{}
% earlier versions had ptmmi8r, but certainly this was wrong
% now that files ptmmi8t.vf and ptmmi8t.tfm have also been prepared
% (see update above)
% additionally to ptmmi8r.tfm, the following presumably should be done:
% (does not matter for the Latin letters in math, but I guess does matter
% for accented letters or other symbols in text, with `\usefont{t1}{ptmm}{m}{it}`
\DeclareFontShape{T1}{ptmm}{m}{it}{
<-> ptmmi8t
}{}
\SetSymbolFont{letters}{normal}{T1}{ptmm}{m}{it}
\DeclareMathVersion {standardinterword}
\SetSymbolFont {letters}{standardinterword}{T1}{ptm}{m}{it}
\usepackage{times}
\begin{document}\thispagestyle{empty}
$f(x)$
% with the edit done for correctly generating also files for T1,
% we can compare the original with the font without interword space:
{\usefont{T1}{ptmm}{m}{it} àé ù}
{\usefont{T1}{ptm}{m}{it} àé ù}
$abcdefghijklmnopqrstuvwxyz$
\textit{abcdefghijklmnopqrstuvwxyz}
\mathversion{standardinterword}
$abcdefghijklmnopqrstuvwxyz$
\mathversion{normal}
$abcdefghijklmnopqrstuvwxyz$
\end{document}


fin the font? – egreg Jun 18 '13 at 10:55\fontdimen2must be zero forTeXto automatically insert the italic correction. – Jun 18 '13 at 12:24\fontdimen2but if I recall correctly the assignment is global. So it is a bit complicated if the font is to be used both for text and math, as there is no hook inTeXfor when exiting from math mode (which we would use to restore this font parameter). – Jun 18 '13 at 12:32\fontdimenare global; it's easier to create a copy of the font and assign\fontdimen2=0ptto the copy. – egreg Jun 18 '13 at 12:34