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
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
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
participants (2)
-
Martin Althoff
-
Wolfgang Schuster