# [OS X TeX] Order ?

Michael Sharpe msharpe at ucsd.edu
Sun Jun 23 20:41:44 CEST 2013

On Jun 23, 2013, at 9:35 AM, Jacques ANDRÉ <jacques.andre35 at gmail.com> wrote:

>
> Le 23 juin 2013 à 17:55, Herbert Schulz <herbs at wideopenwest.com> a écrit :
>>
>>
>
>> But I have a questions for you. Why are you using xelatex with fontspec to typeset a document where you want to use Fourier/Utopia as the font?
>
> I'm used to take one or two characters from OTF or TTF fonts for which I have no xxx.sty, dans tghat are not defined in my mainfont (Fourier) typically
>
> {\fontspec{Dingbats2SampleOT.otf}\char"NNNN} with various values of NNNN
>
> Is it another easyest way ?
>

It's not hard to avoid fontspec if all you want to do is use a few isolated glyphs, assuming the font has no more than 256 glyph slots. Using as an example the font in your example, copy it to an otherwise empty folder, open a Terminal window and cd to that folder, then type

/usr/texbin/otftotfm Dingbats2SampleOT.otf zding2 >zding2.map

(The name zding2 is arbitrary, but should be chosen not to conflict with other font names in use.) The error messages may be ignored. You will now have a .enc, a zding2.tfm and a .pfb that can be moved to permanent positions for future use, but you can just leave them loose in your current working folder. You can make a record of the glyph positions using the file

% !TEX TS-program = pdflatexmk
\documentclass{article}
\pdfmapfile{+zding2.map}
\usepackage{fonttable}
\begin{document}
\fonttable{zding2}
\end{document}

To use a particular glyph, you can make a macro. Eg

% !TEX TS-program = pdflatexmk
\documentclass{article}
\pdfmapfile{+zding2.map}
\font\zd=zding2 at 10pt % change size manually, as appropriate
\def\zda{{\zd\char144}}
\begin{document}
\zda
\end{document}

If you wanted to use it with the pifont package, you would have to create a file uzding2.fd with the appropriate contents.

Michael