On 8/20/2023 5:33 PM, Hamid,Idris wrote:
Dear gang,

For \addfeature and the like, a virtual font feature defined in terms of a CLD 
local function behaves differently from other font features. MWE:

==============
\startluacode
local function squeeze(tfmdata)
     for k, v in next, tfmdata.characters do
         v.width = 1.75 * (v.height or 0)
         v.depth  = 1.75 * (v.depth  or 0)
     end
end

local specification = {
     name        = "sqtfm",
     description = "test",
     manipulators = {
         base = squeeze,
         node = squeeze,
     }
}
because much more has to be done to satisfy the backend (liek advance with and such) .. you cannot just change dimensions on the fly for characters that could potentially be shared just as you can't change glyph dimension mid document

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
___________________________________________________________________________________

Reply via email to