[NTG-context] Garamond Premier Pro font goodies file

2016-04-28 Thread massifr
Hello list,
I'm using the Adobe Garamond Premier Pro font.
It has 4 optical sizes: Caption, Normal, Subhead, Display.
I tried to modify ebgaramond.lfg to adapt it to Garamond Premier Pro.
You find it as an attachment.

I don't know how to use that goodies file to see the different optical sizes
in a document. I've tried this:

\loadfontgoodies[GaramondPremierPro]

\definefontfamily [default] [rm] [tf=name:GaramondPremierPro-Regular,
  it=name:GaramondPremierPro-Italic]

\setupbodyfont[default,12pt]

\dostepwiserecurse {6} {22} {1} {
  \definebodyfontenvironment[default][#1pt][text=#1pt,em=italic]
}

\starttext

\dostepwiserecurse {6} {22} {1} {
\switchtobodyfont[#1pt]
\purefontname\font: \input tufte
\blank
}

\stoptext

but it does not work. Any help?
Thanks in advance, Massi

To Hans: if you find it useful for Context, you can add and/or modify it
to the distribution. You can also change the author to yourself.return {
name = "GaramondPremierPro",
version = "1.00",
comment = "Goodies that complement Garamond Premier Pro.",
author = "MF",
copyright = "ConTeXt development team",
designsizes = {
["GaramondPremierPro-Regular"] = {
["6pt"]   = "file:GaramondPremrPro-Capt",
["7pt"]   = "file:GaramondPremrPro-Capt",
["8pt"]   = "file:GaramondPremrPro-Capt",
["8.5pt"] = "file:GaramondPremrPro",
["9pt"]   = "file:GaramondPremrPro",
["9.5pt"] = "file:GaramondPremrPro",
["10pt"]  = "file:GaramondPremrPro",
["11pt"]  = "file:GaramondPremrPro",
["12pt"]  = "file:GaramondPremrPro",
["12pt"]  = "file:GaramondPremrPro",
["14pt"]  = "file:GaramondPremrPro-Subh",
["21pt"]  = "file:GaramondPremrPro-Subh",
["22pt"]  = "file:GaramondPremrPro-Disp",
default   = "file:GaramondPremrPro",
},
["GaramondPremierPro-Italic"] = {
["6pt"]   = "file:GaramondPremrPro-ItCapt",
["7pt"]   = "file:GaramondPremrPro-ItCapt",
["8pt"]   = "file:GaramondPremrPro-ItCapt",
["8.5pt"] = "file:GaramondPremrPro-It",
["9pt"]   = "file:GaramondPremrPro-It",
["9.5pt"] = "file:GaramondPremrPro-It",
["10pt"]  = "file:GaramondPremrPro-It",
["11pt"]  = "file:GaramondPremrPro-It",
["12pt"]  = "file:GaramondPremrPro-It",
["12pt"]  = "file:GaramondPremrPro-It",
["14pt"]  = "file:GaramondPremrPro-ItSubh",
["21pt"]  = "file:GaramondPremrPro-ItSubh",
["22pt"]  = "file:GaramondPremrPro-ItDisp",
default   = "file:GaramondPremrPro-It",
},
["GaramondPremierPro-Bold"] = {
["6pt"]   = "file:GaramondPremrPro-BdCapt",
["7pt"]   = "file:GaramondPremrPro-BdCapt",
["8pt"]   = "file:GaramondPremrPro-BdCapt",
["8.5pt"] = "file:GaramondPremrPro-Bd",
["9pt"]   = "file:GaramondPremrPro-Bd",
["9.5pt"] = "file:GaramondPremrPro-Bd",
["10pt"]  = "file:GaramondPremrPro-Bd",
["11pt"]  = "file:GaramondPremrPro-Bd",
["12pt"]  = "file:GaramondPremrPro-Bd",
["12pt"]  = "file:GaramondPremrPro-Bd",
["14pt"]  = "file:GaramondPremrPro-BdSubh",
["21pt"]  = "file:GaramondPremrPro-BdSubh",
["22pt"]  = "file:GaramondPremrPro-BdDisp",
default   = "file:GaramondPremrPro-Bd",
},
["GaramondPremierPro-BoldItalic"] = {
["6pt"]   = "file:GaramondPremrPro-BdItCapt",
["7pt"]   = "file:GaramondPremrPro-BdItCapt",
["8pt"]   = "file:GaramondPremrPro-BdItCapt",
["8.5pt"] = "file:GaramondPremrPro-BdIt",
["9pt"]   = "file:GaramondPremrPro-BdIt",
["9.5pt"] = "file:GaramondPremrPro-BdIt",
["10pt"]  = "file:GaramondPremrPro-BdIt",
["11pt"]  = "file:GaramondPremrPro-BdIt",
["12pt"]  = "file:GaramondPremrPro-BdIt",
["12pt"]  = "file:GaramondPremrPro-BdIt",
["14pt"]  = "file:GaramondPremrPro-BdItSubh",
["21pt"]  = "file:GaramondPremrPro-BdItSubh",
["22pt"]  = "file:GaramondPremrPro-BdItDisp",
default   = "file:GaramondPremrPro-BdIt",
},
["GaramondPremierPro-Medium"] = {
["6pt"]   = "file:GaramondPremrPro-MedCapt",
["7pt"]   = "file:GaramondPremrPro-MedCapt",
["8pt"]   = "file:GaramondPremrPro-MedCapt",
["8.5pt"] = "file:GaramondPremrPro-Med",
["9pt"]   = "file:GaramondPremrPro-Med",
["9.5pt"] = "file:GaramondPremrPro-Med",
["10pt"]  = "file:GaramondPremrPro-Med",
["11pt"]  = "file:GaramondPremrPro-Med",
["12pt"]  = "file:GaramondPremrPro-Med",
["12pt"]  = "file:GaramondPremrPro-Med",

Re: [NTG-context] Garamond Premier Pro font goodies file

2016-05-02 Thread Wolfgang Schuster

mass...@fastwebnet.it 
28. April 2016 um 10:58
Hello list,
I'm using the Adobe Garamond Premier Pro font.
It has 4 optical sizes: Caption, Normal, Subhead, Display.
I tried to modify ebgaramond.lfg to adapt it to Garamond Premier Pro.
You find it as an attachment.

I don't know how to use that goodies file to see the different optical 
sizes

in a document. I've tried this:

\loadfontgoodies[GaramondPremierPro]

\definefontfamily [default] [rm] [tf=name:GaramondPremierPro-Regular,
it=name:GaramondPremierPro-Italic]

\setupbodyfont[default,12pt]

\dostepwiserecurse {6} {22} {1} {
\definebodyfontenvironment[default][#1pt][text=#1pt,em=italic]
}

\starttext

\dostepwiserecurse {6} {22} {1} {
\switchtobodyfont[#1pt]
\purefontname\font: \input tufte
\blank
}

\stoptext

but it does not work. Any help?

%\definefontfamily [default] [rm] [GaramondPremierPro] [opticalsize=yes]
\definefontfamily [default] [rm] [Latin Modern Roman] [opticalsize=yes]

\setupbodyfont[default,12pt]

\starttext

\dostepwiserecurse {6} {22} {1}
  {\switchtobodyfont[#1pt]
   \purefontname\font: \input ward
   \blank}

\stoptext

Wolfgang
___
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
___

Re: [NTG-context] Garamond Premier Pro font goodies file

2016-05-03 Thread mf
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?

garamond-optical-sizes-ws.pdf
Description: Adobe PDF document
%D \module
%D   [   file=type-imp-ebgaramond,
%Dversion=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


garamond-optical-sizes-mf.pdf
Description: Adobe PDF document
___
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
___