* (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
@ 2020-03-15 19:32 Pablo Rodriguez
2020-03-15 21:56 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2020-03-15 19:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Hans,
here you have the sample:
\setuppapersize[A6]
\setupinteraction[state=start]
\enabledirectives[references.border]
\setupbodyfont[pagella]
\starttext
\placelist[section]
[alternative=d,
style=\it]
\section{Section 1}
\section{\dorecurse{25}{Section }3}
\section{Section 3}
\stoptext
For some strange reason (at least, to me), \placelist[alternative=d]
seems to misbehave when using \it or \bi as style.
Everthing is fine when italic fonts aren’t used.
I’m afraid I may be hitting a bug in both latest MkXL from 2020.03.10
14:52 and MkIV from 2019.07.24 11:31.
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-15 19:32 (bug?) wrong interline in \placelist[alternative=d] with Pagella italics Pablo Rodriguez
@ 2020-03-15 21:56 ` Wolfgang Schuster
2020-03-16 9:01 ` Pablo Rodriguez
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-03-15 21:56 UTC (permalink / raw)
To: mailing list for ConTeXt users, Pablo Rodriguez
Pablo Rodriguez schrieb am 15.03.2020 um 20:32:
> Hi Hans,
>
> here you have the sample:
>
> \setuppapersize[A6]
> \setupinteraction[state=start]
> \enabledirectives[references.border]
>
> \setupbodyfont[pagella]
>
> \starttext
>
> \placelist[section]
> [alternative=d,
> style=\it]
>
> \section{Section 1}
> \section{\dorecurse{25}{Section }3}
> \section{Section 3}
> \stoptext
>
> For some strange reason (at least, to me), \placelist[alternative=d]
> seems to misbehave when using \it or \bi as style.
>
> Everthing is fine when italic fonts aren’t used.
It can be fixed with a strut option for lists, e.g.
\setuplist[strut=no]. The problem in this case is that the ex-height for
the italic font is larger than the ex-height for the upright font which
pushes the text down because add a strut at the begin and end of the
entries.
Below is a minimal example of the problem, the \setstrut setting changes
the height of the strut for the italic font.
%%%% begin example
\showstruts
\setupbodyfont[pagella]
\starttext
\dontleavehmode\it
\ruledhbox{\strut Section}
\ruledhbox{\setstrut\strut Section}
\stoptext
%%%% end example
Most fonts (I checked only a small number) don't have such a big
difference between the ex-height of the upright and italic styles which
makes it hard to notice the problem.
%%%% begin example
\define[1]\ShowExheight
{\bgroup
\setupbodyfont[#1]
\subject{#1}
\starttabulate
\NC tf \NC \tf \the\exheight \NC\NR
\NC it \NC \it \the\exheight \NC\NR
\NC bf \NC \bf \the\exheight \NC\NR
\NC bi \NC \bi \the\exheight \NC\NR
\stoptabulate
\egroup}
\starttext
\ShowExheight{pagella}
\ShowExheight{modern}
\ShowExheight{dejavu}
\ShowExheight{termes}
\stoptext
%%%% end example
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-15 21:56 ` Wolfgang Schuster
@ 2020-03-16 9:01 ` Pablo Rodriguez
2020-03-16 12:27 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2020-03-16 9:01 UTC (permalink / raw)
To: ntg-context
On 3/15/20 10:56 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 15.03.2020 um 20:32:
>> [...]
>> Everthing is fine when italic fonts aren’t used.
>
> It can be fixed with a strut option for lists, e.g.
> \setuplist[strut=no]. The problem in this case is that the ex-height for
> the italic font is larger than the ex-height for the upright font which
> pushes the text down because add a strut at the begin and end of the
> entries.
Many thanks for your reply, Wolfgang.
I don’t get \setuplist[strut=no] working in the minimal sample I sent
yesterday.
> Below is a minimal example of the problem, the \setstrut setting changes
> the height of the strut for the italic font.
I must admit that I don’t understand how to handle struts (I’m not sure
I understand what they actually are.)
> Most fonts (I checked only a small number) don't have such a big
> difference between the ex-height of the upright and italic styles which
> makes it hard to notice the problem.
Yesterday I realized that Pagella was an extreme case, because I tried
to report this issue before, but Latin Modern didn’t show the issue (so
I thought I was doing something wrong).
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 9:01 ` Pablo Rodriguez
@ 2020-03-16 12:27 ` Wolfgang Schuster
2020-03-16 13:35 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-03-16 12:27 UTC (permalink / raw)
To: mailing list for ConTeXt users, Pablo Rodriguez
Pablo Rodriguez schrieb am 16.03.2020 um 10:01:
> On 3/15/20 10:56 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez schrieb am 15.03.2020 um 20:32:
>>> [...]
>>> Everthing is fine when italic fonts aren’t used.
>>
>> It can be fixed with a strut option for lists, e.g.
>> \setuplist[strut=no]. The problem in this case is that the ex-height for
>> the italic font is larger than the ex-height for the upright font which
>> pushes the text down because add a strut at the begin and end of the
>> entries.
>
> Many thanks for your reply, Wolfgang.
>
> I don’t get \setuplist[strut=no] working in the minimal sample I sent
> yesterday.
The key isn't supported yet but it could help to avoid the spacing problem.
>> Below is a minimal example of the problem, the \setstrut setting changes
>> the height of the strut for the italic font.
>
> I must admit that I don’t understand how to handle struts (I’m not sure
> I understand what they actually are.)
The simple answer is that a strut is a invisible vertical line with the
height and depth of a line. When you look at the example below you can
see the text in the first box touches the top and bottom boundaries.
When we add a strut at the begin and end of the text we ensure the last
line has the depth of a normal line and the first line gets the complete
height of a line.
%%%% begin example
\starttext
\ruledvbox{\samplefile{weisman}}
\blank
\ruledvbox{\begstrut\samplefile{weisman}\endstrut}
\stoptext
%%%% end example
>> Most fonts (I checked only a small number) don't have such a big
>> difference between the ex-height of the upright and italic styles which
>> makes it hard to notice the problem.
>
> Yesterday I realized that Pagella was an extreme case, because I tried
> to report this issue before, but Latin Modern didn’t show the issue (so
> I thought I was doing something wrong).
Yes, pagella is a extreme case but when you use bold text the vertical
spacing is also messed up. You can avoid this when you use a fixed
lineheight (e.g. \setupinterlinespace[line=14pt]) because the default
distance is font dependant (default: 2.8 * ex-height).
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 12:27 ` Wolfgang Schuster
@ 2020-03-16 13:35 ` Hans Hagen
2020-03-16 14:42 ` Henning Hraban Ramm
0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2020-03-16 13:35 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster, Pablo Rodriguez
On 3/16/2020 1:27 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 16.03.2020 um 10:01:
>> On 3/15/20 10:56 PM, Wolfgang Schuster wrote:
>>> Pablo Rodriguez schrieb am 15.03.2020 um 20:32:
>>>> [...]
>>>> Everthing is fine when italic fonts aren’t used.
>>>
>>> It can be fixed with a strut option for lists, e.g.
>>> \setuplist[strut=no]. The problem in this case is that the ex-height for
>>> the italic font is larger than the ex-height for the upright font which
>>> pushes the text down because add a strut at the begin and end of the
>>> entries.
>>
>> Many thanks for your reply, Wolfgang.
>>
>> I don’t get \setuplist[strut=no] working in the minimal sample I sent
>> yesterday.
>
> The key isn't supported yet but it could help to avoid the spacing problem.
>
>>> Below is a minimal example of the problem, the \setstrut setting changes
>>> the height of the strut for the italic font.
>>
>> I must admit that I don’t understand how to handle struts (I’m not sure
>> I understand what they actually are.)
>
> The simple answer is that a strut is a invisible vertical line with the
> height and depth of a line. When you look at the example below you can
> see the text in the first box touches the top and bottom boundaries.
>
> When we add a strut at the begin and end of the text we ensure the last
> line has the depth of a normal line and the first line gets the complete
> height of a line.
>
> %%%% begin example
> \starttext
>
> \ruledvbox{\samplefile{weisman}}
>
> \blank
>
> \ruledvbox{\begstrut\samplefile{weisman}\endstrut}
>
> \stoptext
> %%%% end example
>
>>> Most fonts (I checked only a small number) don't have such a big
>>> difference between the ex-height of the upright and italic styles which
>>> makes it hard to notice the problem.
>>
>> Yesterday I realized that Pagella was an extreme case, because I tried
>> to report this issue before, but Latin Modern didn’t show the issue (so
>> I thought I was doing something wrong).
>
> Yes, pagella is a extreme case but when you use bold text the vertical
> spacing is also messed up. You can avoid this when you use a fixed
> lineheight (e.g. \setupinterlinespace[line=14pt]) because the default
> distance is font dependant (default: 2.8 * ex-height).
or one can play with these parameters, that default to:
\setupinterlinespace
[height=.72,
depth=.28]
(maybe we should have recomended values for specific fonts)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 13:35 ` Hans Hagen
@ 2020-03-16 14:42 ` Henning Hraban Ramm
2020-03-16 17:01 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2020-03-16 14:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 2020-03-16 um 14:35 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>> Yes, pagella is a extreme case but when you use bold text the vertical spacing is also messed up. You can avoid this when you use a fixed lineheight (e.g. \setupinterlinespace[line=14pt]) because the default distance is font dependant (default: 2.8 * ex-height).
> or one can play with these parameters, that default to:
>
> \setupinterlinespace
> [height=.72,
> depth=.28]
>
> (maybe we should have recomended values for specific fonts)
I had similar problems in the past and got to
2.9ex for Alegreya
3.2ex for Adobe Jenson
(Just tried, didn’t calculate anything.)
All the best,
Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 14:42 ` Henning Hraban Ramm
@ 2020-03-16 17:01 ` Wolfgang Schuster
2020-03-16 17:42 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-03-16 17:01 UTC (permalink / raw)
To: mailing list for ConTeXt users, Henning Hraban Ramm
Henning Hraban Ramm schrieb am 16.03.2020 um 15:42:
>
>
>> Am 2020-03-16 um 14:35 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>>> Yes, pagella is a extreme case but when you use bold text the vertical spacing is also messed up. You can avoid this when you use a fixed lineheight (e.g. \setupinterlinespace[line=14pt]) because the default distance is font dependant (default: 2.8 * ex-height).
>> or one can play with these parameters, that default to:
>>
>> \setupinterlinespace
>> [height=.72,
>> depth=.28]
>>
>> (maybe we should have recomended values for specific fonts)
>
> I had similar problems in the past and got to
> 2.9ex for Alegreya
> 3.2ex for Adobe Jenson
>
> (Just tried, didn’t calculate anything.)
How would this help for the original problem?
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 17:01 ` Wolfgang Schuster
@ 2020-03-16 17:42 ` Hans Hagen
2020-03-16 18:00 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2020-03-16 17:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 3/16/2020 6:01 PM, Wolfgang Schuster wrote:
> Henning Hraban Ramm schrieb am 16.03.2020 um 15:42:
>>
>>
>>> Am 2020-03-16 um 14:35 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>>>> Yes, pagella is a extreme case but when you use bold text the
>>>> vertical spacing is also messed up. You can avoid this when you use
>>>> a fixed lineheight (e.g. \setupinterlinespace[line=14pt]) because
>>>> the default distance is font dependant (default: 2.8 * ex-height).
>>> or one can play with these parameters, that default to:
>>>
>>> \setupinterlinespace
>>> [height=.72,
>>> depth=.28]
>>>
>>> (maybe we should have recomended values for specific fonts)
>>
>> I had similar problems in the past and got to
>> 2.9ex for Alegreya
>> 3.2ex for Adobe Jenson
>>
>> (Just tried, didn’t calculate anything.)
>
> How would this help for the original problem?
Some fonts have a different ratio (I forgot what font i did .7 / .3) but
indeed an all-bold or whatever style change sometimes demands a local
\setupinterlinespace (no argument).
Of course one could also tweak the ht/dp of a specific style using one
of the pseudo features.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 17:42 ` Hans Hagen
@ 2020-03-16 18:00 ` Wolfgang Schuster
2020-03-16 20:04 ` Pablo Rodriguez
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-03-16 18:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hans Hagen schrieb am 16.03.2020 um 18:42:
> On 3/16/2020 6:01 PM, Wolfgang Schuster wrote:
>> Henning Hraban Ramm schrieb am 16.03.2020 um 15:42:
>>>
>>>
>>>> Am 2020-03-16 um 14:35 schrieb Hans Hagen <j.hagen@xs4all.nl>:
>>>>> Yes, pagella is a extreme case but when you use bold text the
>>>>> vertical spacing is also messed up. You can avoid this when you use
>>>>> a fixed lineheight (e.g. \setupinterlinespace[line=14pt]) because
>>>>> the default distance is font dependant (default: 2.8 * ex-height).
>>>> or one can play with these parameters, that default to:
>>>>
>>>> \setupinterlinespace
>>>> [height=.72,
>>>> depth=.28]
>>>>
>>>> (maybe we should have recomended values for specific fonts)
>>>
>>> I had similar problems in the past and got to
>>> 2.9ex for Alegreya
>>> 3.2ex for Adobe Jenson
>>>
>>> (Just tried, didn’t calculate anything.)
>>
>> How would this help for the original problem?
> Some fonts have a different ratio (I forgot what font i did .7 / .3) but
> indeed an all-bold or whatever style change sometimes demands a local
> \setupinterlinespace (no argument).
I know there are cases where changing the height/depth ration can help
but in this case the problem is caused by \strut which is bigger for the
italic font.
A way to fix the wrong spacing here is to add a strut option to
\setuplist (or use always the upright font to set the strut values).
> Of course one could also tweak the ht/dp of a specific style using one
> of the pseudo features.
Also possible because the larger value for the ex-height of the italic
font causes the bigger strut dimensions.
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
2020-03-16 18:00 ` Wolfgang Schuster
@ 2020-03-16 20:04 ` Pablo Rodriguez
0 siblings, 0 replies; 10+ messages in thread
From: Pablo Rodriguez @ 2020-03-16 20:04 UTC (permalink / raw)
To: ntg-context
On 3/16/20 7:00 PM, Wolfgang Schuster wrote:
> [...]
> A way to fix the wrong spacing here is to add a strut option to
> \setuplist (or use always the upright font to set the strut values).
Any of these ones would be great to avoid the corner cases.
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-03-16 20:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 19:32 (bug?) wrong interline in \placelist[alternative=d] with Pagella italics Pablo Rodriguez
2020-03-15 21:56 ` Wolfgang Schuster
2020-03-16 9:01 ` Pablo Rodriguez
2020-03-16 12:27 ` Wolfgang Schuster
2020-03-16 13:35 ` Hans Hagen
2020-03-16 14:42 ` Henning Hraban Ramm
2020-03-16 17:01 ` Wolfgang Schuster
2020-03-16 17:42 ` Hans Hagen
2020-03-16 18:00 ` Wolfgang Schuster
2020-03-16 20:04 ` Pablo Rodriguez
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).