[XeTeX] "if" tests for italic / bold into new command?

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Dec 23 14:40:34 CET 2009


On 23/12/2009 13:30, Kārlis Repsons wrote:
> Sorry, I didn't clarified again: to test if font named X has bold/italic/..!
> My command just receives a font name and has to demonstrate font features...

Something like:

\newcommand*\my at font@test[1]{%
   \my at font@test at aux@i#1bold\@nil\@@nil
}
\def\my at font@test at aux@i#1bold#2#3\@@nil{%
   \ifx#2\@nil
     \expandafter\my at font@test at aux@ii
   \else
     \expandafter\stuff at with@bold at font
   \fi
   {#1}%
}
\newcommand*\my at font@test at aux@ii[1]{%
   \my at font@test at aux@iii#1italic\@nil\@@nil
}
\def\my at font@test at aux@iii#1italic#2#3\@@nil{%
   \ifx#2\@nil
     \expandafter\stuff at with@normal at font
   \else
     \expandafter\stuff at with@italic at font
   \fi
   {#1}%
}

perhaps?
-- 
Joseph Wright


More information about the XeTeX mailing list