ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: XeTeX, Adobe Garmond & dash, quotes, etc.
Date: Fri, 21 Nov 2008 05:44:05 +0100	[thread overview]
Message-ID: <6faad9f00811202044x4025f5d3qdc88ef9abacffae0@mail.gmail.com> (raw)
In-Reply-To: <200811202114.58311.bntgcontext@wiseguysweb.com>

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

Hello,

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

\definefontfeature
  [default]
  [liga=yes,kern=yes,tlig=yes,script=latn]

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

Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-11-21  4:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21  4:14 Bart C. Wise
2008-11-21  4:44 ` Mojca Miklavec [this message]
2008-11-21  5:40   ` Bart C. Wise
2008-11-21 16:01     ` Mojca Miklavec
2008-11-21 16:47       ` Bart C. Wise
2008-11-21 17:00         ` Mojca Miklavec
2008-11-21 17:25           ` Bart C. Wise
2008-11-21 18:11             ` Wolfgang Schuster
2008-11-21 18:30               ` Bart C. Wise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00811202044x4025f5d3qdc88ef9abacffae0@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).