Update of bug #58562 (group groff):
Summary: improve typography of letterspacing request .tkf
("track kerning" in groff parlance) => [troff] stop applying track kerning to
the last glyph on a line
_______________________________________________________
Follow-up Comment #2:
I think I understand how to fix this problem now. I sure didn't six years
ago.
This came to me in a flash of inspiration; I haven't reviewed "node.cpp" yet.
We need a new node type.
Call it a "track kerning" node.
If a track kerning node appears at the end of the output line, discard it.
All others are retained.[1]
This should be easy because the linked list representing a pending output line
is maintained in reverse order. So, when the bug "break the line" machine
spins up, a track kerning node will be the first thing it sees.
Well, almost. What we might do is make `glyph_node`s container nodes if
they're not already, and store the `track_kerning_node` inside them.
But it should still be algorithmically cheap and easy.
[1] Considering Dave's other bug #61828, we might end up adding _two_ track
kerning nodes to each glyph when track kerning is in in effect, for the
left-hand and right-hand applications thereof. That would militate more
strongly for the "container nodification" [sic] of `glyph_node` (if not
already present). It would also mean that the breaking logic would need to
make another check when reaching the "end" of the linked list, meaning the
node at beginning of the output line.
Hmm, since we're not guaranteed to have a glyph node at either extreme of the
line, this'll be a _little_ trickier. Even in the simpler case applying just
to this ticket. For that, we just need a flag: "seen_first_glyph_node".
Should be feasible.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58562>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
