[XeTeX] fontspec: loading different shapes/scales of one font as different font instances?

BPJ bpj at melroch.se
Wed Jul 28 16:02:14 CEST 2010


As the subject line says I wonder if it's possible
with fontspec to load different shapes of the same
font as different font instances?

The thing is I'm going to write a script which
generates XeLaTeX source and where the user is to
be able to choose their own fonts/shapes/sizes for
elements like text and headings, and I hope to be
able to define a font instance for each of these
elements but not to have to check if they want,
say, italic or smallcaps headings scaled n and
stick in formatting commands if they do!

(Some of you may balk at italic/whatever headings,
but in my case the linguistics anti-prescriptivism
pill went down rather successfully, and I'd hate
to be prescriptivist when I don't have to. Besides
it is sometimes the case that bold is used with
some technical signal value beside italics and
I've found it convenient to set headings in
smallcaps in such cases.[^1])

[^1]: This in turn requires an amount of
     \addcontentsline gymnastics. I'd appreciate
     pointers on methods/packages to globally styling
     headings/toc entries independently of each other.
     I'm probably showing my ignorance here, or my
     needs/wishes are really fringe! texdoc'ing
     "contents" or "toc" turns up nothing useful, and
     section.sty seemeth to be an olde and arcane dogge
     (at least to me!)

/BP 8^)>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  "C'est en vain que nos Josués littéraires crient
  à la langue de s'arrêter; les langues ni le soleil
  ne s'arrêtent plus. Le jour où elles se *fixent*,
  c'est qu'elles meurent."           (Victor Hugo)


More information about the XeTeX mailing list