ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: simplefonts
Date: Sat, 13 Mar 2010 21:13:14 +0100	[thread overview]
Message-ID: <C81B9D13-4FA8-47C3-933B-17275C286491@uni-bonn.de> (raw)
In-Reply-To: <54d7f5601003130809m7a86c77djd5bc5784db45d689@mail.gmail.com>


On Mar 13, 2010, at 5:09 PM, Michael Saunders wrote:
> 
> I don't understand the syntax of \starttypescript.  It doesn't appear
> in the manual.
> It occurs twice in the "typography" document.  In both cases the first argument
> appears to be the name of the typescript.  In one example, there is only one
> argument, and in the other example, the second argument appears to be a list
> of encodings.  Since everything is now utf-8, I guess that could be forgotten.
> So, in your example here, I take "serif" to be the name of both typsecripts, but
> I don't know what [garamondprem] is doing.

We're talking about mkiv here, so we don't need to worry about encodings (which is a confusing topic - utf8 is not a font encoding, but an input encoding; these two are not identical). A typescript file can contain a series of typeface definitions, e.g., one for serif, one for sans, one for mono, one for math, etc. hence the syntax \starttypescript [<typeface>] [<identifier>]

> It's never spelled out, but from looking at examples of
> \definefontsynonym [1][2] in the
> docs, I think it means something like "what we used to call 2 we can
> now call 1", i.e.,
> telling the machine to replace instances of "1" with "2".  If this is
> the case, your third
> arguments above just seem to apply your features to the fonts referred
> to, which makes sense.
> I don't see, though, why this has to be done twice, and with an extra
> layer of misdirection.
> E.g., instead of:
> \definefontsynonym [Garamond-Roman]          [name:garamondpremierpro]
> [features=myroman]
> \definefontsynonym [Serif]           [Garamond-Roman] [features=myroman]
> why not just:
> \definefontsynonym [Serif]          [name:garamondpremierpro]
> [features=myroman]?
> 
> I think the purpose of the above step is to connect identifiers like
> "Serif" to a qualified font file.
> 
You could indeed write typescripts without the extra layer of abstraction. It just may make it easier if you want to mix different fonts etc.

>> Finally, define your first typeface:
>> 
>> \starttypescript [GaramondPrem]
>> \definetypeface [GaramondPrem] [rm] [serif] [garamondprem] [default]
>> \stoptypescript
> 
> I think this is a typescript called GaramondPrem that contains a
> typeface called GaramondPrem.  It seems a little redundant that they
> have the same name.  

You can use two different names, if you prefer.

> I know that the typescripts are  referred to by
> \usetypescript, but I don't know where typefaces are referred to, so
> maybe it's  just a dummy argument.  

In the \usebodyfont or \switchtobodyfont commands.

> The "[rm]" seems to be what links
> this to the font switching command, and the "[garamondprem]" obviously
> refers to both the typescripts you defined above.  I don't  understand
> what the "[serif]" is doing.  In the typography manual, Hans says,
> "The third and fourth
> arguments to \definetypeface are pointers to already declared font
> sets; these are defined elsewhere."  I think by "font set" he must
> mean a typescript like garamondprem, but I don't know where  the font
> set (typescript?) "serif"

As I said: there's at least serif, sans, mono, math

> is or why two font sets need to be pointed
> to.  

???

> The same  typography document goes on to explain the fifth
> argument:
> "The fifth argument to \definetypeface specifies specific font size
> setups (if any), these will be covered in section ?? in the next
> chapter."
> This is getting scary, but I'm hoping putting "[optical]" there will
> solve everything.
> 
I don't follow.

> 
>> Next step: defining a typeface with superior numbers for footnote references etc.:
> 
>> \starttypescript [serif] [garamondpremupper]
>> \definefontsynonym [GaramondPremUpper-Roman]   [name:agaramondproregular]  [features=mysup]
>> \stoptypescript
> 
>> \starttypescript [serif] [garamondpremupper]
>> \definefontsynonym [Serif]           [GaramondPremUpper-Roman]      [features=mysup]
>> \definefontsynonym [SerifItalic]     [Serif]
>> \definefontsynonym [SerifBold]       [Serif]
>> \definefontsynonym [SerifBoldItalic] [Serif]
>> \definefontsynonym [SerifCaps]       [Serif]
>> \stoptypescript
> 
> I think I follow you, up to the line:
> \definefontsynonym [SerifItalic]     [Serif].
> These last lines seem to say that if you're in bold or italic, that
> you should still use
> regular superior figures, but the font has its own bold and italic
> superiors.  I think
> that's true of all the weight/shape/design size variations in the set.
> 

It depends what you want to achieve. I map everything onto Serif because I do not want the superior numbers to be bold or italic, even in an italic environment. Of course, you can define something for all these variants.

>> \starttypescript [GaramondPremUpper]
>>  \definetypeface [GaramondPremUpper] [rm] [serif] [garamondpremupper] [default]
>> \stoptypescript
> 
> I'm confused about how [GaramondPremUpper] and [garamondpremupper]
> seem to be getting associated with [rm] and [serif] after they were
> already associated with
> [GaramondPrem] and [garamondprem].  I don't see how, when I now use \rm, the
> machine is going to know whether I mean garamondpremupper or garamondprem.
> The rest of the file seems straightforward.
> 
In ConTeXt, you are always within a certain bodyfont (the one defined with the \definetypeface command). A switch like \it or \rm will thus take the italic/roman from this bodyfont. Meaning: when you say \setubodyfont[GaramondPrem], it will use "normal" Garamond Premier, if you use \switchtobodyfont[GaramondPremUpper], it will use the superior numbers variant.

>> OK so far?
> 
> Thank you---that brought me a lot closer to understanding!
> after saving your example and running luatools --generate,
> I put the last lines in my test document and tried running
> Context on it in the usual way.  I get the error:
> !undefined control sequence
> <recently read>  \usetypescript
> l.12 \usetypescript
>                         [GaramondPrem]
> 
> 
Then we will need your example - this is not normal behavior.

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


  parent reply	other threads:[~2010-03-13 20:13 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13 16:09 simplefonts Michael Saunders
2010-03-13 16:36 ` simplefonts Wolfgang Schuster
2010-03-13 20:13 ` Thomas A. Schmitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-21  3:32 SimpleFonts hwitloc
2014-05-21  4:41 ` SimpleFonts Mikael P. Sundqvist
     [not found] <mailman.1.1382176801.27687.ntg-context@ntg.nl>
2013-10-19 12:21 ` Simplefonts John Kitzmiller
2013-10-19 18:20   ` Simplefonts Wolfgang Schuster
2013-10-10 18:02 Simplefonts Wolfgang Schuster
2013-10-12 13:04 ` Simplefonts Zhichu Chen
2013-10-12 17:39   ` Simplefonts Wolfgang Schuster
2013-10-13  9:56     ` Simplefonts Zhichu Chen
2013-10-13 11:12       ` Simplefonts Wolfgang Schuster
2013-10-18 16:18     ` Simplefonts Wolfgang Schuster
2013-10-14 15:17 ` Simplefonts Lars Huttar
2013-10-14 16:45   ` Simplefonts Hans Hagen
2013-10-14 16:38 ` Simplefonts Prashanth
2013-10-14 17:38   ` Simplefonts Wolfgang Schuster
2013-10-15  8:02     ` Simplefonts Otared Kavian
2013-10-15  8:26       ` Simplefonts Hans Hagen
2013-10-15  8:41         ` Simplefonts Mikael P. Sundqvist
2013-10-15  9:12           ` Simplefonts Hans Hagen
2013-10-15 19:12             ` Simplefonts Marcin Borkowski
2013-10-15 19:17               ` Simplefonts Wolfgang Schuster
2013-10-15 20:00                 ` Simplefonts Marcin Borkowski
2013-10-15 20:58               ` Simplefonts Hans Hagen
2013-10-15  9:26           ` Simplefonts Hans Hagen
2013-10-15  9:57             ` Simplefonts Hans Hagen
2013-10-15 11:42         ` Simplefonts Keith J. Schultz
2013-10-15 17:08           ` Simplefonts Wolfgang Schuster
2013-10-16  7:47             ` Simplefonts Keith J. Schultz
2013-10-15 17:41         ` Simplefonts Otared Kavian
2013-10-15 12:18     ` Simplefonts Prashanth
2011-03-11 12:28 Simplefonts Charles Doherty
2011-03-11 18:30 ` Simplefonts Wolfgang Schuster
2011-03-14 11:55   ` Simplefonts Charles Doherty
2011-02-21 16:38 Simplefonts Charles Doherty
2010-11-13 18:25 simplefonts Herbert Voss
2010-11-13 18:32 ` simplefonts Aditya Mahajan
2010-11-13 18:37   ` simplefonts Herbert Voss
2010-11-13 18:47     ` simplefonts Khaled Hosny
2010-11-13 18:44 ` simplefonts Wolfgang Schuster
2010-11-13 19:16   ` simplefonts Herbert Voss
2010-03-15  2:48 simplefonts Michael Saunders
2010-03-14 13:12 simplefonts Michael Saunders
2010-03-14 13:54 ` simplefonts Henning Hraban Ramm
2010-03-14 13:59 ` simplefonts Hans Hagen
2010-03-12 19:11 simplefonts Michael Saunders
2010-03-12 19:24 ` simplefonts Aditya Mahajan
2010-03-12 19:32 ` simplefonts Hans Hagen
2010-03-12 20:11 ` simplefonts Thomas A. Schmitz
2010-03-12 20:17   ` simplefonts Wolfgang Schuster
2010-03-12 20:31   ` simplefonts Andreas Harder
2010-03-12 20:38   ` simplefonts Wolfgang Schuster
2010-03-12 22:29     ` simplefonts Hans Hagen
2010-03-13  5:35       ` simplefonts Wolfgang Schuster
2010-03-13  6:19         ` simplefonts Khaled Hosny
2010-03-13 12:16           ` simplefonts Hans Hagen
2010-03-13 12:26             ` simplefonts Wolfgang Schuster
2010-03-13 12:35               ` simplefonts Hans Hagen
2010-03-13 13:27               ` simplefonts Andreas Harder
2010-03-13 16:17                 ` simplefonts Wolfgang Schuster
2010-03-13 16:59                   ` simplefonts Andreas Harder
2010-03-13 17:29                     ` simplefonts Wolfgang Schuster
2010-03-12 10:05 simplefonts Michael Saunders
2010-03-12 12:45 ` simplefonts Wolfgang Schuster
2010-03-12  4:50 simplefonts Michael Saunders
2010-03-12  5:36 ` simplefonts Wolfgang Schuster
     [not found] <mailman.580.1258822015.22155.ntg-context@ntg.nl>
2009-11-21 21:33 ` simplefonts Vyatcheslav Yatskovsky
2009-11-22 12:24   ` simplefonts Wolfgang Schuster
2009-11-22 13:10     ` simplefonts Alan BRASLAU
2009-11-22 13:13       ` simplefonts Wolfgang Schuster
2009-11-22 13:16       ` simplefonts Alan BRASLAU
2009-09-14 11:06 simplefonts 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=C81B9D13-4FA8-47C3-933B-17275C286491@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).