Re: [NTG-context] Issue with grid

2020-11-22 Thread Hans Hagen

On 11/22/2020 5:03 PM, Joseph wrote:


\definefontfeature[base][mode=node]

\definefontfamily[mainfont][serif][EBGaramond][features=base]
Really? No features enabled at all? EBGaramond is quite loaded with 
features. Just use 'default'.


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
___


Re: [NTG-context] Issue with grid

2020-11-22 Thread Hans Hagen

On 11/22/2020 5:03 PM, Joseph wrote:

Dear list,

In some cases with latest LMTX I see text not aligned to grid. MWE 
reproduces the problem (could not reproduce with default font).


Typesetting MWE using online ConTeXt page shows correctly aligned text 
on grid.


\showgrid

\setuplayout[grid=both]

\definefontfeature[base][mode=node]

\definefontfamily[mainfont][serif][EBGaramond][features=base]

\setupbodyfont[mainfont, 9pt]

\starttext

\blank[line, samepage]Fin des psalmes.

\blank[line, samepage]Fin des psalmes.

\dorecurse{8}{\input knuth

}

\stoptext

If number of itérations is changed from 8 to 7) problem does not appear, 
seems to be linked to the fact page is fully filled with lines.


If one of the \blank lines is commented out problem does not occur either.


It might have to do with the fact that the height/depth ratio that is 
used doesn't match well with the ascenders/descenders of the font that 
you use. The defaults are:


\setupinterlinespace
  [height=.72,
   depth=.28,
   line=2.8\exheight]

so you can play with these. The 72:28 ratio works ok for most fonts but 
sometimes need to be adapted. Sometimes the 2.8 is not enough.


(makes me wonder: i can issue a warning when a font can overrun)

(normally grid snapping should catch is but columns are kind of different)

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
___


Re: [NTG-context] Issue with grid

2020-11-22 Thread Pablo Rodriguez
On 11/22/20 5:03 PM, Joseph wrote:
> Dear list,
>
> In some cases with latest LMTX I see text not aligned to grid. MWE
> reproduces the problem (could not reproduce with default font).

Hi Joseph,

I think this is related to the fact that your paragraphs are hard to
break between pages, since they only contain two lines.

I think this paragraph break among pages is what triggers the issue you
mention.

> Typesetting MWE using online ConTeXt page shows correctly aligned text
> on grid.

https://live.contextgarden.net/ includes both LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30.

> If number of itérations is changed from 8 to 7) problem does not appear,
> seems to be linked to the fact page is fully filled with lines.

Because the text fits in a single page.

> If one of the \blank lines is commented out problem does not occur either.

Because you avoid the problem of breaking the paragraph between pages.

You can also avoid that using the following (but it will work only with
your MWE, I know):

  \setuplayout[setups=*lessstrict]
  \startsetups[*lessstrict]
  \widowpenalty=1000
  \clubpenalty=1000
  \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}]

  \showgrid

I think that the problem might be related to the (unsuccesful) avoidance
of orphans and widows in current latest.

But of course, Hans or Wolfgang know better.

Just in case it might 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
___