[OS X TeX] OML encoded virtual fonts (or: text fonts in math mode)
Ingo Reich
ireich at mac.com
Sat Mar 19 06:40:27 EST 2005
Hi everybody,
this is another try to get text fonts working in math mode, following
the strategy to build with fontinst virtual fonts that contain both
characters from the text font – the text font being, for example, a
sans serif font (font family ffs below) – and characters from the math
font – e.g. Lucida New Math from Y&Y. I did not yet try to build the
OT1-encoded operator font; what I did try – with limited success – was
to build an OML-encoded virtual font. Here is what I came up with (its
inspired by the mapping OMLhlcm.fd; unsetalphabet unsets the letters
A-Z, a-z; lbm is short for Lucida New Math):
%%%%%%%%%%%% BEGINN FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input fontinst.sty
\needsfontinstversion{1.926}
\substitutesilent{bx}{b}
\substitutesilent{it}{sl}
\substitutesilent{itx}{sl}
\setint{slant}{167}
\recordtransforms{hlcmffs-rec.tex}
\transformfont{ffsr8r}{\reencodefont{8r}{\fromafm{ffsr8a}}} % roman
text font
\transformfont{ffsri8r}{\reencodefont{8r}{\fromafm{ffsri8a}}} % italic
text font
\transformfont{ffsb8r}{\reencodefont{8r}{\fromafm{ffsb8a}}} % bold text
font
\transformfont{ffsro8r}{\slantfont{\int{slant}}\reencodefont{8r}{\fromaf
m{ffsr8a}}}
\transformfont{ffsbo8r}{\slantfont{\int{slant}}\reencodefont{8r}{\fromaf
m{ffsb8a}}}
%
\installfonts
\installfamily{OML}{hlcmffs}{}
\installfont{hlcrmffs}{lbmr,unsetalphabet,kernoff,ffsr8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{m}{n}{}
\installfont{hlcdmffs}{lbmd,unsetalphabet,kernoff,ffsb8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{b}{n}{}
\installfont{hlcrimaffs}{lbmo,unsetalphabet,kernoff,ffsri8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{m}{it}{}
\installfont{hlcdimaffs}{lbmdo,unsetalphabet,kernoff,ffsbo8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{b}{it}{}
\installfont{hlcrimffs}{lbmi,unsetalphabet,kernoff,ffsri8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{m}{itx}{}
\installfont{hlcdimffs}{lbmdi,unsetalphabet,kernoff,ffsbo8r scaled
1085,kernon,newlatin}{oml}{OML}{hlcmffs}{b}{itx}{}
\endinstallfonts
\endrecordtransforms
\bye
%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
What I ended up with, was that my text font is indeed used in math mode
(after copying and renaming lucbmath.sty and replacing hlcm with
hlcmffs where necessary), the lowercase greek symbols show up, but I
lost the brackets (,), [,], and lots of other symbols (e.g. \Joint
etc.).
Searching the web for helpful documentation wasn't very succesful
either. The only interesting reference I found was an article by
Thierry Bouche, "Diversity in Math Fonts", who however makes use of
.mtx-files he doesn't describe (e.g. zrhax.mtx) and which are not
present in my installation of gwtex.
So my question is: Is somebody out there who has some experience with
this kind of problem and who can point me (and others interested in
this problem) to a possible solution?
A follow up: If OpenType fonts are installed with the help of Eddie
Kohlers LCDF TypeTools, only pfb, vf, and tfm files are generated; but
if one wants to use such a text font in math mode, one faces the
problem that fontinst presupposes the existence of afm-files. This
raises the question whether it is possible to generate adequate
afm-files on the basis of LCDF-generated vf- and tfm-files.
Any help is very much appreciated.
Thanks,
Ingo
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list