ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] character replace
@ 2025-04-04  0:29 Alan Caruanambo
  2025-04-04  0:36 ` [NTG-context] " alan.caruanambom
  2025-04-04 17:34 ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Caruanambo @ 2025-04-04  0:29 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 514 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 641 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: character replace
  2025-04-04  0:29 [NTG-context] character replace Alan Caruanambo
@ 2025-04-04  0:36 ` alan.caruanambom
  2025-04-04 17:34 ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: alan.caruanambom @ 2025-04-04  0:36 UTC (permalink / raw)
  To: ntg-context

Correction in sample: \chapter{Perú} ==> Peru (replace ú with u)
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: character replace
  2025-04-04  0:29 [NTG-context] character replace Alan Caruanambo
  2025-04-04  0:36 ` [NTG-context] " alan.caruanambom
@ 2025-04-04 17:34 ` Wolfgang Schuster
  2025-04-09  4:48   ` alan.caruanambom
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2025-04-04 17:34 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: character replace
  2025-04-04 17:34 ` Wolfgang Schuster
@ 2025-04-09  4:48   ` alan.caruanambom
  0 siblings, 0 replies; 4+ messages in thread
From: alan.caruanambom @ 2025-04-09  4:48 UTC (permalink / raw)
  To: ntg-context

Thanks, just what I needed!
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-09  4:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04  0:29 [NTG-context] character replace Alan Caruanambo
2025-04-04  0:36 ` [NTG-context] " alan.caruanambom
2025-04-04 17:34 ` Wolfgang Schuster
2025-04-09  4:48   ` alan.caruanambom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).