ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Park Nelson <peter.park.nelson@gmail.com>
To: ntg-context@ntg.nl
Subject: Fonts in Mk IV -- \definefontalternative documentation?
Date: Thu, 10 Nov 2011 22:05:02 -0600	[thread overview]
Message-ID: <CAGfkPG=owV3U_Ga-dZU4boch39+-06362oZDCr9V+ZY2i+CU4Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2049 bytes --]

Hello, I am coming to ConTeXt from LaTeX and have a typescript question. I
was searching for information on the mailing list about defining semibold
and other font variants, and found the following. Can you tell me if
further information is only available in the book "context mkiv -- Fonts"
or can I find it somewhere else? I have searched through the revised Fonts
chapter of the ConTeXt manual but the \definefontalternative macro and the
approach described here are not documented there.

The approach below works for me if I adapt it to Adobe Garamond Premier
Pro, but I am attempting to build a typescript for that handles optical
weights, small caps, etc and I have not been able to make it work yet.

Before I try posting a minimal example, I would like to be sure that I am
looking at the right documentation. I have looked at the "Fonts in LuaTeX"
page on Contextgarden as well, but I don't think I have a full
understanding of typescripts using OSFONTDIR fonts yet. If there is
something I am missing please let me know.

Thanks,
PPN

**
Based on ideas from the forthcoming book "context mkiv -- Fonts":

% note: I have deleted all lines except the relevant ones for defining
% the semi bold alternatives

\definefontalternative [sb]
\definefontalternative [si]

\definebodyfont [default] [ss]
  [sb=SansSemiBold sa 1,
   si=SansSemiBoldItalic sa 1]

\starttypescript [sans] [myriadpro]
   \definefontsynonym [MyriadPro-SemiBold]  [name:myriadprosemibold]
   \definefontsynonym [MyriadPro-SemiBoldIt][name:myriadprosemiboldit]
\stoptypescript

\starttypescript [sans] [myriadpro]
   \definefontsynonym [SansSemiBold]         [MyriadPro-SemiBold]
[features=default]
   \definefontsynonym [SansSemiBoldItalic]   [MyriadPro-SemiBoldIt]
[features=default]
\stoptypescript

\starttypescript [myriadpro]
\definetypeface [myriadpro] [ss] [sans]     [myriadpro] [default]
\stoptypescript

\usetypescript[myriadpro]

\starttext

\switchtobodyfont[myriadpro,ss]

\sb Hello
\si Italic

\stoptext



-- 
Peter Park Nelson
peter.park.nelson@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 2249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2011-11-11  4:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11  4:05 Peter Park Nelson [this message]
2011-11-11 10:13 ` Christian
2011-11-11 13:37   ` Wolfgang Schuster
2011-11-11 14:09     ` Christian

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='CAGfkPG=owV3U_Ga-dZU4boch39+-06362oZDCr9V+ZY2i+CU4Q@mail.gmail.com' \
    --to=peter.park.nelson@gmail.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).