For some fonts, it's easy to replace the default font with something like: \renewcommand{\rmdefault}{somefont}
.
However, some fonts, like BrushScriptX
want you to use a special command like \bsifamily
to use the font. In the
\bsifamily
is defined in /usr/share/texmf-texlive/tex/latex/brushscr/pbsi.sty:
\DeclareRobu开发者_如何转开发stCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}%
\fontseries{xl}\fontshape{n}\selectfont}
In this case, I have a document that uses a cls stylesheet that I am editing. I'm using the standard includes to use this font:
\usepackage[T1]{fontenc}
\usepackage{pbsi}
If I try to use \renewcommand{\rmdefault}{bpsi}
in my document's template, it fails with the error: Font shape `T1/pbsi/m/n' undefined
What might be the best way to replace the default roman font with BrushScriptX in a template, like \renewcommand{\rmdefault}{otherfont}
would?
If you look inside pbsi.sty
you'll find
\DeclareRobustCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}% \fontseries{xl}\fontshape{n}\selectfont}
Therefore, to set this font as the default — ugh :)
— you'll need to write
\renewcommand\rmdefault{pbsi} \renewcommand\mddefault{xl}
(\mddefault
is the default "non-bold" series used in running text.)
精彩评论