On 11/4/2024 6:39 PM, Rik Kabel wrote:

On 2024-11-04 10:55, Wolfgang Schuster wrote:
Mikael Sundqvist schrieb am 04.11.2024 um 07:35:
Hi,

You can try this below (from test suite), but then, as you see, also
upright T will move out. Not sure how/if you can control that.

\startluacode

local classes = fonts.protrusions.classes
local vectors = fonts.protrusions.vectors

classes.rik = {
     vector = 'rik',
     factor = 1,
}

vectors.rik = table.merged (
     vectors.quality,
     {
       [0x0054] = { 0.35, 0 }, -- T
     })

\stopluacode

\definefontfeature
   [default]
   [default]
   [protrusion=rik,expansion=quality]

Define a feature which sets only the custom protrusion values:

\definefontfeature [rik] [protrusion=quality]

and create a new typeface where you apply the new feature to the italic/slanted style:

\definefontfamily [riktimes] [rm] [TeX Gyre Termes] [sl=features: {default,rik}]

Afterwards use \seupbodyfont[riktimes] to access the new typeface.

Wolfgang
___________________________________________________________________________________

Looking a bit more, the problem is not protrusion but the bounding box. Look at the left side of the italic T and W, and to a lesser degree C, O, and Q, produced by the following.

    \usetypescript[libertinus]
    \setupbodyfont[libertinus]
    \starttext
    ¦\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
    {\it\recursestring\tf¦}\par
    ¦\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
    {\recursestring¦}

    ¦\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
    {\WORD{\it\recursestring}\tf¦}\par
    ¦\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
    {\WORD{\recursestring}¦}
    \stoptext

This may be an issue for the font maintainer, but is there anything that could be done within context?

you can make a font goodie file where you patch properties of a specific glyph but then you also need to keep an eye on when the font gets fixed

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to