From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/99359 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: substituting characters in math font Date: Thu, 19 Oct 2017 09:05:12 -0400 Message-ID: References: <59E79D2A.4090404@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6805627076420349061==" X-Trace: blaine.gmane.org 1508418415 1164 195.159.176.226 (19 Oct 2017 13:06:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2017 13:06:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 19 15:06:44 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5AWs-00063v-1c for gctc-ntg-context-518@m.gmane.org; Thu, 19 Oct 2017 15:06:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DCC131021C04; Thu, 19 Oct 2017 15:05:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mhMvz5xay0WG; Thu, 19 Oct 2017 15:05:27 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 229FD10203D3; Thu, 19 Oct 2017 15:05:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CD75910203D3 for ; Thu, 19 Oct 2017 15:05:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cQHpTq-EKcmv for ; Thu, 19 Oct 2017 15:05:24 +0200 (CEST) Original-Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7CE0810203CE for ; Thu, 19 Oct 2017 15:05:14 +0200 (CEST) Original-Received: by mail-ua0-f171.google.com with SMTP id n38so5902531uai.11 for ; Thu, 19 Oct 2017 06:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=T+DWujQZMncaYoBOwYeVbwbIyPlVCLP3DF2ryEKywYM=; b=J39WjhJ7htsG4uj5iTHz7yUAhhdHUNhnU28MsP58zWC2Urq6jIF6YwlcamKIF1Y19R DPQu/ZOZJAHvddO0Z33eTQ88OmyqlrrCaO7JxB0bDz+fW3PkUtH44bhWgrKiSq35sg5U G0e0qSg1rGVlzF3SfhvbFJ1sbxZrD2d1pO4iSBnXnri1g2uRMIav/EE36W9hIK/A2nRB gjHpa8x/LW2lRPkX0wkhjZ72esoAUglCl3/KFgi/bG0bS5nuDIb70DUCukDCoRi45Na7 j4rT84rE1vQ6VvJrQv2nauysc3PiM55Nl+093otW6cHXM4byT3u8YiTl1iMLIy21GiHG bE1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=T+DWujQZMncaYoBOwYeVbwbIyPlVCLP3DF2ryEKywYM=; b=gv6Off9N+icxtNC4+dewzMlbn+cwxM3rtlES0I+aJPx9m8MywYQw8auchViNNsTAwr asSzQ4IiFQm/ygha6AsIqAz31wFKdtMNRxcX1Y1RSQfw39VkTXbytVb3YtPvuB2v8PMI RZ/j/qmRH3CForFTVBpgPO19ySVpS+pg8vSQhyfxpW7AFGdPdlOfQ3QlFoz/gGRe2Otk yW7b5tdcZrUmA6GiPkfwZJ0mddnBafcKnGitd27Rr0j7HXGCK/7gbif6o2F/GGqLF1mW MVIBBbMmp7Fp8vHL0ss3eq4Zsid/f6CwWDQl4rtJoDg+/jYFMwrCmVl0IPN/sbqB7gEE spIA== X-Gm-Message-State: AMCzsaW7I3XqSalpgTF42fDpCgVw2jRm8Vn1buDba40o4WMkRO1gs9B4 0G+tsM5ljdlNeBxfDdoZwYs3cJ4B8hdhv7C9fHWaOw== X-Google-Smtp-Source: ABhQp+RJJWFly0Fl14gjL9nv5IeFdUn2l5kTMlXKhe35K1sqDCxhOsSTEB0w+f3NA9oM68UVCbOHxh8cDSRqSulIWeo= X-Received: by 10.176.80.3 with SMTP id b3mr1159527uaa.1.1508418312802; Thu, 19 Oct 2017 06:05:12 -0700 (PDT) Original-Received: by 10.31.221.67 with HTTP; Thu, 19 Oct 2017 06:05:12 -0700 (PDT) In-Reply-To: <59E79D2A.4090404@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:99359 Archived-At: --===============6805627076420349061== Content-Type: multipart/alternative; boundary="94eb2c18ee3eb5159a055be60110" --94eb2c18ee3eb5159a055be60110 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Many thanks for this, Wolfgang. That is very helpful. Right now, then, I have: \definefontfamily[mainface][rm][Brill] [protrusion=3Dquality, expansion=3Dquality, mode=3Dnode, force=3Dyes, ] \definefallbackfamily [mainface] [rm] [Brill] [tf=3Dstyle:italic, range=3D{0x03B8}, offset=3D{0x03D1}]%Greek theta \definefallbackfamily[mainface][mm][Brill] [range=3D{0x30-0x39}] %oldstyle numerals, normal \definefallbackfamily [mainface] [mm] [Brill] [preset=3Dmath:lowercasenorma= l] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:lowercaseitalic] \definefallbackfamily [mainface] [mm] [Brill] [preset=3Dmath:uppercasenorma= l] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:uppercaseitalic] \definefallbackfamily [mainface] [mm] [Brill] [preset=3Dmath:lowercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:lowercasegreekitalic] \definefallbackfamily [mainface] [mm] [Brill][preset=3Dmath:uppercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:uppercasegreekitalic] \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=3D0.94] \setupmathematics[ucgreek=3Dnormal, lcgreek=3Ditalic] \setupbodyfont[mainface,10pt] \starttext normal: 1234567890\quad math: \m{1234567890} normal: ABCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red ABCDEFabcdef} normal: =CE=91=CE=92=CE=93=CE=94=CE=95=CE=98=CE=B1=CE=B2=CE=B3=CE=B4=CE=B5= =CE=B8\quad slanted: \emph{=CE=91=CE=92=CE=93=CE=94=CE=95=CE=98=CE=B1=CE=B2= =CE=B3=CE=B4=CE=B5=CE=B8}\quad math: \m{\red =CE=91=CE=92=CE=93=CE=94=CE=95=CE=98=CE=B1=CE=B2=CE=B3=CE=B4=CE=B5=CE=B8} Greek theta: \emph{=CE=B8} \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 > 2. Oktober 2017 um 14:04 > I need to substitute the regular and italic characters of a publisher=E2= =80=99s > 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 mat= h > character with a normal text character. > > \definefontfamily [mainface] [ss] [TeX Gyre Heros] > > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath:lowercasenormal] > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath:lowercaseitalic] > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [tf=3Dstyle:italic,range=3D0x68,offset=3D0x210E]% lowercase italic h > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath:lowercasebold] > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath:uppercasenormal] > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath:uppercaseitalic] > \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] > [preset=3Dmath: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 > ____________________________________________________________ > _______________________ > --94eb2c18ee3eb5159a055be60110 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Many thanks for this, Wolfgang. That is very h= elpful. Right now, then, I have:

\d= efinefontfamily[mainface][rm][Brill]
[protrusion=3Dquality,
expansion=3Dquality,= =C2=A0
mode=3Dnode,
force=3Dyes,
]
\definefallbackfamily [mainface] [rm] [Brill]=C2=A0
[tf=3Ds= tyle:italic, range=3D{0x03B8}, offset=3D{0x03D1}]%Greek theta
<= div class=3D"gmail_default">
=
\definefallbackf= amily[mainface][mm][Brill]
[range=3D{0x30-0x39}] %oldstyle numerals, normal=

\definefa= llbackfamily [mainface] [mm] [Brill] [preset=3Dmath:lowercasenormal]=
\definefal= lbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:lowercaseitalic]
\defi= nefallbackfamily [mainface] [mm] [Brill] [preset=3Dmath:uppercasenormal]
\defin= efallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:uppercaseitali= c]
<= br>
= \definefallbackfamily [mainface] [mm] [Brill] [preset=3Dmath:lowercasegreek= normal]
\definefallbackfamily [mainface] [mm] [BrillItalic] [preset=3Dmath:lowe= rcasegreekitalic]
\definefallbackfamily [mainface] [mm] [Brill][preset=3Dmath:u= ppercasegreeknormal]
\definefallbackfamily [mainface] [mm] [BrillItalic] [prese= t=3Dmath:uppercasegreekitalic]

\definefontfamily[mainface][mm][TeX Gyre Termes Math]= [scale=3D0.94]

\setupmathematics[ucgreek=3Dnormal, lcgreek=3Ditalic]

\setupbodyfo= nt[mainface,10pt]


\starttext

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

normal: A= BCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red ABCDEFabcde= f}
<= br>
= normal: =CE=91=CE=92=CE=93=CE=94=CE=95=CE=98=CE=B1=CE=B2=CE=B3=CE=B4=CE=B5= =CE=B8\quad slanted: \emph{=CE=91=CE=92=CE=93=CE=94=CE=95=CE=98=CE=B1=CE=B2= =CE=B3=CE=B4=CE=B5=CE=B8}\quad math: \m{\red =CE=91=CE=92=CE=93=CE=94=CE=95= =CE=98=CE=B1=CE=B2=CE=B3=CE=B4=CE=B5=CE=B8}

Greek theta: \emph{=CE=B8}<= /div>

=
\stoptext<= /font>
=
As= you can see, all I need is to get the Brill lowercase Greek in mathmode an= d the proper slanted Greek theta. I have tried this with Pagella and Cambri= a instead of the Brill font and the problem persists. So I must be doing so= mething wrong. But what?

Alan

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


2.=20 Oktober 2017 um 14:04
I=20 need to substitute the regular and italic characters of a publisher=E2=80= =99s=20 non-math font (Unicode) for those in a math font.

=
The non-math addresses are:
0041-005A, 0= 061-007A %italic=20 uppercase and lowercase
0391-03A9, 03B1-0= 3C9 =C2=A0%slanted=20 Greek uppercase and lowercase

The math addresses are:
1D434-1D44D, 1D44E-1= D467 %italic=20 uppercase and lowercase
1D6E2-1D6FA, = 1D6FC-1D714 =C2=A0%slanted Greek uppercase and lowercase

Is there a way to use the \definefallbackfamily=20 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=20 math character with a normal text character.

\definefontfamily=C2=A0=C2=A0=C2=A0=C2=A0 [mainface] [ss] [TeX Gyre Heros]<= br>
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:lowercasenormal]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:lowercaseitalic]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [tf=3Dstyle:italic,range=3D0x68,offset=3D0x210E]% lowercase italic h \definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:lowercasebold]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:uppercasenormal]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros]=20 [preset=3Dmath:uppercasebold]

\definefontfamily=C2=A0=C2=A0=C2=A0=C2=A0 [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 t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context=
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________

--94eb2c18ee3eb5159a055be60110-- --===============6805627076420349061== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============6805627076420349061==--