ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: substituting characters in math font
Date: Wed, 18 Oct 2017 20:27:54 +0200	[thread overview]
Message-ID: <59E79D2A.4090404@gmail.com> (raw)
In-Reply-To: <CAFMOkGVKtyujYhkBNYepBZKtdjqDv4E-v69a5LS9-=TR5d2-bQ@mail.gmail.com>


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



> Alan Bowen <mailto:bowenalan03@gmail.com>
> 2. Oktober 2017 um 14:04
> I need to substitute the regular and italic characters of a 
> publisher’s non-math font (Unicode) for those in a math font.
>
> The non-math addresses are:
> 0041-005A, 0061-007A %italic uppercase and lowercase
> 0391-03A9, 03B1-03C9  %slanted Greek uppercase and lowercase
>
> The math addresses are:
> 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase
> 1D6E2-1D6FA, 1D6FC-1D714  %slanted Greek uppercase and lowercase
>
> Is there a way to use the \definefallbackfamily mechanism that does 
> not assume that the characters have the same Unicode addresses? Or is 
> some other approach required?
The fallback mechanism provides a offset key which lets you replace a 
math character with a normal text character.

\definefontfamily     [mainface] [ss] [TeX Gyre Heros]

\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:lowercasenormal]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:lowercaseitalic]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[tf=style:italic,range=0x68,offset=0x210E]% lowercase italic h
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:lowercasebold]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:uppercasenormal]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] 
[preset=math:uppercasebold]

\definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]

\starttext

\setupbodyfont[pagella]

Lowercase: $ {\tf abc} {\it abc} {\bf abc} $

Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $

\setupbodyfont[mainface]

Lowercase: $ {\tf abc} {\it abch} {\bf abc} $

Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $

\stoptext

Wolfgang

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2017-10-18 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 12:04 Alan Bowen
2017-10-18 13:07 ` Alan Bowen
2017-10-18 18:27   ` Wolfgang Schuster [this message]
2017-10-19 13:05     ` Alan Bowen
2017-10-27 19:48       ` Henning Hraban Ramm
2017-10-28  8:46       ` Wolfgang Schuster
2017-10-29 13:30         ` Alan Bowen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59E79D2A.4090404@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).