Hanging and Protrusion with Typescript
Hi there, normally I use simplefont, with protrusion and typescript. But Simplefont does not recognize the regular, italic, and bold of AdobeGaramondPro correctly by default. So I tried to work with a typescript definition, and it works - with the exception of hanging (and protrusion?). This is my example: +++++++++++++++++++++++ \enableregime[utf] \starttypescript [serif] [nimbus] \definefontsynonym [Serif] [file:AGaramondPro-Regular.otf] \definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf] \definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf] \definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf] \stoptypescript \definetypeface [nimbus] [rm] [serif] [nimbus] \definefontfeature [default] [default] [protrusion=quality,expansion=quality] \setupalign[hz,hanging] \setupbodyfont[nimbus,rm,12pt] \starttext \input tufte \stoptext +++++++++++++++++++++ The Font is correctly used by ConText, but no hanging is applied. How to achieve that? Thanks. Huseyin
On 4/9/2013 3:10 PM, "H. Özoguz" wrote:
Hi there,
normally I use simplefont, with protrusion and typescript. But Simplefont does not recognize the regular, italic, and bold of AdobeGaramondPro correctly by default. So I tried to work with a typescript definition, and it works - with the exception of hanging (and protrusion?). This is my example:
Best look into some type-imp files to see how typescript are defined.
+++++++++++++++++++++++ \enableregime[utf]
^^ not needed
\starttypescript [serif] [nimbus]
\definefontsynonym [Serif] [file:AGaramondPro-Regular.otf]
\definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf]
\definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf]
\definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf]
\stoptypescript
what features? maybe add *default or so ... depends on how general definitions are
\definetypeface [nimbus] [rm] [serif] [nimbus]
\definefontfeature
[default]
[default]
[protrusion=quality,expansion=quality]
should come before \definetypeface
\setupalign[hz,hanging]
\setupbodyfont[nimbus,rm,12pt]
\starttext
\input tufte
\stoptext +++++++++++++++++++++
The Font is correctly used by ConText, but no hanging is applied. How to achieve that?
Thanks.
Huseyin
___________________________________________________________________________________
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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Best look into some type-imp files to see how typescript are defined.
I looked in the wiki, and my minexample is from the wiki, too. What is a "type-imp"? So I changed the code into: +++++++++++++++ \starttypescript [serif] [nimbus] \definefontsynonym [Serif] [file:AGaramondPro-Regular.otf] \definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf] \definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf] \definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf] \stoptypescript \definefontfeature [default] [default] [protrusion=quality,expansion=quality] \setupalign[hz,hanging] \setupbodyfont[nimbus,rm,12pt] \definetypeface [nimbus] [rm] [serif] [nimbus] \starttext \input tufte \stoptext ++++++++++++++++++++ Hanging is now activated, but not with the defined font "AGaramondPro", but with Computer Modern, so now the typescript is not accepted. So changing the command orders does not help, at least not alone. Sorry, I did not understand, what you mean with "what features? maybe add *default or so ... depends on how general definitions are". Which "features" do you mean, and what is the question? I simply copied this from the wiki, and hoped that I could use AdobeGaramond now. It works, but not together with Hanging.
Am 09.04.2013 um 21:45 schrieb "H. Özoguz"
Best look into some type-imp files to see how typescript are defined.
I looked in the wiki, and my minexample is from the wiki, too. What is a "type-imp"?
Hans speaks of the type-imp-texgyre.mkiv, type-imp-latinmodern.mkiv etc. files
So I changed the code into: +++++++++++++++ \starttypescript [serif] [nimbus]
\definefontsynonym [Serif] [file:AGaramondPro-Regular.otf]
\definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf]
\definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf]
\definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf]
\stoptypescript
\definefontfeature
[default]
[default]
[protrusion=quality,expansion=quality]
\setupalign[hz,hanging]
\setupbodyfont[nimbus,rm,12pt]
\definetypeface [nimbus] [rm] [serif] [nimbus]
\starttext
\input tufte
\stoptext ++++++++++++++++++++
Hanging is now activated, but not with the defined font "AGaramondPro", but with Computer Modern, so now the typescript is not accepted. So changing the command orders does not help, at least not alone.
You tried to load your nimbus font before it was defined, move \definetypeface *before* \setupbodyfont to make it work.
Sorry, I did not understand, what you mean with "what features? maybe add *default or so ... depends on how general definitions are".
You need [features=default] either at the end of each \definefontsynonym command or at the end of \definetypeface.
Which "features" do you mean, and what is the question? I simply copied this from the wiki, and hoped that I could use AdobeGaramond now. It works, but not together with Hanging.
I corrected your example above: \starttypescript [serif] [nimbus] \definefontsynonym [Serif] [file:AGaramondPro-Regular.otf] \definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf] \definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf] \definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf] \stoptypescript \definefontfeature[default][default][protrusion=quality,expansion=quality] \definetypeface [nimbus] [rm] [serif] [nimbus] [features=default] \setupbodyfont[nimbus,rm,12pt] \setupalign[hz,hanging] \starttext \input tufte \stoptext Wolfgang
On Tue, Apr 09 2013, Wolfgang Schuster wrote:
\starttypescript [serif] [nimbus] \definefontsynonym [Serif] [file:AGaramondPro-Regular.otf] \definefontsynonym [SerifBold] [file:AGaramondPro-Bold.otf] \definefontsynonym [SerifItalic] [file:AGaramondPro-Italic.otf] \definefontsynonym [SerifBoldItalic] [file:AGaramondPro-BoldItalic.otf] \stoptypescript
\definefontfeature[default][default][protrusion=quality,expansion=quality]
\definetypeface [nimbus] [rm] [serif] [nimbus] [features=default]
\setupbodyfont[nimbus,rm,12pt]
\setupalign[hz,hanging]
\starttext \input tufte \stoptext
Or with the marvelous simplefonts module: \usemodule[simplefonts] \setmainfont[AGaramondPro][boldfont=AGaramondPro-Bold, italicfont=AGaramondPro-Italic, bolditalicfont=AGaramondPro-BoldItalic, protrusion=quality, expansion=quality] \setupalign[hz, hanging] \starttext \input tufte \stoptext ;) -- Peter
participants (4)
-
"H. Özoguz"
-
Hans Hagen
-
Peter Münster
-
Wolfgang Schuster