[Textures] A bit of everything (7/7)

Bruno Voisin bvoisin at me.com
Tue Mar 22 16:22:17 EDT 2011

European Modern

European Modern was a set of commercial PostScript fonts from Y&Y, intermediate between the 7-bit Computer Modern and the Unicode Latin Modern: it was 8-bit, based on Computer Modern and contained pre-built accented characters for most European languages. In this sense, it may be seen as an outline version of the bitmap EC fonts, alternative to CM-Super and supposedly of better quality since it was prepared manually and hand-hinted. See


Since the open-sourcing of the Y&Y TeX system, European Modern may be found at


Beware: if you download the EM fonts as part of a svn checkout of Y&Y TeX, using

	svn checkout http://yytex.googlecode.com/svn/trunk/ yytex-read-only

then each folder and sub-folder of the checkout will contain an invisible .svn folder which may be of significant size. I couldn't understand first why some tfm folders, though containing only say 50 TFM files of 4 kB, were about 1 MB in size in the Finder, then I went to the Terminal and "ls -al" revealed it all. You can erase the invisible .svn folders in all the subdirectories of the current directory by typing

	sudo find . -name .svn -exec rm -rf {} \;

sudo was needed in my case, though I don't know why. And the obvious "find . -name .svn -delete" didn't work, for some unknown reason either.

Back to topic: when starting these adaptations I had decided not to look at Latin Modern, because of the very many custom encodings that it uses, the need to hand-edit each encoding for manual import in EdMetrics, and the insane amounts of time the whole stuff would take. Latin Modern having largely superseded EC and CM-Super, it made even less sense to look at European Modern.

But then Paolo Matteuci raised the issue twice, on this list and in an off-list message, he was quite persuasive and it was all too tempting to test the above concepts and methods one more time. Moreover, having looked at Lucida and MathTime already, it was only logical to look at this third and last Y&Y scalable font option for TeX. I thought this could be done quickly; again, I was wrong.

The original setups are described in the ReadMe files for Windows


and for the Mac


Based on the latter, it seems the Mac setup was distributed on 5 floppies, complete with metrics suitcases, screen fonts and printer fonts, plain TeX and LaTeX support files. These floppies are lost, unfortunately. So the following is mostly an attempt to identify what's relevant in the Google code repository, fix what needs to be fixed and reconstruct what's missing the best we can.


First come the fonts: get


and proceed as described in the first message of this series. Namely, cd to the pfb directory in Terminal and type

	apply 'macbinary decode -o `basename %1 .scr`.bmap %1' *.scr
	apply 't1mac %1 | macbinary decode -p -o `basename %1 .pfb`' *.pfb

The first lines converts the .scr files to bitmap FFIL screen fonts with .bmap extension, and the second line converts the .pfb files to outline LWFN printer fonts without extension. Put all the FFIL and LWFN files (140 in total) into the OS X or Textures Fonts folders.

Metrics and encodings

Second come the metrics. Four set of metrics are provided, corresponding to two different encodings for Windows:

- texnansi (aka LY1, aka 8y, aka TeX 'n ANSI), defined in <http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/texnansi.vec>;

- tex256 (aka T1, aka 8t, aka Cork, aka EC or its precursor DC), defined in <http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/tex256.vec>;

and two different encodings for the Mac:

- mac (aka Macintosh Standard Roman), defined in <http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/mac.vec> and used in Textures < 1.6;

- texmac (aka LM1, aka LT1, aka Textures Macintosh), defined in <http://code.google.com/p/yytex/source/browse/trunk/fonts/vec/texmac.vec> and used in Textures >= 1.6.
It seems that the Y&Y TeX system for Windows performed on-the-fly re-encoding, storing both sets of metrics in parallel in encoding-dependent folders


and picking one particular folder at typeset time depending on the selected encoding. Other than that, in each encoding-specific folder the metrics had exactly the same names, like emr10.tfm.

This is not the way things are in Textures (or TeX Live for that matter): each metrics bears a different name depending on the encoding, such as ptmr8y.tfm (texnansi) and ptmr8t.tfm (tex256) for Times-Roman, and it is based on these names alone that an encoding is picked at typeset time. Hence for EM you cannot have several encodings installed simultaneously: you must choose one encoding once and for good at install time, and stick with it afterwards.

This is most inconvenient, since characters will remain unavailable depending on your choice: texnansi has diacritics but not all the pre-accented letters of Eastern European languages, whereas tex256 has all these accents but no diacritics. See


For Computer Modern and Latin Modern the latter has been alleviated by adding a supplementary encoding, called Text Companion (aka TS1, aka 8c) and containing all the diacritics. There is no such companion metrics for European Modern.

texmac is similar to texnansi in this respect: texnansi was designed to combine the 8-bit Windows ANSI encoding with the 7-bit TeX text encoding (aka OT1, aka 7t), and texmac was designed to combine the 8-bit Macintosh Standard Roman encoding with TeX text. So with texmac, as with texnansi, the Eastern European pre-accented letters are missing.

Moreover, in the tests I made it seems that some ligatures are also missing with texmac: for Lucida that was "<<" and ",,", here for European Modern it seems to be "``" for the typewriter fonts.

mac encoding, which has been superseded by texmac, is obsolete and irrelevant and may be discarded.

This leaves texnansi, tex256 and texmac to choose from. The following instructions consider all three and leave it to you to choose. texmac was the encoding of Y&Y's Mac distribution of EM fonts, and it was also the encoding of BSR's distribution of the Lucida fonts. However, texnansi has prospered outside its Y&Y lineage, is widely used in the ConTeXt community and is actively supported on CTAN, see


whereas texmac is mostly forgotten and never made it outside the Textures community. In addition, texnansi is fully supported by Textures 2.2 and EdMetrics 1.7.1 and seems to provide all the functionality that texmac was designed to provide, so I see no compelling reason for sticking to texmac.

The metrics sets are reconstructed by combining the 13 math metrics at the first level of


with the 57 text metrics inside, respectively,


In the first two, discard tir.tfm. In the last, discard the math fonts emmi*.tfm, they are all faulty.

Metrics suitcases are prepared based on these TFM files in the usual way. Beforehand, you must get


and edit it for EdMetrics again in the usual way (removing all text before the opening [ and after the closing ], removing all comments as well). For each metrics, set the PostScript map and encoding as follows:

	texnansi	PostScript map -> None
			PostScript encoding -> TeXnANSI

	tex256		PostScript map -> None
			PostScript encoding -> Custom [tex256]

	texmac		PostScript map -> Roman->MacintoshStandard
			PostScript encoding -> MacintoshStandard

(La)TeX support files

Third come the plain TeX and LaTeX support files. These are spread between


and similarly test and sample files are spread between


The plain TeX macro file is


It must be supplemented for tex256 and texnansi encoding by, respectively,


There is also a


but close inspection reveals that it is for mac encoding, not texmac, and that for texmac no additional file is required.

Some preliminary editing of dcaccent.tex is required, though. Add at line 46

	\chardef\atcode=\catcode`\@     % save catcode of atsign
	\catcode`\@=11                  % make atsign `letter'

at line 502

	\catcode`\@=\atcode             % restore original catcode of atsign

and replace #1 by ##1 in lines 429-433, yielding

	    \vbox to.2ex{\hbox{\char9}\vss}\hidewidth}}%
	\def\c##1{\setbox0\hbox{##1}\ifdim\ht0=1ex\accent11 ##1

Then, to use EM fonts in plain TeX, for LY1 encoding (ie texnansi) you'll write

	\input emplain
	\input texnansi

for T1 encoding (ie tex256) you'll write

	\input emplain
	\input dcaccent

and for LM1 (ie texmac) encoding you'll write

	\input emplain

The LaTeX dedicated package is


It must be supplemented for texmac encoding by a file lm1enc.def which is missing. I quickly hacked one by taking lt1enc.def from the textures-psfonts package by Vincent Jalby on the Textures 2.1 CD, renaming it to lm1enc.def and replacing

	\DeclareFontShape{LT1}{cmr}{m}{n}{<-> Times}{} 


	        <-6>    emr5
	        <6-7>   emr6
	        <7-8>   emr7
	        <8-9>   emr8
	        <9-10>  emr9
	        <10-12> emr10
	        <12-17> emr12
	        <17->   emr17

The test files


contain a line

	\usepackage{emgreek}	 % needed for upright uppercase Greek

pointing to a package emgreek.sty which seems to correspond to the file


However, this file does more harm than good: it makes exactly the opposite of what it's supposed to, namely the upright uppercase Greek characters disappear. Hence throw away emgreek.tex/sty, and comment out the lines calling it.

Then, to use EM in LaTeX, for LY1 encoding use


for T1 encoding use


and for LM1 encoding use


Another problem arises though: when a char size option other than the default [10pt] is chosen together with T1 encoding, for example by writing


then the EM fonts are superseded by EC in the output. The way this manifests itself depends on whether the bitmap EC fonts from the Textures 2.1 CD at

	/CD Extras/Extra fonts & metrics/European CM 1.0
	/Useful Files/EC_(European_CM)_1.0

are installed (a typesetting error arises if the metrics suitcase is not installed, and blank spaces appear instead of characters in the output if the suitcase is installed). It seems that, in this case, the definition of T1/cmr from t1cmr.fd built into the LaTeX format, namely

	\providecommand{\EC at family}[5]{%
	\EC at family{T1}{cmr}{m}{n}{ecrm}

takes precedence over its redefinition in em.sty, namely

	        <-6>    emr5
	        <6-7>   emr6
	        <7-8>   emr7
	        <8-9>   emr8
	        <9-10>  emr9
	        <10-12> emr10
	        <12-17> emr12
	        <17->   emr17

To solve this, use instead


I'd have a hard time explaining why it works, but it does!


Attached is an archive of a full European Modern setup for Textures, save the FFIL/LWFN fonts for size considerations. These are created easily following the first step above. Three text metrics suitcases are provided, in LY1, T1 and LM1 encodings: choose one, add the math metrics suitcase and place them in the Textures Metrics folder. You're done!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: em.zip
Type: application/zip
Size: 421900 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/textures/attachments/20110322/8d2f7a1f/attachment.zip>
-------------- next part --------------


Finally, in several occasions in this series, files have been mentioned related to plain TeX support by Y&Y.

My first contact with these files came with Lucida fonts, licensed from Y&Y and sold by Blue Sky Research. The LucidaBright #2 floppy contained


the Lucida Expert Bright floppy contained


and the file lcdplain.tex in these floppies contained three mysterious lines at the end

	% \input texnansi.tex if you are using `TeX n ANSI' encoding
	% \input ansiacce.tex if you are using Windows ANSI encoding
	% \input stanacce.tex if you are using Adobe StandardEncoding 

At the time I could not understand what this was about: the lines mentioned a file which wasn't there (ansiacce.tex), they did not mention one which was (macacce.tex), and obviously none of these files was of any use to Textures anyway.

This became more mysterious with gwTeX, based on teTeX, whose early versions had a MathTime support directory containing


In this support directory there were also files mtplain.tex and mtplainx.tex containing the three same mysterious lines at the end plus four other mysterious lines next to the beginning

	\input encode			% Read user encoding customizations:
					% use encodetx.tex for TeX 'n ANSI
					% use encodean.tex for Windows ANSI
					% use encodese.tex for Adobe StandardEncoding

and the additional files so mentioned,


contained the even more mysterious lines

	% The following is for Adobe StandardEncoding (also \input stanacce.tex) 

	% The following is for Windows ANSI (also \input ansiacce.tex) 

	% The following is for TeX n ANSI (also \input texnansi.tex)

	% The following is for `DC' encoding (Cork Ireland TUG meeting 1990) [...] (also \input dcaccent.tex)

	% Following is for Macintosh `standard roman encoding' (\input macaccen.tex)

Only now, having done all those adaptations and inspected the Y&Y TeX Google code repository, am I now finally starting to make sense of this.

Here is a sketch table recapitulating, for each encoding, the associated VEC, ENC and plain TeX support files from the Y&Y TeX Google code repository:

	Adobe Standard			standard.vec	standard.enc	stanacce.tex	8a
	Windows ANSI			ansinew.vec	ansinew.enc	ansiacce.tex
	TeX n ANSI			texnansi.vec	texnansi.enc	texnansi.tex	8y, LY1
	Cork				tex256.vec	tex256.enc	dcaccent.tex	8t, T1, EC
	Macintosh Standard Roman	mac.vec				macaccen.tex
	Textures Macintosh		texmac.vec	texmac.enc			LM1, LT1
	Textures Typewriter Macintosh	texmax.vec					LM2

Following is an archive containing these plain TeX support files, in their latest versions corrected for EM, plus fonttest.tex for drawing glyph charts and plainmin.tex mentioned in mtplain.tex. The version of tex256.enc edited for EdMetrics and used for EM is included. For the other ENC files, Adobe Standard and Textures (Typewriter) Macintosh are built into EdMetrics, while Windows ANSI is irrelevant outside Y&Y TeX and Macintosh Standard Roman is irrelevant for Textures >= 1.6.

Only texnansi.tex and, for the EM fonts, dcaccent.tex are really useful for Textures, but in this way all the files referenced in the plain TeX macro files from Y&Y for Lucida, MathTime and EM are put together in one place.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: yandy.zip
Type: application/zip
Size: 44962 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/textures/attachments/20110322/8d2f7a1f/attachment-0001.zip>
-------------- next part --------------

More information about the Textures mailing list