On Fri, Mar 13, 2020 at 03:34:04PM +0100, Hans Hagen wrote:
On 3/13/2020 3:16 PM, Marcel Fabian Krüger wrote:
On Thu, Mar 12, 2020 at 06:43:39PM +0100, Hans Hagen wrote:
This seems inconsistant. Is there a reason why this would be required or could it be changed to handle height and depth consistently? It is (among some others) a known artifact that dates from the very early days when we played with alternative par builders and such. These offsets were introduced when we were messing around with arabic and had to handle marks and at the same time deal with tex's perspective on line dimensions (which it doesn't really have): prevdepth, maxdepth and such so this is (irr) why we handled the depth differently.
Because in the process more access to node lists at various stages was implemented one can indeed wonder if we need to keep this assymetrical approach (as we were never really bitten by it there was not real reason to change is, also because it can resuel in incompatible output.)
Anyway, what I can do is change it in luametatex so that for a longer period we can see if context users run into issues and complain about a change in output (i can then quickly revert to make it some option). After all, context users know that they are possible victims of testing.
Just changing something in luatex right away is no option given the demand for stability, and definitely not in code freeze time. When we don't run into problems we can then decide to do it in luatex too (assuming that complaints about different output don't backfire).
Another option is to introduce a parameter \characteroffsetmode:
0 = no compensation 1 = ht compensation (current and default) 2 = dp compensation 3 = ht and dp compensation
IMHO such a parameter sounds like a good idea. Another approcach I could think of would be to assign some unused bits in the glyph subtype to control this on a glyph-by-glyph basis. Especially that could help if there are some weird fonts which set up their glyphs in odd ways and would cause trouble if compensation is applied. redefining the subtype is definitely something incompatible because those bits in the subtype are 'free to use' so not for the engine to take ...
That is good to know, could this be added to the documentation? Given that the engine used bits are called "valid bits", I always assumed that the remaining bits are reserved.
weird fonts cans be dealt with using virtual font entries ... so:
a future release (1.13) will have this
\startsubsection[title={\type{\glyphdimensionsmode}}]
Already in the early days of \LUATEX\ the decision was made to calculate the effective height and depth of glyphs in a way that reflected the applied vertical offset. The height got that offset added, the depth only when the offset was larger than zero. We can now control this in more detail with this mode parameter. An offset is added to the height and|/|or subtracted from the depth. The effective values are never negative. The zero mode is the default.
\starttabulate[|l|pl|] \DB value \BC effect \NC\NR \TB \NC \type {0} \NC the old behavior: add the offset to the height and only subtract the offset only from the depth when it is positive \NC \NR \NC \type {1} \NC add the offset to the height and subtract it from the depth \NC \NR \NC \type {2} \NC add the offset to the height and subtract it from the depth but keep the maxima of the current and previous results \NC \NR \NC \type {3} \NC use the height and depth of the glyph, so no offset is applied \NC \NR \LL \stoptabulate
Thank you. Best regards, Marcel