ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 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

* Re: Setting up protrusion, side-effects
  2010-07-28  0:31 Setting up protrusion, side-effects Martin Althoff
@ 2010-07-28  7:35 ` Wolfgang Schuster
  2010-07-28  9:20   ` Martin Althoff
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2010-07-28  7:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

  Am 28.07.10 02:31, schrieb Martin Althoff:
> 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?

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, of yourse there is
\addff to change a certain setting but this is only meant for local
changes and not for global range.

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

* Re: Setting up protrusion, side-effects
  2010-07-28  7:35 ` Wolfgang Schuster
@ 2010-07-28  9:20   ` Martin Althoff
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Althoff @ 2010-07-28  9:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

OK, got it. Makes sense! 

Could this also be extended to \switchtobodyfont, in case I am using more then one font. Any \definefontfeature statements would have to be done before switching to any new font?

In regard to the use of \showbodyfont in combination with protusion (the second mentioned problem) messing up palatino (ie. TexGyre Pagella), does that mean \setupbodyfont is doing some "background work" causing the layout following it to fail when protrusion is applied?

Thanks again, Martin



___________________________________________________________________________________
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

* Re: Setting up protrusion, side-effects
  2010-07-31  9:48     ` Hans Hagen
@ 2010-07-31 12:50       ` Martin Althoff
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Althoff @ 2010-07-31 12:50 UTC (permalink / raw)
  To: ntg-context


> It has to do with the backend resolving fontnames and
> expansions factors 
> and so ... first I need to hear from Hartmut what he thinks
> of it.


No stress :) I'll wait silently -- just wanted to submit, what I thought to be, useful info.

cheers, Martin



___________________________________________________________________________________
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

* Re: Setting up protrusion, side-effects
  2010-07-31  6:17   ` Martin Althoff
@ 2010-07-31  9:48     ` Hans Hagen
  2010-07-31 12:50       ` Martin Althoff
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-07-31  9:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 31-7-2010 8:17, Martin Althoff wrote:
>> Could as well be a luatex backend problem so I have to
>> discuss it with Taco and Hartmut.
>>
>> Hans
>>
>
> Hi Hans,
>
> Thanks for  looking into this further. I have tried to drill down the effect being switchable through \setupfootertexts here are my results.
>
> In the example below, I get (with the stress about the latest update, I refrained, running: LuaTeX, Version beta-0.60.2-2010070117; ConTeXt  ver: 2010.07.27 16:30) I can switch/influence the horizontal collapse by (this is not a series of steps, each statement assumes starting with the example as given):
>
> -- as given, the lines collapse.
>
> -- en-/disabling \sc makes problem switchable
>
> -- en-/disabling \setupfootertexts, problem switchable, however, once \setuppagenumbering is commented out, this does not work anymore. The error stays permanently.
>
> -- enabling "\input tufte" in front of the \sc line causes the problem to appear permanently now.
>
> -- adding more tuftes before or after shifts the problem either way. But now the permutation of cases gets a bit much...

It has to do with the backend resolving fontnames and expansions factors 
and so ... first I need to hear from Hartmut what he thinks of it.

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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

* Re: Setting up protrusion, side-effects
  2010-07-29 18:48 ` Hans Hagen
@ 2010-07-31  6:17   ` Martin Althoff
  2010-07-31  9:48     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Althoff @ 2010-07-31  6:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> Could as well be a luatex backend problem so I have to
> discuss it with Taco and Hartmut.
> 
> Hans
> 

Hi Hans,

Thanks for  looking into this further. I have tried to drill down the effect being switchable through \setupfootertexts here are my results.

In the example below, I get (with the stress about the latest update, I refrained, running: LuaTeX, Version beta-0.60.2-2010070117; ConTeXt  ver: 2010.07.27 16:30) I can switch/influence the horizontal collapse by (this is not a series of steps, each statement assumes starting with the example as given):

-- as given, the lines collapse.

-- en-/disabling \sc makes problem switchable

-- en-/disabling \setupfootertexts, problem switchable, however, once \setuppagenumbering is commented out, this does not work anymore. The error stays permanently.

-- enabling "\input tufte" in front of the \sc line causes the problem to appear permanently now. 

-- adding more tuftes before or after shifts the problem either way. But now the permutation of cases gets a bit much...





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


\setupfootertexts[chapter][pagenumber]
\setuppagenumbering [location=] 


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

\starttext

%\input tufte
%\dorecurse {5}{\input tufte}

{\sc Die Exposition der Frage}

Notwendigkeit, Struktur und Vorrang der Frage

\section {Wiederholung der Frage}

\dorecurse {5}{\input tufte}

\stoptext




___________________________________________________________________________________
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

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

On 29-7-2010 12:12, Martin Althoff wrote:
> 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.

Could as well be a luatex backend problem so I have to discuss it with 
Taco and Hartmut.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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

* 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

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-28  0:31 Setting up protrusion, side-effects Martin Althoff
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

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