From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/99349 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: substituting characters in math font Date: Wed, 18 Oct 2017 20:27:54 +0200 Message-ID: <59E79D2A.4090404@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3498245319216149993==" X-Trace: blaine.gmane.org 1508351303 31591 195.159.176.226 (18 Oct 2017 18:28:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2017 18:28:23 +0000 (UTC) User-Agent: Postbox 5.0.17 (Macintosh/20170814) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 18 20:28:18 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 1e4t4d-0006eF-IN for gctc-ntg-context-518@m.gmane.org; Wed, 18 Oct 2017 20:28:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 697E11021B5B; Wed, 18 Oct 2017 20:28:12 +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 Z72r0ZW8EkOb; Wed, 18 Oct 2017 20:28:11 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id C17FD1021B53; Wed, 18 Oct 2017 20:28:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 271731021B53 for ; Wed, 18 Oct 2017 20:28:10 +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 XNipF79ei95N for ; Wed, 18 Oct 2017 20:28:09 +0200 (CEST) Original-Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) (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 AA5011021598 for ; Wed, 18 Oct 2017 20:27:59 +0200 (CEST) Original-Received: by mail-wr0-f178.google.com with SMTP id r79so5974295wrb.13 for ; Wed, 18 Oct 2017 11:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=xHd9tpgaqmXVLwEO9FyWop+PQEf6r9/nBevXE6Dgou8=; b=P2Hd222WZ1NcSilo8viPqiKjX9kLPLrSmaXuThLdn6EJJVX2qX56Tl4xLlrzb0oddV glCnDSrvhBq3ZlkYvly0UFF0qFbaUtQ+bRetFIgWix7wqrnv2y3Njzm4KL1S5KUxqprb PXqAQ8Q21xuopmlDHIWda10P34U2AcTF1euKXMloO6IC0d+WCafVjm+YxHsAv6n2nAxY 0TdSxS2NlcG66wapIICWQXNiadiK3WQu7x1k0uuaJIsyaeseRuzbae1tBMOqO35L7Zlw aF7Zy/nxCXquBM9uMghPFeFrxhMK5BtRWP/SsbYMeSA1b+r5DJ+TmpMBiMj55e/hBnF7 774A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=xHd9tpgaqmXVLwEO9FyWop+PQEf6r9/nBevXE6Dgou8=; b=DlnlcdSCWJokfRSpy2CMylSBB6pCqrqe89wr9Y1zZHOwFxYEBd0RMZAqUbe69/LTc6 1McWv9fOvGaPVfrQw4uWkPMa7jbotFpj2JbDIVKJohj6fB9xhismFAEzYCgmb3i1E4lX OqAz4gk6ZJPWVPMd8WfwiZEN9KVlYrls/etBZC4pXD7vvXC1v9aXLlLxBcYXWDAjrKUz 9xCBe0ktH6etUkq6SmfxzKR/rI8xhGQQ6St5beuOIm3LPlya7LbANYRL6QUcJk3WkarJ 48PngRkpoGkJPnBZgocpgIdDJCsa2ZJK0eYWaDRf0FevTD9t0nAtUN1SCTSA7vPEdln4 FI2w== X-Gm-Message-State: AMCzsaXHf0Nrf/3IsfdoMg7e8K+kVO9sDLYSbd+276/PkBZE48tfno8P 9oEkOuCAComHjw1n13qQCNksR87D X-Google-Smtp-Source: ABhQp+SaOSE2Zks38vQnGTCjTfEuMnDcAYeQP615YoTJizn5wqnznZyk5GpwHRuuOfzz9XiemKA+NA== X-Received: by 10.223.184.15 with SMTP id h15mr6936065wrf.11.1508351278624; Wed, 18 Oct 2017 11:27:58 -0700 (PDT) Original-Received: from [192.168.1.9] (x4e319802.dyn.telefonica.de. [78.49.152.2]) by smtp.gmail.com with ESMTPSA id 29sm11225797wrz.77.2017.10.18.11.27.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 11:27:57 -0700 (PDT) In-Reply-To: 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:99349 Archived-At: This is a multi-part message in MIME format. --===============3498245319216149993== Content-Type: multipart/alternative; boundary="------------030108020301030309060007" This is a multi-part message in MIME format. --------------030108020301030309060007 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Alan Bowen > 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 --------------030108020301030309060007 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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
--------------030108020301030309060007-- --===============3498245319216149993== 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 --===============3498245319216149993==--