[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How should one handle condensed etc., variants?



The question is this: the NFSS allows you to select founts by:

encoding/family/series/shape.

Now then, standard commands define \mdseries and \bf series; and \upshape,
\itshape, and all the rest of them.

Extending this to use, say, a demi bold variant is trivial:

%
% db series; \dbseries -- demi bold
%
\DeclareTextFontCommand{\textdb}{\dbseries}
\newcommand{\dbdefault}{db}
\DeclareRobustCommand{\dbseries}
        {\not@math@alphabet\dbseries\relax
         \fontseries\dbdefault\selectfont}

Which makes perfect sense however you look at it.

But what should you do to refer to, say, a condensed variant?  Ideally,
another axis in the \DeclareFontShape command is needed, so you could say
something like:

\DeclareFontShape{OT1}{cmr}{m}{sc}{cn}

This is far beyond my ability to implement, and I daresay needs some major
surgery in the guts of LaTeX.

A technique I've settled on is to add series, one series for each
occurrance of weight and expansion:

%
% mc series; \mcseries -- roman condensed
%
\DeclareTextFontCommand{\textmc}{\mcseries}
\newcommand{\mcdefault}{mc}
\DeclareRobustCommand{\mcseries}
        {\not@math@alphabet\mcseries\relax
         \fontseries\mcdefault\selectfont}
%
% mx series; \mxseries -- roman extended
%
\DeclareTextFontCommand{\textmx}{\mxseries}
\newcommand{\mxdefault}{mx}
\DeclareRobustCommand{\mxseries}
        {\not@math@alphabet\mxseries\relax
         \fontseries\mxdefault\selectfont}


This feels quite seriously inelegant, and I wonder if it is a sensible
approach, and/or if anyone else has any other ideas?

Rowland.