On Fri, Nov 21, 2008 at 5:14 AM, Bart C. Wise wrote:
> The code below is used to load the Adobe Garmond fonts.  The problem is that
> quotes (``) produces two single quotes.  Similar with dashes: an en dash
> produces to dashes, an em dash likewise produces three dashes.  What am I
> doing wrong (again)!


If you are using pdfTeX, then it's the "fault" of your fonts. (The one
that prepared the metrics "forgot" to add the proper ligatures to the
font. This is not trivial to make.) But then - if you are using
pdfTeX, there should be no "name:" in font declaration. name: is more
or less reserved for filename of otf/ttf fonts in XeTeX and LuaTeX.

If you are using XeTeX or LuaTeX, then you should remove all the [ec]
brackets and replace [encoding=ec] with [features=default].

Some clarification is needed though:

1.) You could (in theory) use some replacements for `` and " to
produce proper quotation marks, but for Unicode-aware engines that's
highly deprecated. Better use \quotation{Here's a nicely looking
quote.} or proper quotation marks. The sequence `` was a pure hack (in
my opinion), but a sensible one in that time since there were no
quotation marks neither on keyboards nor in encodings when Knuth wrote
TeX. \quotation is a cleaner way to produce quotation marks. (I'm a
bit biased though. Knuthian quotation marks never worked for my
language, so I always had to figure out how to get the proper ones,
and \quotation was the proper solution for me.)

2.) in LuaTeX and XeTeX there are three replacements left by default:
endash, emdash and apostrophe. The main reason being that it's still a
bit too difficult to:
- find endash and emdash on keyboards
- see the difference between the two, esp. in fixed width fonts
- change the habit and type proper apostrophe instead of corresponding
ascii character: '

3.) For some reason, "features=default" doesn't work as it should
since "script=latn" has been left out some time ago, so you need to
fix definition of "default" font features. (Or maybe someone else
knows how to handle this in a better way. This is what I do. I do not
claim that it's the right way to do it.)


> \starttypescript[serif][agaramond][ec]
>  \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] [encoding=ec]
>  \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][encoding=ec]
>  \definefontsynonym[AGaramondBold]   [name:AGaramond-Bold] [encoding=ec]
>  \definefontsynonym[AGaramondBoldIt]   [name:AGaramond-BoldItalic]
> [encoding=ec]
> \stoptypescript
> \starttypescript[serif][agaramond][name]
>  \definefontsynonym  [Serif]           [AGaramondRegular]
>  \definefontsynonym  [SerifItalic]     [AGaramondItalic]
>  \definefontsynonym  [SerifBold]       [AGaramondBold]
>  \definefontsynonym  [SerifBoldItalic] [AGaramondBoldIt]
> \stoptypescript
> \starttypescript[agaramond][ec]
>  \definetypeface[agaramond][rm][serif][agaramond][default][encoding=ec]
> \stoptypescript
> \usetypescript[agaramond][ec]
> \setupbodyfont[agaramond, 12pt]
> \starttext
> ``Here's a lousy looking quote.''
> Here are a couple of dashes: --
> Here are three: ---
> \stoptext
> Thanks,
> Bart

If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net

Reply via email to