ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: mf <massifr@fastwebnet.it>
To: Wolfgang Schuster <schuster.wolfgang@gmail.com>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Garamond Premier Pro font goodies file
Date: Tue, 03 May 2016 23:00:26 +0200	[thread overview]
Message-ID: <1462309226.3609.21.camel@fastwebnet.it> (raw)
In-Reply-To: <57279D1F.9010600@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]

Thank you Wolfgang,
now it works partially (see the first attachment): it uses different
optical sizes, but not always the right ones.

\definefontfamily [default] [rm] [GaramondPremierPro] [opticalsize=yes]
\setupbodyfont[default,12pt]
\starttext
\dostepwiserecurse {6} {22} {2} 
  {\switchtobodyfont[#1pt]
   \purefontname\font: \input ward
   \blank}
\stoptext

My garamondpremierpro.lfg is a modified version of ebgaramond.lfg.
While I was waiting for an answer to my mail, I made a modified version
of type-imp-ebgaramond.mkiv: type-imp-garamondpremierpro.mkiv (second
attachment).
Then I tried this:

\input type-imp-garamondpremierpro.mkiv
\setupbodyfont[GaramondPremierPro,12pt]
\starttext
\dostepwiserecurse {6} {22} {2} 
  {\switchtobodyfont[#1pt]
   \purefontname\font: \input ward
   \blank}
\stoptext

This works as expected (see third attachment): "GaramondPremierPro-
Capt" under 8.5pt, then "GaramondPremierPro" until 13pt, then
"GaramondPremierPro-Subh" until 21.5pt, then "GaramondPremierPro-Disp".

How can I make it work with \definefontfamily?
I prefer its simpler syntax to typescripts like "type-imp-
garamondpremierpro.mkiv".
I tried this:

\definefontfamily [default] [rm] [GaramondPremierPro]
[opticalsize=yes,goodies=GaramondPremierPro]
\setupbodyfont[default,12pt]
\starttext
\dostepwiserecurse {6} {22} {2} 
  {\switchtobodyfont[#1pt]
   \purefontname\font: \input ward
   \blank}
\stoptext

but it does not work as expected.
The file garamondpremierpro.lfg gets loaded, but its contents are
ignored when choosing the right optical size.

How can I tell ConTeXt to use the optical sizes defined in my goodies
file with \definefontfamily and without using type-imp-
garamondpremierpro.mkiv typescripts?

[-- Attachment #2: Type: application/pdf, Size: 31938 bytes --]

[-- Attachment #3: type-imp-garamondpremierpro.mkiv --]
[-- Type: text/x-matlab, Size: 1887 bytes --]

%D \module
%D   [       file=type-imp-ebgaramond,
%D        version=2016.05.02,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Garamond Premier Pro,
%D         author=MF,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\definefontfeature
  [garamond-premier-pro-normal]
  [default]
  [onum=yes,liga=yes]
%  [mode=node,ccmp=yes,calt=yes,
%   liga=yes,dlig=yes,hlig=yes,
%   kern=yes,mark=yes,mkmk=yes,
%   onum=yes,pnum=yes,salt=yes,
%   script=latn]

\definefontfeature
  [garamond-premier-pro-smallcaps]
  [garamond-premier-pro-normal]
  [smcp=yes,c2sc=yes]

\starttypescriptcollection[GaramondPremierPro]

    \starttypescript [serif] [GaramondPremierPro]
        \loadfontgoodies[garamondpremierpro]
        \setups[font:fallback:serif]
        \definefontsynonym [Serif]       [file:GaramondPremierPro-Regular] [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifItalic] [file:GaramondPremierPro-Italic]  [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifBold]   [file:GaramondPremierPro-Bold]    [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifBoldItalic][file:GaramondPremierPro-BoldItalic][features=garamond-premier-pro-normal]
        \definefontsynonym [SerifCaps]   [Serif]                   [features=garamond-premier-pro-smallcaps]
    \stoptypescript

    \starttypescript[GaramondPremierPro]
        \definetypeface [GaramondPremierPro] [rm] [serif] [GaramondPremierPro] [default] [designsize=auto]
        \definetypeface [GaramondPremierPro] [tt] [mono]  [dejavu]     [default]
        \definetypeface [GaramondPremierPro] [mm] [math]  [bonum]      [default]
    \stoptypescript

\stoptypescriptcollection

[-- Attachment #4: Type: application/pdf, Size: 39774 bytes --]

[-- Attachment #5: 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:[~2016-05-03 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28  8:58 massifr
2016-05-02 18:31 ` Wolfgang Schuster
2016-05-03 21:00   ` mf [this message]

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=1462309226.3609.21.camel@fastwebnet.it \
    --to=massifr@fastwebnet.it \
    --cc=ntg-context@ntg.nl \
    --cc=schuster.wolfgang@gmail.com \
    /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).