4

I have this problem, I know how to specify a font feature. But I don't know how to limit it to only the header portion of the document. Here is the code:

\definefontfamily [brill] [rm] [Brill]

\definefontfeature[default][default][lnum=yes]

\setupbodyfont[brill]

\setuphead  [title]
            [indentnext=yes,
             style=\tfc\sc,
             page=no]

\starttext

\head{example}

\stoptext

2 Answers 2

5

I don't understand if you want it in the header of the page or if you want it in the title you define. Also, \head is not a valid macro. You can try the approach below.

\definefontfamily [brill] [rm] [Brill]

\definefontfeature
  [myfeature]
  [default]
  [lnum=yes,
   smcp=yes]

\setupbodyfont[brill]

\setuphead
  [title]
  [indentnext=yes,
   style={\feature[+][myfeature]\tfc},
   page=no]

\setupheader
  [style={\feature[+][myfeature]}]

\setupheadertexts
  [title]

\starttext

\starttitle
  [title=Example 0123]

0123

\stoptitle
\stoptext

This results here in

Brill with small caps in titles and header

2
2

More generally, you can set it so that small capitals will always use lining figures by using \adaptfontfeature:

\definefontfamily [brill] [rm] [Brill]

\adaptfontfeature[f:smallcaps][lnum=yes]

\setupbodyfont[brill]

\setuphead[title][style=\tfc\sc]

\startTEXpage[width=3in, offset=1em]
    \title{Test 1234567890 aAaA}

    Test 1234567890 aAaA

    \smallcaps{Test 1234567890 aAaA}
\stopTEXpage

output

You must log in to answer this question.

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