From: Pavneet Arora <pavneet_arora@waroc.com>
To: ConTeXt Mailing list <ntg-context@ntg.nl>
Subject: Specifying font style variant with \definefontfamily
Date: Thu, 9 Jun 2016 16:37:43 -0400 [thread overview]
Message-ID: <20160609203743.GO39769@lahore> (raw)
I'm still a bit at a loss on how one goes about correctly specifying the
variants in \definefontfamily using the default form given in the wiki.
Usually adding "* Light", etc. is sufficient (see commented line using
Junction font).
(As an aside, is it also possible to combine \sc\bf? I haven't been
able to figure that out).
My application is using the (free) Andada font family, and I need to
point the smallcaps style to the correct font
(https://www.fontsquirrel.com/fonts/andada).
In the following MWE I tried the following without success:
1. [sc=* SC Regular]
2. [sc=Andada SC Regular]
3. [sc=* SC-Regular]
4. [sc=Andada SC-Regular]
All give the following (or similar) error to stdout:
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: attempt to index local 'file' (a nil value)
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: in function 'selectfont_savefile'
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:151: in function <...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:142>
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:526: in function 'registerfiles'
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:567: in function 'action1'
[string "local function scan1()..."]:55: in function <[string "local function scan1()..."]:42>
1 \definefontfamily[mainface][rm][Latin Modern]
2 >> \definefontfamily[mainface][rm][Andada][sc=Andada SC Regular]
I end up finally settling on the form using the explicit file:
[sc=file:AndadaSC-Regular.otf], which does work.
But I really would like to understand how the first form as given in the
wiki should be used properly? What patterns should I be looking for?
An output of 'strings' on the font .otf file yields:
"... with Reserved Font Name 'Andada'Andada SCRegular"
"AndadaSC-Regular"
advTHANKSance.
>>>> MWE
\definefontfamily[mainface][rm][Latin Modern]
\definefontfamily[mainface][rm][Andada][sc=Andada SC Regular]
%\definefontfamily[mainface][rm][Andada][sc=file:AndadaSC-Regular.otf]
%\definefontfamily[mainface][ss][Junction][tf=* Light,bf=* Regular]
\definefontfamily[mainface][ss][Fira Sans]
\definefontfamily[mainface][tt][Inconsolata]
\definefontfamily[mainface][mm][Latin Modern Math]
\setupbodyfont[mainface,9pt]
\starttext
\sc Test of Small Caps.
\stoptext
<<<< MWE
--
Pavneet Arora m: +1 (647) 406-6843
Waroc Informatik t: +1 (416) 937-9276
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2016-06-09 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 20:37 Pavneet Arora [this message]
2016-06-09 20:59 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160609203743.GO39769@lahore \
--to=pavneet_arora@waroc.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).