ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan Bowen <bowenalan03@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: substituting characters in math font
Date: Thu, 19 Oct 2017 09:05:12 -0400	[thread overview]
Message-ID: <CAFMOkGXNebdKqK2QhMeE9CqA1GaH_3AUCcBsoQJ226ZhCNLm2g@mail.gmail.com> (raw)
In-Reply-To: <59E79D2A.4090404@gmail.com>


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

Many thanks for this, Wolfgang. That is very helpful. Right now, then, I
have:

\definefontfamily[mainface][rm][Brill]
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]
\definefallbackfamily [mainface] [rm] [Brill]
[tf=style:italic, range={0x03B8}, offset={0x03D1}]%Greek theta

\definefallbackfamily[mainface][mm][Brill]
[range={0x30-0x39}] %oldstyle numerals, normal

\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasenormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:lowercaseitalic]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasenormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:uppercaseitalic]

\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:lowercasegreeknormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:lowercasegreekitalic]
\definefallbackfamily [mainface] [mm]
[Brill][preset=math:uppercasegreeknormal]
\definefallbackfamily [mainface] [mm] [BrillItalic]
[preset=math:uppercasegreekitalic]

\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]

\setupmathematics[ucgreek=normal, lcgreek=italic]

\setupbodyfont[mainface,10pt]


\starttext

normal: 1234567890\quad math: \m{1234567890}

normal: ABCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red
ABCDEFabcdef}

normal: ΑΒΓΔΕΘαβγδεθ\quad slanted: \emph{ΑΒΓΔΕΘαβγδεθ}\quad math: \m{\red
ΑΒΓΔΕΘαβγδεθ}

Greek theta: \emph{θ}

\stoptext

As you can see, all I need is to get the Brill lowercase Greek in mathmode
and the proper slanted Greek theta. I have tried this with Pagella and
Cambria instead of the Brill font and the problem persists. So I must be
doing something wrong. But what?

Alan

On Wed, Oct 18, 2017 at 2:27 PM, Wolfgang Schuster <
schuster.wolfgang@gmail.com> wrote:

>
>
> Alan Bowen <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
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 10725 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-19 13:05 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
2017-10-19 13:05     ` Alan Bowen [this message]
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=CAFMOkGXNebdKqK2QhMeE9CqA1GaH_3AUCcBsoQJ226ZhCNLm2g@mail.gmail.com \
    --to=bowenalan03@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).