[NTG-context] adjusting sans to serif; weird solution

massifr at fastwebnet.it massifr at fastwebnet.it
Wed Nov 4 12:17:47 CET 2015


Hello list,
I'm using Garamond Premier Pro and Myriad Pro as serif and sans fonts.
I need to adjust their relative size so that Garamond 11pt looks like having
the same weight of Myriad Pro 11pt.

I found a good tradeoff reducing Myriad by a 0.85 factor.

To achieve that I've used "sa" (scaled at) in \definebodyfont
and "rscale" in \definetypeface (see the code below).

The weird thing is that body font size 11pt is sensible only to "rscale",
while body font sizes 15pt and 8.5pt are sensible only to "sa".
I suspect there's something I did not understand in ConTeXt fonts.

In the attachment you can see the four variations:
font-adjust-none: no adjustment, Myriad looks slightly bigger at 11, 15 and 8.5pt
font-adjust-only-rscale: only "rscale" adjustment, serif and sans look balanced at 11pt,  but not at 15 and 8.5pt
font-adjust-only-sa: only "sa" adjustment, serif and sans look balanced at 15 and 8.5pt, but not at 11pt
font-adjust-sa-rscale: serif and sans always look balanced

With sa AND rscale everything is ok, but WHY? What am I missing?

Another question: I expect ConTeXt to use GaramondCaption instead of 
Garamond at 8.5pt, but this does not happen. Why?

Here's the working code:

\starttypescript [serif] [mio]
  \definefontsynonym [Serif]             [name:GaramondPremrPro-Med]
  \definefontsynonym [SerifBold]         [name:GaramondPremrPro-Bd]
  \definefontsynonym [SerifItalic]       [name:GaramondPremrPro-MedIt]
  \definefontsynonym [SerifSlanted]      [name:GaramondPremrPro-MedIt]
  \definefontsynonym [SerifBoldItalic]   [name:GaramondPremrPro-BdIt]
  \definefontsynonym [SerifBoldSlanted]  [name:GaramondPremrPro-BdIt]
  \definefontsynonym [SerifCaps]         [name:GaramondPremrPro,smcp]
  \definefontsynonym [SerifCaption]      [name:GaramondPremrPro-MedCapt]
  \definefontsynonym [SerifCaptionItalic][name:GaramondPremrPro-MedItCapt]
  \definefontsynonym [SerifCaptionBold]  [name:GaramondPremrPro-BdCapt]
  \definefontsynonym [SerifCaptionBoldItalic][name:GaramondPremrPro-BdItCapt]

  \definebodyfont
   [15pt,11pt,10pt]
   [rm]
   [tf=Serif sa 1,
    it=SerifItalic sa 1,
    bf=SerifBold sa 1,
    bi=SerifBoldItalic sa 1]
  \definebodyfont
   [8.5pt]
   [rm]
   [tf=SerifCaption sa 1,
    it=SerifCaptionItalic sa 1,
    bf=SerifCaptionBold sa 1,
    bi=SerifCaptionBoldItalic sa 1]
\stoptypescript

\starttypescript [sans] [mio]
  \definefontsynonym [Sans]             [name:MyriadPro-Regular]
  \definefontsynonym [SansBold]         [name:MyriadPro-Bold]
  \definefontsynonym [SansItalic]       [name:MyriadPro-It]
  \definefontsynonym [SansSlanted]      [name:MyriadPro-It]
  \definefontsynonym [SansBoldItalic]   [name:MyriadPro-BoldIt]
  \definefontsynonym [SansBoldSlanted]  [name:MyriadPro-BoldIt]
  \definefontsynonym [SansCaps]         [name:MyriadPro-Regular]
  \definebodyfont
   [15pt,11pt,10pt,8.5pt]
   [ss]
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % "sa" ADJUSTMENT: WORKS ONLY FOR 15pt AND 8.5pt
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   [tf=Sans sa 0.85,
    it=SansItalic sa 0.85,
    bf=SansBold sa 0.85,
    bi=SansBoldItalic sa 0.85,
    sl=SansSlanted sa 0.85,
    sc=SansCaps sa 0.85]
\stoptypescript

\definetypeface [mio]  [rm]  [serif] [mio] [default]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "rscale" ADJUSTMENT: WORKS ONLY FOR 11pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definetypeface [mio]  [ss]  [sans] [mio] [default][rscale=0.85]

\definebodyfontenvironment[mio][15pt][text=15pt, interlinespace=15pt]
\definebodyfontenvironment[mio][11pt][text=11pt, interlinespace=12pt]
\definebodyfontenvironment[mio][8.5pt][text=8.5pt, interlinespace=9.5pt]

\setupbodyfont[mio,rm,11pt]

\starttext
  \switchtobodyfont[mio,11pt]
  \rm 11pt: Serif text and \ss sans serif text.\par
  
  \blank
  
  \switchtobodyfont[mio,15pt]
  \rm 15pt: Serif text and \ss sans serif text.\par

  \blank
  
  \switchtobodyfont[mio,8.5pt]
  \rm 8.5pt: Serif text and \ss sans serif text.\par
\stoptext
-------------- next part --------------
A non-text attachment was scrubbed...
Name: font-adjust.zip
Type: application/zip
Size: 35055 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20151104/20c26385/attachment-0001.zip>


More information about the ntg-context mailing list