I need to use symbols \varheartsuit and \vardiamondsuit in package fdsymbol without changing other fonts, so I can't using command \usepackage{fdsymbol}.

This answer suggest using \DeclareSymbolFont and \DeclareMathSymbol, but simple replacement doesn't work here.

So how can I do a similar job?

Thanks for your time and effort.

2 Answers 2


This is a short working example:



\vardiamondsuit is defined as the 182nd character in FdSymbolA-Book.pfb.

\varheartsuit is defined as the 184th character in FdSymbolA-Book.pfb.


enter image description here

  • Thanks for your answer. And could you please explain why we need \DeclareFontFamily and \DeclareFontShape commands compared to the answer in the link? Besides, how do I know the number of a character in a package quickly?
    – Andrews
    Jul 29, 2020 at 15:04
  • 1
    In fdsymbol.sty you will find \DeclareFontFamily{U}{FdSymbolA}{} \DeclareFontShape{U}{FdSymbolA}{m}{n}{ <-7.1> s * [\fdsy@scale] FdSymbolA-\fdsy@mweight@small <7.1-> s * [\fdsy@scale] FdSymbolA-\fdsy@mweight@normal }{}. I have simplified this.
    – domperor
    Jul 29, 2020 at 16:16
  • 1
    >Besides, how do I know the number of a character in a package quickly? I opened the FdSymbolA-Book.pfb with fontforge.app to find the char codes.
    – domperor
    Jul 29, 2020 at 16:18

To add to @domperor's answer, for symbols in text mode, the \usefont command can be used.



x\vardiamondsuit\varheartsuit x


There are various packages, like fonttable, for displaying the contents of a font.

Or you can just loop through the <=256 \chars of a legacy font (note: some Unicode fonts have thousands of glyphs):

some glyphs



%=============== font table labels
\newcommand\ftlabel[1]{{\usefont{OT1}{lmr}{m}{n}\scriptsize #1}}

%------------------- font table
\count255 = 0
\ftlabel{[\number\count255 =}\colorbox{yellow!30}{\textcolor{red!70!blue!80}{{\large\char\number\count255}}}\ftlabel{] } %need space for line-breaking
\ifnum\count255 < 256
\advance\count255 by 1


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .