unit fonts

tomprice's picture

I plan to use various sizes of Unit-Medium (UnMd___.ttf) and Unit-Regular (UnLt___.ttf) TrueType fonts in three cover pages—generated by a package—of an article, and then revert to default fonts. (I have the unit fonts.) I would like to avoid using XeTeX and make the use of the cover package as seamless as possible to its users. Are there any suggestions for doing this? Thanks.



Adding fonts for use with the

Adding fonts for use with the TeX/LaTeX systems included with SW can be difficult.  There is one set of steps for adding a font when typesetting for DVI and another when typesetting for PDF.  The discussion below applies when typesetting for DVI and see the message thread at http://forum.mackichan.com/node/238 for adding fonts when typesetting for PDF.

Here are steps to add a new TrueType font. This hasn't been thoroughly
tested, but I believe the steps are complete.

1) The font must be installed for use by Windows.

2) Create the TeX font metric files.
- Start the TrueTeX Previewer.
- Select File, Export Metrics.
- In the Font dialog, select the font you wish to use and choose OK.
- In the Choose TeX External Name dialog, enter a new name if needed (TeX external name should not contain any spaces). This name will become the base font name and will also be used later in these instructions.
- In the Save Metric File As dialog, change the Save as type to "TeX 8-bit Virtual Property List (*.VPL)" and use any convenient directory as the destination directory and choose Save.
- Choose Yes to the question "Do you want the TeX virtual font to be a re-encoded version of this font?".
- In the Select Input Font's (Actual) Encoding, select "Windows 95/NT Full Unicode (16-bit)" (unless you know the source font to use a different encoding) and choose OK.
- In the Select Encoding for TeX Virtual Font dialog, select "TeX Roman (Level 2 Ligatures)" and choose OK.
- The destination directory used above will now contain files with the extension .vpl, .vf, and .tfm.
- Move the .tfm file to the directory TCITeX\fonts\tfm.
- Move the .vf file to the directory TCITeX\fonts\vf.
- The .vpl file is used to create the .tfm and .vf files, but is no
longer needed, so the .vpl file can be deleted.

3) Repeat the above steps for the Italic, Bold, and Bold Italic versions of the font. Use the font names suggested by the TrueTeX Previewer.

4) The fonts can now be selected inside a document using TeX fields. For example, if you used the Windows font Verdana and used the name verdana (as suggested by the TrueTeX Previewer) when creating the font, you can use the following steps to include Verdana text:
- Select Typeset, Preamble and at the end of the existing text add:
\font\verdanasmall=verdana at 8pt
\font\verdanalarge=verdana at 12pt
- Move the insert point to the location in your document where you want to add text using the Verdana font.
- Select Insert, Typeset Object, TeX field. In the body of the TeX field add:
Use OK to close the open dialog.
- Add the text you wish to appear with the Verdana font when the document is typeset.
- Select Insert, Typeset Object, TeX field. In the body of the TeX field add:
These instructions will typeset a 10pt font. Instead of using "\verdana" in the first TeX field, you can use "\verdanasmall" to typeset text at 8pt, or use "\verdanalarge" to typeset text at 12pt.

5) Here is a method of using the LaTeX font selection scheme and adding a command to your document to change the base font of your document. First, you must create a font definition file. Continuing the example using Verdana, create the file t1vrd.fd which contains:

\ProvidesFile{t1vrd.fd}[Font definitions for Verdana 09/01/04 (gp)]


\DeclareFontShape{T1}{vrd}{b}{n}{<-> verdanab}{}
\DeclareFontShape{T1}{vrd}{b}{sl}{<-> verdanabo}{}
\DeclareFontShape{T1}{vrd}{b}{it}{<-> verdanabi}{}

\DeclareFontShape{T1}{vrd}{m}{n}{<-> verdana}{}
\DeclareFontShape{T1}{vrd}{m}{sl}{<-> verdanao}{}
\DeclareFontShape{T1}{vrd}{m}{it}{<-> verdanai}{}

\DeclareFontShape{T1}{vrd}{bx}{n}{<->ssub * vrd/b/n}{}
\DeclareFontShape{T1}{vrd}{bx}{sl}{<->ssub * vrd/b/sl}{}
\DeclareFontShape{T1}{vrd}{bx}{it}{<->ssub * vrd/b/it}{}


The file can be saved in any directory at or below \TCITeX\TeX which is searched when running the TrueTeX Formatter. A convenient directory is \TCITeX\TeX\LaTeX\SWmisc.

Next, add the following to your document preamble:



pviton's picture

George: I tried your (very

George: I tried your (very clear) instructions with the verdana font (when I had trouble trying to help Tom with his font). What happened is that while I can access the latin letters (A-Z,a-z) and the digits, plus some other symbols like Trademark, cents, and Euro, (a) I cannot get any of the accented European letters/dipthongs (I tried AE, A-acute and A-grave); and (b) I don't get the f-ligatures that are also present in this font.  Can you get either of these features to work?