And what's the way to define your own protrusion?

Shouldn't it go like this?


\showframe

\startluacode
fonts.protrusions.vectors['MyVector'] = {

    [0x2044] = { 0, 0.50    }, -- fraction slash
    [0x002f] = { 0, 0.50    }, -- solidus slash
    [0x002C] = { 0, 0.50    }, -- comma
    [0x002E] = { 0, 0.50    }, -- period
    [0x003A] = { 0, 0.50    }, -- colon
    [0x003B] = { 0, 0.50    }, -- semicolon
    [0x002D] = { 0, 0.50    }, -- hyphen
    [0x2013] = { 0, 0.25 }, -- endash
    [0x201C] = { 0, -1.25    }, -- quotedblleft

}
fonts.protrusions.classes['Mypure'] = {
    vector = 'MyVector', factor = 1
}

fonts.expansions.classes['Myquality'] = {
    stretch = 1, shrink = 1, step = .5, vector = 'default', factor = 1
}
\stopluacode


\definefontfeature[default][default][mode=node,expansion=Myquality,protrusion=Mypure]

\usetypescript[palatino]
\setupbodyfont[palatino]

\setupalign[hz,hanging]

\enableprotruding
\enableadjusting


\starttext

\input knuth

\stoptext




Steffen



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to