ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font expansion enabled by default with the latest upload
@ 2022-11-21  9:20 Max Chernoff via ntg-context
  2022-11-21 10:02 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Max Chernoff via ntg-context @ 2022-11-21  9:20 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff

Hi Hans,

Font expansion (hz) seems to be enabled by default with the latest
upload. 

If I compile this document locally with ConTeXt "2022.11.18 13:22":

   \showframe
   
   % \definefontfeature[default][default][expansion=quality]
   % \usetypescript[modern-base]
   % \setupbodyfont[reset,modern]
   % \setupalign[hz]
   
   \starttext
       Hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello.
   \stoptext

I get slightly different spacing than I do when I compile the same
document on live.contextgarden.net. If I compile the document with the
lines uncommitted on live.contextgarden.net, I get the same results as I
do on my local installation with the lines commented.

Personally, I think that enabling hz expansion by default is probably a
good thing, but this change will affect a very large number of documents
and you never mentioned it in the announcement email, so I suspect that
it was accidentally added when you added the math hz.

Thanks,
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Font expansion enabled by default with the latest upload
  2022-11-21  9:20 Font expansion enabled by default with the latest upload Max Chernoff via ntg-context
@ 2022-11-21 10:02 ` Hans Hagen via ntg-context
  2022-11-21 22:46   ` Max Chernoff via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2022-11-21 10:02 UTC (permalink / raw)
  To: Max Chernoff via ntg-context; +Cc: Hans Hagen

On 11/21/2022 10:20 AM, Max Chernoff via ntg-context wrote:
> Hi Hans,
> 
> Font expansion (hz) seems to be enabled by default with the latest
> upload.
> 
> If I compile this document locally with ConTeXt "2022.11.18 13:22":
> 
>     \showframe
>     
>     % \definefontfeature[default][default][expansion=quality]
>     % \usetypescript[modern-base]
>     % \setupbodyfont[reset,modern]
>     % \setupalign[hz]
>     
>     \starttext
>         Hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello hello hello hello hello hello hello hello hello hello
>         hello hello hello.
>     \stoptext
> 
> I get slightly different spacing than I do when I compile the same
> document on live.contextgarden.net. If I compile the document with the
> lines uncommitted on live.contextgarden.net, I get the same results as I
> do on my local installation with the lines commented.
> 
> Personally, I think that enabling hz expansion by default is probably a
> good thing, but this change will affect a very large number of documents
> and you never mentioned it in the announcement email, so I suspect that
> it was accidentally added when you added the math hz.
what you observe is likely a side effect of an increase in accuracy 
which gives a bit less drift in the pdf; expansion is turned off (it 
would increase runtime if turned on)

(increased accuracy was indeed a side effect of math but more to get rid 
of an annoyance at extreme resolutions)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Font expansion enabled by default with the latest upload
  2022-11-21 10:02 ` Hans Hagen via ntg-context
@ 2022-11-21 22:46   ` Max Chernoff via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Max Chernoff via ntg-context @ 2022-11-21 22:46 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff


Hi Hans,

> what you observe is likely a side effect of an increase in accuracy 
> which gives a bit less drift in the pdf; expansion is turned off (it 
> would increase runtime if turned on)

It's not just in the PDF though, I can also see the change from Lua.

Using this document:

   \showframe
   
   % \definefontfeature[default][default][expansion=quality]
   % \usetypescript[modern-base]
   % \setupbodyfont[reset,modern]
   % \setupalign[hz]
   
   \startluacode
       function userdata.test(head)
           local last_line = node.tail(head)
           local i = 1
           for n in node.traverse(node.tail(last_line.list), true) do
               print(n)
               if n.id == node.id("glue") then
                   print(node.effectiveglue(n, last_line) / 65536)
               elseif n.width then
                   print(n.width / 65536)
               end
   
               if i >= 6 then
                   break
               else
                   i = i + 1
               end
           end
   
           return head
       end
   
       nodes.tasks.appendaction("finalizers", "after", "userdata.test")
       nodes.tasks.enableaction("finalizers", "userdata.test")
   \stopluacode
   
   \starttext
       Hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello hello hello hello hello hello hello hello hello hello
       hello hello hello.%
       \ctxlua{nodes.tasks.enableaction("finalizers", "userdata.test")}
   
       \ctxlua{nodes.tasks.disableaction("finalizers", "userdata.test")}
   \stoptext

(A) With the expansion lines commented/default on ConTeXt "2022.11.18
13:22" I get:

   <node :  13263 <=  13299 =>    nil : glue righthangskip>
   0.0
   <node :  12877 <=  13263 =>  13299 : glue rightskip>
   0.0
   <node :   1687 <=  12877 =>  13263 : glue parfillskip>
   0.0
   <node :  12850 <=   1687 =>  12877 : penalty linepenalty>
   <node :  12837 <=  12850 =>   1687 : glyph unset>
   3.3341674804688
   <node :  12824 <=  12837 =>  12850 : glyph unset>
   5.9967041015625
   
(B) With the expansion lines uncommented/enabled on ConTeXt "2022.11.18
13:22" I get:

   <node :  13956 <=  13992 =>    nil : glue righthangskip>
   0.0
   <node :  12877 <=  13956 =>  13992 : glue rightskip>
   0.0
   <node :   1687 <=  12877 =>  13956 : glue parfillskip>
   0.046096801757812
   <node :  12850 <=   1687 =>  12877 : penalty linepenalty>
   <node :  12837 <=  12850 =>   1687 : glyph unset>
   3.3341674804688
   <node :  12824 <=  12837 =>  12850 : glyph unset>
   5.9967041015625
   
(C) With the expansion lines commented/default live.contextgarden.net I
get:

   <node :  10909 <=  10943 =>    nil : glue righthangskip>
   0.0
   <node :  10138 <=  10909 =>  10943 : glue rightskip>
   0.0
   <node :    524 <=  10138 =>  10909 : glue parfillskip>
   6.6463470458984
   <node :  10119 <=    524 =>  10138 : penalty linepenalty>
   <node :  10107 <=  10119 =>    524 : glyph 32768>
   3.26220703125
   <node :  10095 <=  10107 =>  10119 : glyph 32768>
   5.8767700195312

(D) And with the expansion lines uncommented/enabled on
live.contextgarden.net I get:

   <node :  11161 <=  11195 =>    nil : glue righthangskip>
   0.0
   <node :  10138 <=  11161 =>  11195 : glue rightskip>
   0.0
   <node :    524 <=  10138 =>  11161 : glue parfillskip>
   0.046096801757812
   <node :  10119 <=    524 =>  10138 : penalty linepenalty>
   <node :  10107 <=  10119 =>    524 : glyph 32768>
   3.3341674804688
   <node :  10095 <=  10107 =>  10119 : glyph 32768>
   5.9967041015625

A, B, and D all have almost the same \parfillskip widths, and the exact
same "." and "o" widths. But comparing A/B/D to C, there's a 6.6pt
difference in the \parfillskip values and a 0.12pt difference between
the "o" widths.

Maybe it's just a coincidence, but it seems odd that enabling expansion
makes no difference with the latest version (A/B) and that latest with
no expansion (A) gives identical results to the old version with
expansion (D). Plus, a 6.6pt difference in glue lengths seems like a lot
for an accuracy change.

I could very easily be wrong here, but something seems off to me.

Thanks,
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-21 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21  9:20 Font expansion enabled by default with the latest upload Max Chernoff via ntg-context
2022-11-21 10:02 ` Hans Hagen via ntg-context
2022-11-21 22:46   ` Max Chernoff via ntg-context

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