# [texhax] Defining a new font in Plain Tex

Paul Isambert zappathustra at free.fr
Wed Jan 13 11:08:18 CET 2010

A more authoritative voice (two, actually) has been heard, both here and
on the XeTeX list, on Philip's sub-topic about Type-1 font (summary:
don't forget quotes).
Now, back to the original problem: pdfTeX doesn't understand
True-/OpenType fonts. As you can see, it tries to load a standard (.tfm)
TeX metric font. The solution would be a conversion of your font to
applications, but I've no experience with them.

However, the graphics trouble might not be so bad. There's probably a
XeTeX equivalent (\XeTeXpicfile?) to pdfTeX's command (\pdfximage?).
Please tell us what command is "undefined" when compiling with XeTeX,
and perhaps a simple hack at the beginning of your job will allow you to
use XeTeX without further changes to the document.

Paul

Firestone, Elaine R. (HQ-279.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] a
écrit :
> Well, the command "\font\bankgothic="Bank Gothic" at 10pt" worked great, as long as I set everything to xetex, HOWEVER, the document is already set up in pdfTeX, which has it's own coding for graphics. XeTex gave me the old "undefined control sequence" error message when it got to the graphics coding.
>
> So, what I need is coding that'll work in pdfTeX or Plain Tex. When I typeset it in Plain TeX, I got the error message
> "kpathsea: Invalid fontname Bank Gothic Medium', contains ' '
>
>
>
> On Jan 12, 2010, at 6:31 AM, Paul Isambert wrote:
>
>
>> I take it for granted that "Bank Gothic" is an OpenType or TrueType
>> font, i.e. not a font that was tailored specifically for TeX. (For
>> instance you can use Bank Gothic in a text processor like OpenOffice
>> Writer, I suppose.)
>> Indeed, TeX, which predates most forms of computer typography, uses its
>> own font format. Hence two solutions:
>>
>> - Converting your True- or OpenType font into TeX's format. There exist
>> - Turning from TeX to XeTeX, an implementation that takes modern font
>> formats (and modern encodings, for that matter).
>>
>> The later solution is easy. Use XeTeX in your distribution instead of
>> TeX or eTeX or pdfTeX or whatever you use to compile. Most likely, the
>> only noticeable difference will be that you'll produce pdf directly
>> (there's no output in dvi).
>>
>> Now, to use your font, say:
>>
>> \font\bankgothic="Bank Gothic" at 10pt % If you want 10pt of course
>>
>> If there are italic or bold variants, say:
>>
>> \font\bankgothicit="Bank Gothic /I" at 10pt
>> \font\bankgothicbf="Bank Gothic /B" at 10pt
>> \font\bankgothicitbf="Bank Gothic /IB" at 10pt
>>
>> Now, to use your font, just issue the \bankgothic command. However to
>> automatically have italic Bank Gothic with \it, you must redefine it to
>>
>> \def\it{\bankgothicit}
>>
>> and so on for other styles.
>>
>> To switch back to your default font, say \tenpoint, or simply use Bank
>> Gothic in a group:
>>
>> Text with default font ... {\bankgothic Text with the Bank Gothic font}
>> ... text with default font ...
>>
>> so you don't need to restore anything.
>>
>> Paul
>>
>>
>>
>> Firestone, Elaine R. (GSFC-279.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]
>> a écrit :
>>
>>> Here's a new problem for me. I want to use a font that isn't computer modern or related to TeX in any way. (It's "Bank Gothic" if anyone's interested, and yes, it's one my computer... a Mac running Snow Leopard.) Can anyone tell me what code to use to allow me to use this? Knuth and Bechtolshein only mention "other fonts" and "third party fonts can be used" and mention "metafonts," etc., but don't give the actual coding for it. I'm not a TeX expert per se, just someone who has to use it because I'm told to, so I'm a little lost.
>>>
>>> Can anyone help?
>>>
>>> Thanks.
>>>
>>> Elaine
>>>
>>>
>>> _______________________________________________
>>> TeX FAQ: http://www.tex.ac.uk/faq
>>> Mailing list archives: http://tug.org/pipermail/texhax/
>>>
>>> Automated subscription management: http://tug.org/mailman/listinfo/texhax
>>> Human mailing list managers: postmaster at tug.org
>>>
>>>
>> _______________________________________________
>> TeX FAQ: http://www.tex.ac.uk/faq
>> Mailing list archives: http://tug.org/pipermail/texhax/
`