[NTG-context] "Trial typesetting" in ConTeXt / lua ?

josephcanedo at gmail.com josephcanedo at gmail.com
Tue Nov 17 09:15:14 CET 2015


I was wondering if someone could have some hints on this question, anyway, I found the function mknodes() from luaTeX wiki and nodes.handlers.characters(head) function in ConTeXt (as it seems that node.ligaturing(head) and node.kerning(head) do not seem to do anything).

It seems to work fine (ligatures and font features) expect the kerning. Does someone know how to perform the kerning as well ?

Best regards

Joseph Canedo

From: josephcanedo at gmail.com
Sent: ‎Saturday‎, ‎November‎ ‎14‎, ‎2015 ‎11‎:‎16‎ ‎AM
To: ntg-context at ntg.nl

Dear all,

Is it possible in ConTeXt within lua code to do “trial typesetting” (not sure that’s best name for what I would like to achieve) ? By this I mean store some input (with text and macros) in some buffer and do what ConTeXt does normally (parsing, create nodes …) but instead of shipping the nodes to line breaking algorithm and to the page output, only retrieve the nodes and after discard them. This is to get an estimate of the total text width within a paragraph (to calculate some shape on the paragraph).

I browsed the lua code from http://source.contextgarden.net/ but I do not dare to use too low level lua functionality.

Many thanks for any hint (even a pointer to lua function).

Best regards

Joseph Canedo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20151117/72bbb096/attachment.html>

More information about the ntg-context mailing list