ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Setting up protrusion, side-effects
@ 2010-07-29 10:12 Martin Althoff
  2010-07-29 18:48 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Althoff @ 2010-07-29 10:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I hate to pick up on this again, but... 

The basic Palatino, together with protrusion and small caps is causing issues. Essentially horizontal placing of the characters fails (see previous PDF).

In the example below, I can reliably cause the effect by commenting out (or not) the line with the \sc. 

This effect shows up the my "real" files. While trying to find the trigger by culling down the files, for a moment I could reliably (!) turn the effect on and off with the line %\setupfootertexts[chapter][pagenumber] and not changing the \sc lines. Weird side effect? Sorry, I can't reproduce that one anymore.

One way to reduce, but not prevent the effect, is if more plain text is output before using \sc. eg by adding an \input tufte beforehand. But once the text after the \sc is a bit longer ie. 10x tufte the effect will show again. Gut feeling: successive and cumulative rounding errors.

Question: Am I tripping over "side effects"? Is using SmallCaps a bad idea when using protrusion? It just feels odd that something like this would be so uncontrollable. Particularly since the palatino font is from the TexGyre set (so close to home)

Thanks for thoughts! Martin


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

%\setupfooter[text][before=\hairline,leftwidth=.85\textwidth,style=\tfx]
%\setupfootertexts[chapter][pagenumber]


%\usetypescript[palatino]
\setupbodyfont[palatino,12pt]

\starttext
%\input tufte
{\sc Erster Teil}

\input tufte
\stoptext

> Fonts are sometimes special and when ypu load a font it's
> setting (e.g. ligatures, protrusion etc.) are frozen. To change the
> settings you need \definefontfeature before \setupbodyfont, 
> 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] 8+ messages in thread
* Setting up protrusion, side-effects
@ 2010-07-28  0:31 Martin Althoff
  2010-07-28  7:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Althoff @ 2010-07-28  0:31 UTC (permalink / raw)
  To: ntg-context

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

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

end of thread, other threads:[~2010-07-31 12:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-29 10:12 Setting up protrusion, side-effects 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
  -- strict thread matches above, loose matches on Subject: below --
2010-07-28  0:31 Martin Althoff
2010-07-28  7:35 ` Wolfgang Schuster
2010-07-28  9:20   ` Martin Althoff

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