ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Martin Althoff <martin.althoff@yahoo.com>
To: ntg-context@ntg.nl
Subject: Setting up protrusion, side-effects
Date: Tue, 27 Jul 2010 17:31:10 -0700 (PDT)	[thread overview]
Message-ID: <3382.79595.qm@web56308.mail.re3.yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

When setting up protrusion, I noticed it "disappearing" despite being defined/setup. In a text, when I changed the font from Palatino to Sabon (with \setupbodyfont[sabon]), protrusion stopped working. Changing back to palatino, with nothing else changed, protrusion appeared again. 

Note: getting the latest minimals update did not change anything: context: version: 2010.07.27 16:30, LuaTeX, Version beta-0.60.2-2010070117 on OSX 10.6.4

The following test file showed that if the \setupbodyfont takes place before \definefontfeature and \setupalign, protrusion fails completely. In the example 1 below it fails. Disabling the top \setupbodyfont and enabling the bottom \setupbodyfont gets it to work. However, it will fail for both Palatino and Sabon! I could not create an example for one font working and the other not.

Is the order of declaration important? That would be unusual in context by what I have seen so far. Am I missing something?

Example 1:

\setupbodyfont[palatino]

% protusion Einstellungen
\definefontfeature [default][default][protrusion=quality,expansion=quality]
\setupalign[hz,hanging]

%\setupbodyfont[palatino]

\showframe

\starttext
\input tufte
\stoptext


Possibly related is the following. Executing \showbodyfont for palatino with protrusion enabled messes up the text following it. The same done with Sabon is no problem. The Example 2 below illustrates the problem. I have attached the PDF to show the output.

While this obviously not a real problem, as the \showbodyfont won't be in a final output, it might hint at an underlying problem, possibly related to the above problem.

Example 2:

% Set up protusion
\definefontfeature [default][default][protrusion=quality,expansion=quality]
\setupalign[hz,hanging]
\setupbodyfont[palatino,12pt]

\showframe

\starttext

\showbodyfont
\input tufte

\switchtobodyfont[sabon,12pt]
\showbodyfont
\input tufte

\stoptext


[-- Attachment #2: font-messed.pdf --]
[-- Type: video/x-flv, Size: 50995 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 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
___________________________________________________________________________________

             reply	other threads:[~2010-07-28  0:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28  0:31 Martin Althoff [this message]
2010-07-28  7:35 ` Wolfgang Schuster
2010-07-28  9:20   ` Martin Althoff
2010-07-29 10:12 Martin Althoff
2010-07-29 18:48 ` Hans Hagen
2010-07-31  6:17   ` Martin Althoff
2010-07-31  9:48     ` Hans Hagen
2010-07-31 12:50       ` Martin Althoff

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=3382.79595.qm@web56308.mail.re3.yahoo.com \
    --to=martin.althoff@yahoo.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).