ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fonts in Mk IV -- \definefontalternative documentation?
@ 2011-11-11  4:05 Peter Park Nelson
  2011-11-11 10:13 ` Christian
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Park Nelson @ 2011-11-11  4:05 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2049 bytes --]

Hello, I am coming to ConTeXt from LaTeX and have a typescript question. I
was searching for information on the mailing list about defining semibold
and other font variants, and found the following. Can you tell me if
further information is only available in the book "context mkiv -- Fonts"
or can I find it somewhere else? I have searched through the revised Fonts
chapter of the ConTeXt manual but the \definefontalternative macro and the
approach described here are not documented there.

The approach below works for me if I adapt it to Adobe Garamond Premier
Pro, but I am attempting to build a typescript for that handles optical
weights, small caps, etc and I have not been able to make it work yet.

Before I try posting a minimal example, I would like to be sure that I am
looking at the right documentation. I have looked at the "Fonts in LuaTeX"
page on Contextgarden as well, but I don't think I have a full
understanding of typescripts using OSFONTDIR fonts yet. If there is
something I am missing please let me know.

Thanks,
PPN

**
Based on ideas from the forthcoming book "context mkiv -- Fonts":

% note: I have deleted all lines except the relevant ones for defining
% the semi bold alternatives

\definefontalternative [sb]
\definefontalternative [si]

\definebodyfont [default] [ss]
  [sb=SansSemiBold sa 1,
   si=SansSemiBoldItalic sa 1]

\starttypescript [sans] [myriadpro]
   \definefontsynonym [MyriadPro-SemiBold]  [name:myriadprosemibold]
   \definefontsynonym [MyriadPro-SemiBoldIt][name:myriadprosemiboldit]
\stoptypescript

\starttypescript [sans] [myriadpro]
   \definefontsynonym [SansSemiBold]         [MyriadPro-SemiBold]
[features=default]
   \definefontsynonym [SansSemiBoldItalic]   [MyriadPro-SemiBoldIt]
[features=default]
\stoptypescript

\starttypescript [myriadpro]
\definetypeface [myriadpro] [ss] [sans]     [myriadpro] [default]
\stoptypescript

\usetypescript[myriadpro]

\starttext

\switchtobodyfont[myriadpro,ss]

\sb Hello
\si Italic

\stoptext



-- 
Peter Park Nelson
peter.park.nelson@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 2249 bytes --]

[-- Attachment #2: 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fonts in Mk IV -- \definefontalternative documentation?
  2011-11-11  4:05 Fonts in Mk IV -- \definefontalternative documentation? Peter Park Nelson
@ 2011-11-11 10:13 ` Christian
  2011-11-11 13:37   ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Christian @ 2011-11-11 10:13 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Hello and welcome to the world of ConTeXt!

I was in you place about one year ago :)

The best way to get started with fonts is probably the simplefonts module. I haven't used anything since I started and was able to do everything I wished for, so far. 

Installation:
Run
first-setup.sh --modules="t-simplefonts"
if you use Context standalone (if not, refer to http://wiki.contextgarden.net/Modules for installation and download links).

Then this file should get you started:

%%% BEGIN
\usemodule[simplefonts]
\definefontfeature[default][default][mode=node,script=latn,kern=yes,palt=yes,tlig=yes,trep=yes,init=yes,size=yes] %some default features
\definefontfeature[frac][default][frac=yes] % opentype 'frac' feature for nice fractions
\definefontfeature[sups][default][sups=yes]
\definefontfeature[onum][default][onum=yes] % old-style figures
\definefontfeature[lnum][default][lnum=yes]
\setupsimplefonts[expansion=quality, protrusion=quality] % sort of microtype thing. makes things look better =)
\setmainfont[Myriad Pro] % set Myriad as main font
\definesimplefonttypeface[sb][Myriad Pro][regularfont=myriadprosemibold, italicfont=myriadprosemiboldit] % define a second font called 'sb' for semibold

\starttext

Test normal\\
{\sb Test semibold}\\
{\sb \it Test semibold}\\
{\bf Test bold}\\

Opentype font feature demonstration:\\
{\addff{onum} 1234} 1234\\
{\addff{frac} 1/17}
\stoptext
%%% END


> Hello, I am coming to ConTeXt from LaTeX and have a typescript question. I
> was searching for information on the mailing list about defining semibold and
> other font variants, and found the following. Can you tell me if further
> information is only available in the book "context mkiv -- Fonts" or can I find it
> somewhere else? I have searched through the revised Fonts chapter of the
> ConTeXt manual but the \definefontalternative macro and the approach
> described here are not documented there.
> 
> The approach below works for me if I adapt it to Adobe Garamond Premier
> Pro, but I am attempting to build a typescript for that handles optical weights,
> small caps, etc and I have not been able to make it work yet.
> 
> Before I try posting a minimal example, I would like to be sure that I am
> looking at the right documentation. I have looked at the "Fonts in LuaTeX"
> page on Contextgarden as well, but I don't think I have a full understanding
> of typescripts using OSFONTDIR fonts yet. If there is something I am missing
> please let me know.
> 
> Thanks,
> PPN
> 
> 
> 
> Based on ideas from the forthcoming book "context mkiv -- Fonts":
> 
> % note: I have deleted all lines except the relevant ones for defining
> % the semi bold alternatives
> 
> \definefontalternative [sb]
> \definefontalternative [si]
> 
> \definebodyfont [default] [ss]
>   [sb=SansSemiBold sa 1,
>    si=SansSemiBoldItalic sa 1]
> 
> \starttypescript [sans] [myriadpro]
>    \definefontsynonym [MyriadPro-SemiBold]  [name:myriadprosemibold]
>    \definefontsynonym [MyriadPro-SemiBoldIt][name:myriadprosemiboldit]
> \stoptypescript
> 
> \starttypescript [sans] [myriadpro]
>    \definefontsynonym [SansSemiBold]         [MyriadPro-SemiBold]
> [features=default]
>    \definefontsynonym [SansSemiBoldItalic]   [MyriadPro-SemiBoldIt]
> [features=default]
> \stoptypescript
> 
> \starttypescript [myriadpro]
> \definetypeface [myriadpro] [ss] [sans]     [myriadpro] [default]
> \stoptypescript
> 
> \usetypescript[myriadpro]
> 
> \starttext
> 
> \switchtobodyfont[myriadpro,ss]
> 
> \sb Hello
> \si Italic
> 
> \stoptext
> 
> 
> --
> Peter Park Nelson
> peter.park.nelson@gmail.com


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fonts in Mk IV -- \definefontalternative documentation?
  2011-11-11 10:13 ` Christian
@ 2011-11-11 13:37   ` Wolfgang Schuster
  2011-11-11 14:09     ` Christian
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2011-11-11 13:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 11.11.2011 um 11:13 schrieb Christian:

> Hello and welcome to the world of ConTeXt!
> 
> I was in you place about one year ago :)
> 
> The best way to get started with fonts is probably the simplefonts module. I haven't used anything since I started and was able to do everything I wished for, so far. 

Peter wants to use a font with optical sizes and this isn’t yet supported by the simplefonts module.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fonts in Mk IV -- \definefontalternative documentation?
  2011-11-11 13:37   ` Wolfgang Schuster
@ 2011-11-11 14:09     ` Christian
  0 siblings, 0 replies; 4+ messages in thread
From: Christian @ 2011-11-11 14:09 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

> > Hello and welcome to the world of ConTeXt!
> >
> > I was in you place about one year ago :)
> >
> > The best way to get started with fonts is probably the simplefonts module.
> I haven't used anything since I started and was able to do everything I wished
> for, so far.
> 
> Peter wants to use a font with optical sizes and this isn’t yet supported by
> the simplefonts module.
> 
> Wolfgang

Huh, he wrote it works for GaramondPremPro and in his code he's using MyriadPro -- which, to my knowledge, does not come in optical sizes.

I thought he is struggling with the remaining weights besides regular and bold (light, semibold, black) for Myriad, so I posted a simplefonts solution to that.
Can't help with typescripts, though. 

Regards,
Chrisitan

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-11 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11  4:05 Fonts in Mk IV -- \definefontalternative documentation? Peter Park Nelson
2011-11-11 10:13 ` Christian
2011-11-11 13:37   ` Wolfgang Schuster
2011-11-11 14:09     ` Christian

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).