On 12/7/18 11:25 PM, Hans Hagen wrote:
On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:
[...] The issue is that, although opbd values are used, that results from opbd and from single placement in addfeature are different (although LuaTeX reports the same values for lfbd).
because you implement it as kerning and not as opbd (protrusion is not kerning) ... you can try to change the name to "lfbd" (if you would enable lfbd as feature for sure you would get funny kerning so opbd picks up from those instead)
If protrusion has to apply other values than the ones besides opbd, the values for optical bounds aren’t reliable for accurate glyph positioning. Sorry, but otherwise there is no need for optical margins in OpenType (standard protrusion would be all that is needed). Kerning might be selectively applied, such as in: \startluacode fonts.handlers.otf.addfeature { name = "leftbounds", type = "single", data = { Ἠ = { -212, 0, -212, 0 }, Ὧ = { -196, 0, -196, 0 }, } } \stopluacode \definefontfeature[default][default][protrusion=quality] \definefontfeature[leftbounds][leftbounds=yes] \setupfirstline [alternative=word, n=1, style={\feature[+][leftbounds]}] \showframe \setuplayout[page] \definefontfamily[mainface][rm][Typographica Old Standard] \definefontfamily[mainface][tt][Latin Modern Mono] \setupbodyfont[mainface, 300pt] \setupalign[hanging] \startbuffer «a\par «b\par Ω\par Ὧ\par Ἠ\par \stopbuffer \starttext \setupparagraphintro[each][\setfirstline] \getbuffer \stoptext At least to get Greek hanging diacritics, I think this is the way to go. It would be extremely useful to enable a \setuplineintro for verse. It would be also useful to have a function that substracts the width of two given glyphs. (This is exactly the amount to get hanging diacritics properly kerned.) Many thanks for your help, Pablo -- http://www.ousia.tk