Am 04.04.2025 um 02:29 schrieb Alan Caruanambo:
Hi, I'm using a font (only in the headers) that doesn't have Spanish characters. What I want is for it to automatically replace the text with a custom font when I type it in the header.

Sample: \chapter{Peru} ==> Peru (replace ú with u)

=========

\definefont[typographercaps][name:typographercaps*default at 35pt]

\setuphead
   [chapter]
   [align=middle,
    color=darkred,
    number=no,
    style=\typographercaps]

\starttext

\dorecurse{5}{\chapter{ann chapter} \input knuth}

\stoptext



\define[1]\ShapedCharacters{\cldcontext{characters.shaped("#1")}}

\starttext

\subject{Perú}

\setuphead[subject][deeptextcommand=\ShapedCharacters]

\subject{Perú}

\stoptext

Wolfgang

___________________________________________________________________________________
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