From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Re: Font expansion enabled by default with the latest upload
Date: Mon, 21 Nov 2022 15:46:32 -0700 [thread overview]
Message-ID: <179595249d7904348cd21587734445a501020c0f.camel@telus.net> (raw)
In-Reply-To: <d2fb6f9c-d4f7-64ce-2658-80e3edf3f0df@freedom.nl>
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
___________________________________________________________________________________
prev parent reply other threads:[~2022-11-21 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 9:20 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 message]
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=179595249d7904348cd21587734445a501020c0f.camel@telus.net \
--to=ntg-context@ntg.nl \
--cc=mseven@telus.net \
/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).