[Textures] A bit of everything (4/7)
Bruno Voisin
bvoisin at me.com
Tue Mar 22 16:18:36 EDT 2011
CM/AMS
======
At this point I decided to move on to more ambitious adaptations, corresponding to the fonts I'm actually using. First come the CM and AMS fonts. Textures includes them, but in a version dating back to the early 1990s, which has since undergone several updates, with AMS fonts reaching version 3 in 2008.
Arguably, most of the changes are minor, but still. And a significant change is the switch to interpolated sizes for the small AMS fonts, the PostScript version becoming the standard. For example, euler.map contains
eurm8 EURM7 <eurm7.pfb
which means that eurm8 is now a scaled version of eurm7, and so forth. This means the behaviour implemented formerly via the [psamsfonts] option and the cmmib57.sty package have become the standard, and these option and package have become obsolete.
In addition, Textures doesn't include the manual font, whose "dangerous bend" symbol is used by some LaTeX packages. It includes the mflogo fonts (logo10 etc.), but in an old version which doesn't contain the additional letters P and S from the MetaPost logo.
For all these reasons, it may be of interest to update the versions of the CM, AMS, LaTeX, Logo and Manual fonts in the Textures distro. You can get the various pieces as follows:
- CM, LaTeX and AMS fonts from
http://www.ctan.org/tex-archive/fonts/amsfonts/
- Logo fonts from
http://www.ctan.org/tex-archive/fonts/mflogo/
- Manual fonts from
http://www.ctan.org/tex-archive/fonts/manual/
(the mflogo directory also contain the manual fonts, but in an older version than the manual directory).
LaTeX packages exist for calling these last two fonts, respectively
http://www.ctan.org/tex-archive/macros/latex/contrib/mflogo/
http://www.ctan.org/tex-archive/macros/latex/contrib/manfnt/
The fonts come as PFB files. Convert them to TTF, selecting "TrueType (Symbol)" in FontForge, and setting the PostScript encoding to None in EdMetrics. Metrics suitcases are required, since the scaled sizes imply that the metrics (such as eurm8) and the fonts (here eurm7) do not always share the same name. Attached are the resulting suitcases.
One difficulty remains though: Textures has the metrics built-in, in suitcases
Textures.app/Contents/Resources/Metrics/"AMS/PS Metrics"
Textures.app/Contents/Resources/Metrics/"AMS/VF metrics"
Textures.app/Contents/Resources/Metrics/"SliTeX Metrics"
Textures.app/Contents/Resources/Metrics/"TeX Metrics"
Originally I thought that putting updated metrics in the Textures Metrics directory (such as /Library/Application Support/Textures/Metrics) would give them precedence, but testing revealed that it doesn't (at least in the quick tests I made).
So you need to Right-Click or Ctrl-Click the Textures app, select "Show Package Contents", navigate to the Metrics directory inside, erase the AMS/PS Metrics, AMS/VF metrics and SliTeX Metrics suitcases, then edit the TeX Metrics suicase in EdMetrics by deleting the CM metrics inside.
Unfortunately, I don't think it's possible to post the modified TeX Metrics suitcase here, since it contains the Textures-specific metrics such as Times which I imagine can be considered integral parts of the Textures application itself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cm.zip
Type: application/zip
Size: 90934 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/textures/attachments/20110322/05ce4f16/attachment.zip>
-------------- next part --------------
Lucida
======
Now comes the adaptation which was the most important for me: Lucida, my preferred fonts! The current version can be obtained from either PCTeX or TUG, at
http://www.pctex.com/Lucida_Fonts.html
http://www.tug.org/store/lucida/
The font and LaTeX support files are borrowed from CTAN at
http://www.ctan.org/tex-archive/fonts/psfonts/bh/lucida/
http://www.ctan.org/tex-archive/macros/latex/contrib/psnfssx/lucidabr/
PCTeX adds it own LaTeX support package lucimatx, which can also be downloaded for free from the Lucida purchase page
http://www.pctex.com/fonts.html#Lucida_Fonts.
In theory what you need to do for Textures is the following:
- Convert the PFB font files to TTF in FontForge, selecting "TrueType" for the text fonts and "Truetype (Symbol)" for the math fonts.
- Create the associated metrics suitcase in EdMetrics, setting the PostScript encoding to AdobeStandard for the 8a metrics, TeXBase1 for the 8r metrics and TeXnANSI for the 8y metrics.
There remains the matter of metrics with the original Y&Y names, such as lbr for hlhr and so forth. In the original distribution by Blue Sky Research in the early 1990s, namely
http://www.bluesky.com/products/lucida_bright.html
these metrics were for the text fonts in Textures Macintosh encoding (also called LM1), corresponding in EdMetrics to the setting
PostScript map -> Roman->MacintoshStandard
PostScript encoding -> MacintoshStandard
and reproduced in the VEC and ENC files
http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/texmac.vec
http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/texmac.enc
These metrics were those assumed by the Plain TeX support file lcdplain.tex by Y&Y. This file may still be found in the Y&Y Extras folder of OzTeX, either from the OzTeX 5.2 distribution at
http://www.ctan.org/tex-archive/systems/mac/oztex/
or for OzTeX 3.0 at
http://www.tug.org/yandy/download/yyoztex.hqx
For maximum backward compatibility, I tried first to recreate the lbr metrics in LM1 encoding by applying afm2tfm (included in MacTeX and part of dvips) to the AFM files as follows
apply 'afm2tfm %1 -p texmac %1' *.afm
The result looked allright, but turned out not to include any ligature. Had I read the dvips doc beforehand, I should have known this, since the doc says on p. 42:
"You can specify a different PostScript encoding with `-p ps-enc'. This makes the raw TFM file (the one output by Afm2tfm) have the encoding specified in the encoding file ps-enc. Any ligature or kern information specified in ps-enc is ignored by Afm2tfm, since ligkern info is always omitted from the raw TFM."
What needs to be done instead uses virtual fonts, in the form
afm2tfm lbc -u -p 8r -t texmac -v lbc hlcrie8r
afm2tfm lbd -u -p 8r -t texmac -v lbd hlhb8r
afm2tfm lbdi -u -p 8r -t texmac -v lbdi hlhbi8r
afm2tfm lbdsc -u -p 8r -t texmac -v lbdsc hlhbc8r
afm2tfm lbh -u -p 8r -t texmac -v lbh hlcriw8r
afm2tfm lbi -u -p 8r -t texmac -v lbi hlhri8r
afm2tfm lbki -u -p 8r -t texmac -v lbki hlcrin8r
afm2tfm lbkr -u -p 8r -t texmac -v lbkr hlcrn8r
afm2tfm lbl -u -p 8r -t texmac -v lbl hlcrf8r
afm2tfm lbr -u -p 8r -t texmac -v lbr hlhr8r
afm2tfm lbrsc -u -p 8r -t texmac -v lbrsc hlhrc8r
afm2tfm lbsl -u -p 8r -t texmac -v lbsl hlhro8r
afm2tfm lbtb -u -p 8r -t texmac -v lbtb hlcbt8r
afm2tfm lbtbo -u -p 8r -t texmac -v lbtbo hlcbot8r
afm2tfm lbto -u -p 8r -t texmac -v lbto hlcrot8r
afm2tfm lbtr -u -p 8r -t texmac -v lbtr hlcrt8r
afm2tfm lfd -u -p 8r -t texmac -v lfd hlxb8r
afm2tfm lfdi -u -p 8r -t texmac -v lfdi hlxbi8r
afm2tfm lfi -u -p 8r -t texmac -v lfi hlxri8r
afm2tfm lfr -u -p 8r -t texmac -v lfr hlxr8r
afm2tfm lsb -u -p 8r -t texmac -v lsb hlsu8r
afm2tfm lsbi -u -p 8r -t texmac -v lsbi hlsui8r
afm2tfm lsd -u -p 8r -t texmac -v lsd hlsb8r
afm2tfm lsdi -u -p 8r -t texmac -v lsdi hlsbi8r
afm2tfm lsi -u -p 8r -t texmac -v lsi hlsri8r
afm2tfm lsr -u -p 8r -t texmac -v lsr hlsr8r
afm2tfm lstb -u -p 8r -t texmac -v lstb hlsbt8r
afm2tfm lstbo -u -p 8r -t texmac -v lstbo hlsbot8r
afm2tfm lsto -u -p 8r -t texmac -v lsto hlsrot8r
afm2tfm lstr -u -p 8r -t texmac -v lstr hlsrt8r
This recreates the 8r metrics such as hlhr8r and defines lbr etc. as their re-encoding via virtual fonts. The -u flag appears necessary for all the glyphs to be present in the output, though I'm not sure to fully understand why.
Unfortunately, the resulting metrics have all the standard ligatures but the European << (for French) and ,, (for German). So it seems the only way to have these is to do as teTeX 1 and 2 did, namely to switch to TeX 'n ANSI (or LY1) encoding by defining lbr as an alias of hlhr8y and so forth. In EdMetrics this means copying the metrics as follows:
hlcbot8y -> lbtbo
hlcbt8y -> lbtb
hlcda -> lbmad
hlcdim -> lbmdi
hlcdima -> lbmdo
hlcdm -> lbmd
hlcdy -> lbmsd
hlcra -> lbma
hlcrf8y -> lbl
hlcrie8y -> lbc
hlcrim -> lbmi
hlcrima -> lbmo
hlcrin8y -> lbki
hlcriw8y -> lbh
hlcrm -> lbmr
hlcrn8y -> lbkr
hlcrot8y -> lbto
hlcrt8y -> lbtr
hlcrv -> lbme
hlcry -> lbms
hlhb8y -> lbd
hlhbc8y -> lbdsc
hlhbi8y -> lbdi
hlhr8y -> lbr
hlhrc8y -> lbrsc
hlhri8y -> lbi
hlhro8y -> lbsl
hlsb8y -> lsd
hlsbi8y -> lsdi
hlsbot8y -> lstbo
hlsbt8y -> lstb
hlsr8y -> lsr
hlsri8y -> lsi
hlsrot8y -> lsto
hlsrt8y -> lstr
hlsu8y -> lsb
hlsui8y -> lsbi
hlxb8y -> lfd
hlxbi8y -> lfdi
hlxr8y -> lfr
hlxri8y -> lfi
To use these LY1 metrics in Plain TeX, get texnansi.tex from the CTAN LY1 distribution
http://www.ctan.org/tex-archive/fonts/psfonts/ly1/
and add in your TeX files, for example after calling lcdplain.tex,
\input texnansi
Having reached that point, I noticed the existence of the Lucida mailing list and realized there was a bigger problem, no longer of technical nature: a licensing issue.
Karl Berry, the TUG president, who makes the fonts available through TUG and knows the font designers Chuck Bigelow and Kris Holmes, has expressed unambiguously on the Lucida list the fact that conversion from PS format to another format is excluded by the license. See for example
http://tug.org/pipermail/lucida/2010-May/000338.html
http://tug.org/pipermail/lucida/2010-December/000372.html
The user is pointed to commercial TrueType versions, in particular Ascender Corp
http://www.ascendercorp.com/catalog/foundries/bigelow-holmes/
The user may also have the TrueType Lucida fonts installed already by Microsoft Office (on OS X in /Library/Fonts/Microsoft).
However, the font coverage isn't that required by TeX. Here are all the fonts expected by the TeX support files, and those provided in Office or offered for purchase by Ascender Corp:
Lucida Blackletter Regular
Lucida Bright Regular
Lucida Bright Italic
** Lucida Bright Oblique
Lucida Bright Demibold
Lucida Bright Demibold Italic
** Lucida Bright Smallcaps Regular
** Lucida Bright Smallcaps Demibold
Lucida Calligraphy Italic
* Lucida Casual Regular
* Lucida Casual Italic
Lucida Fax Regular
Lucida Fax Italic
Lucida Fax Demibold
Lucida Fax Demibold Italic
Lucida Handwriting Italic
Lucida Sans Regular
Lucida Sans Italic
Lucida Sans Demibold
Lucida Sans Demibold Italic
** Lucida Sans Bold
** Lucida Sans Bold Italic
Lucida Sans Typewriter Regular
Lucida Sans Typewriter Oblique
Lucida Sans Typewriter Bold
Lucida Sans Typewriter Bold Oblique
** Lucida Typewriter Regular
** Lucida Typewriter Oblique
** Lucida Typewriter Bold
** Lucida Typewriter Bold Oblique
** Lucida New Math Roman
* Lucida New Math Italic
** Lucida New Math Alternate Italic
** Lucida New Math Demibold
** Lucida New Math Demibold Italic
** Lucida New Math Alternate Demibold Italic
* Lucida New Math Symbol
** Lucida New Math Symbol Demibold
** Lucida New Math Arrows
** Lucida New Math Arrows Demibold
* Lucida New Math Extension
* = absent from the Microsoft TrueType fonts
** = absent from both Microsoft and Ascender Corp TrueType fonts
In any case, here is a metrics suitcase with all the metrics from the font distribution plus LY1 lbr-type copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lucida.zip
Type: application/zip
Size: 195123 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/textures/attachments/20110322/05ce4f16/attachment-0001.zip>
-------------- next part --------------
MathTime 1.1
============
The original MathTime distribution from Blue Sky Research, licensed from Y&Y, namely
http://www.bluesky.com/products/mathtime.html
corresponded to version 1.1 of the fonts, also described at
http://www.tug.org/yandy/options.htm
and containing only one math italic font (MTMI), one symbol font (MTSY) and one extension font (MTEX) in regular shape. The bold and other fonts which were added later yielding MathTime Plus were never released by Blue Sky Research.
The original MathTime 1.1 fonts can be used unchanged in OS X Textures. They come with the original plain TeX macro file mtmacs.tex written by the font designer Michael Spivak, and with a file PlainTimes.tex creating a new plain TeX format built upon mtmacs.tex.
This latter file, however, was quite primitive. A more elaborated plain TeX input file, called mtplain.tex and similar to lcdplain.tex for Lucida, has been prepared afterwards by Y&Y. It's still available from
http://www.tug.org/yandy/download/minmath.zip
but it requires additional files, namely texnansi.tex (see above for Lucida) and
http://code.google.com/p/yytex/source/browse/trunk/tex/encode.tex
It also requires the Y&Y metrics for the Times, Helvetica, Courier, Symbol and Dingbats fonts, called tir etc. This topic will be considered in the next message of this series when dealing with PSNFSS. Alternatively you can get the files from teTeX 1.0 where they were packaged as
http://www.ibiblio.org/pub/linux/apps/tex/teTeX/1.0/distrib/fonts/yandy.tar.gz
or similarly from OzTeX (see above for Lucida).
Once the PSNFSS metrics suitcase is installed, just add to your plain TeX files
\input mtplain
\input texnansi
MathTime Pro II
===============
The current version of MathTime is MathTime Pro II, available from PC TeX at
http://www.pctex.com/mtpro2.html
Its installation in Textures is straightforward:
- Conversion of the fonts to TTF format, using FontForge and selecting "TrueType (Symbol)".
- Direct use of the TFM metrics file, since they bear the same names as the font they apply to and involve no rescaling nor any other transformation. In addition, three metrics are too big for EdMetrics, namely
mt2bmif.tfm
mt2bmis.tfm
mt2bmit.tfm
and yield the error message "Sorry, LIGTABLE too long for me to handle" when EdMetrics tries to import them.
However, for LaTeX support the mathptmx package is required, which isn't included in Textures. So this brings up a more complex topic: installing an up-to-date PSNFSS setup in OS X Textures.
More information about the Textures
mailing list