# [texhax] Symbol to number correspondence for fonts.

Rolf Turner r.turner at auckland.ac.nz
Tue Apr 16 05:50:31 CEST 2013

On 16/04/13 15:26, Axel E. Retif wrote:
> On 04/15/2013 09:17 PM, Rolf Turner wrote:
>
>>
>> Some time ago I asked of this list how to produce a solid
>> heart suit symbol without changing the font of the whole
>> document.
>>
>> I got several useful replies, including one from Paul Isambert
>> who suggested:
>>> A solution is to use directly the font loaded by the arev package:
>>>
>>>      \font\heartfont=favmr7y at 10pt % set your own size here
>>>      \newbox\heartbox \setbox\heartbox=\hbox{\heartfont\char"56}
>>>      \def\varheart{\leavevmode\copy\heartbox}
>>>
>>> (The box trick allows you not to bother about math mode.)
>> I now would like to get a solid *diamond* suit symbol as well.
>> Presumably the same syntax would work except that I would
>> have to change "56" to some other number?  What number?
>
>
>
> pdftex testfont
>
> Name of the font to test = favmr7y
>          Now type a test command (\help for help):)
> *\table
>
> *\end
>
> You will get a testfont PDF in your working directory. There you'll
> find the information you need.

Thanks very much; that got me started at least.  But I'm still kind of
confused.
(My usual state ....)

First off I'm not quite sure how to interpret the table.  The solid
diamond suit
symbol appears in a row labelled " '12x " and a column labelled " '7 " so I
first conjectured that the corresponding number would (might?) be 127.  But
this gave me an error when I tried it.  I then tried 57, since the solid
diamond
was the next symbol after the solid heart and I had some evidence that the
number for the solid heart was 56.  This indeed worked.

But how can I read off the appropriate number from that table, starting from
scratch, as it were?

One more question:  My code (following the recipe from Paul Isambert)
looks like:

\documentclass[12pt]{article}
\font\heartfont=favmr7y at 12pt % set your own size here
\newbox\heartbox \setbox\heartbox=\hbox{\heartfont\char"56}
\def\varheart{\leavevmode\copy\heartbox}
\newbox\dimebox \setbox\dimebox=\hbox{\heartfont\char"57}
\def\vardime{\leavevmode\copy\dimebox}
\begin{document}
{\Huge
$\heartsuit$ \varheart $\diamondsuit$ \vardime
}
\end{document}

The solid suit symbols come out much much smaller than the "built-in"
silhouette symbols.  Why is that and how can I make them bigger?