4

Is there a nice way to automatically turn all parentheses in italic text upright in ConTeXt? In particular i'm interested in a solution which would work with EB Garamond. My current workaround is to define a fallback in my typescript file, which forces upright parentheses into italics, like so:

\definefontfeature
    [eb-garamond-test]
    [default]
    [itlc=yes]
    \definefontfallback [uprightparenteses] [name:EBGaramond-Regular] [0x00028:0x00029] [force=yes] 
    \starttypescript [serif] [ebgaramond-test]
        \setups[font:fallback:serif]
        \definefontsynonym [Serif] [name:EBGaramond-Regular] [features=eb-garamond-test]
        \definefontsynonym [SerifItalic] [name:EBGaramond-Italic] [features=eb-garamond-test,fallbacks=uprightparenteses]
    \stoptypescript
    \starttypescript [ebgaramond-test]
        \definetypeface[ebgaramond-test] [rm] [serif] [ebgaramond-test] [default]
    \stoptypescript

\setupbodyfont[ebgaramond-test]

\starttext
({\em if (if) if})
\stoptext

The only problem for now is that italics correction itlc=yes obviously doesn't affect these and it doesn't look good (the ones outside are genuine roman ones, with working italics correction, and the ones inside are fake with no italics correction):

upright parentheses

UPD:

Ok, one possible solution is to do what i did (use a font fallback for parentheses) and, add as @dg suggests below, add \setupitaliccorrection[global,always] to make italics correction work.

5

You can set italic correction to always:

\setupitaliccorrection
  [global,always]

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.