The file fdsymbol.sty
defines all symbols sequentially and one has to count lines or exploit some other trick: fonttable
is our friend.
First of all, look for \medtriangleright
, to find
\fdsy@DeclareSymbol{\medtriangleright}{symbols}{\mathbin}
\fdsy@DeclareAlias{\triangleright}{symbols}{\mathbin}
\fdsy@DeclareSymbol{\medtriangleup}{symbols}{\mathbin}
\fdsy@DeclareAlias{\triangle}{symbols}{\mathbin}
\fdsy@DeclareAlias{\vartriangle}{symbols}{\mathbin}
\fdsy@DeclareSymbol{\medtriangleleft}{symbols}{\mathbin}
\fdsy@DeclareAlias{\triangleleft}{symbols}{\mathbin}
\fdsy@DeclareSymbol{\medtriangledown}{symbols}{\mathbin}
\fdsy@DeclareAlias{\triangledown}{symbols}{\mathbin}
so we know that we need the symbols
math font:
\DeclareSymbolFont{symbols}{U}{FdSymbolA}{m}{n}
OK, look for FdSymbolA
\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
}{}
Now it's apparent that \fdsy@scale
is a scale factor; use 1 to begin the study; what are the other commands? They depend on options given to the package:
\fdsy@choicekey{normalweight}{book,regular,auto}{%
\ifcase\@tempb\relax
\renewcommand\fdsy@mweight@normal{Book}%
\renewcommand\fdsy@mweight@small{Book}%
\or
\renewcommand\fdsy@mweight@normal{Regular}%
\renewcommand\fdsy@mweight@small{Regular}%
\or
\renewcommand\fdsy@mweight@normal{Book}%
\renewcommand\fdsy@mweight@small{Regular}%
\fi
}
I'd go with the book
choice. So we can start:
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{
<-7.1> s * [1] FdSymbolA-Book
<7.1-> s * [1] FdSymbolA-Book
}{}
\DeclareSymbolFont{fdsymbols}{U}{FdSymbolA}{m}{n}
One must use a different name than symbols
.
Oh, well, there's no point in separating the fonts, so we can do
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{
<-> s * [1] FdSymbolA-Book
}{}
\DeclareSymbolFont{fdsymbols}{U}{FdSymbolA}{m}{n}
Now we need to define the symbols and we need to find the slots. It's not really difficult: make a simple file
\documentclass{article}
\usepackage{fonttable}
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{
<-> s * [1] FdSymbolA-Book
}{}
\begin{document}
\xfonttable{U}{FdSymbolA}{m}{n}
\end{document}
and run LaTeX on it. You'll find the symbols laid out with codes!
Now we can finish up.
\documentclass{article}
%%% define symbols from fdsymbol
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{
<-> s * [1] FdSymbolA-Book
}{}
\DeclareFontShape{U}{FdSymbolA}{m}{b}{
<-> s * [1] FdSymbolA-Medium
}{}
\DeclareSymbolFont{fdsymbols}{U}{FdSymbolA}{m}{n}
\SetSymbolFont{fdsymbols}{bold}{U}{FdSymbolA}{m}{b}
\DeclareMathSymbol{\medtriangleright}{\mathbin}{fdsymbols}{86}
\DeclareMathSymbol{\medtriangleup}{\mathbin}{fdsymbols}{87}
\DeclareMathSymbol{\medtriangleleft}{\mathbin}{fdsymbols}{88}
\DeclareMathSymbol{\medtriangledown}{\mathbin}{fdsymbols}{89}
%%%
\begin{document}
$a\medtriangleright b\medtriangleup c\medtriangleleft d \medtriangledown e$
\boldmath
$a\medtriangleright b\medtriangleup c\medtriangleleft d \medtriangledown e$
\end{document}
Test with different scale factors until you're satisfied. I added support for bold math.
Just for completeness, here's the output with [1]
changed into [0.8]
to get reduced size for the symbols:
\DeclareFontShape{U}{FdSymbolA}{m}{n}{
<-> s * [0.8] FdSymbolA-Book
}{}
\DeclareFontShape{U}{FdSymbolA}{m}{b}{
<-> s * [0.8] FdSymbolA-Medium
}{}
(no other change).
unicode-math
,stix
andstix2
packages are especially comprehensive.fdsymbol
?