ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Pablo Rodriguez <oinos@gmx.es>
Subject: Re: (bug?) wrong interline in \placelist[alternative=d] with Pagella italics
Date: Sun, 15 Mar 2020 22:56:46 +0100	[thread overview]
Message-ID: <55339d22-673b-988f-79c1-3e7947985da4@gmail.com> (raw)
In-Reply-To: <bb04a50f-7a05-2218-0092-c63d089ac04f@gmx.es>

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
___________________________________________________________________________________

  reply	other threads:[~2020-03-15 21:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 19:32 Pablo Rodriguez
2020-03-15 21:56 ` Wolfgang Schuster [this message]
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

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=55339d22-673b-988f-79c1-3e7947985da4@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).