From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97753 Path: news.gmane.org!.POSTED!not-for-mail From: Mathias Schickel Newsgroups: gmane.comp.tex.context Subject: Font Fallbacks Date: Mon, 3 Apr 2017 15:04:25 +0200 Message-ID: <77C1597B-3918-4A5C-8038-17DA20CEB2ED@fa.uni-tuebingen.de> References: <58E14489.4030801@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: multipart/mixed; boundary="===============6334603220751769389==" X-Trace: blaine.gmane.org 1491224718 9001 195.159.176.226 (3 Apr 2017 13:05:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Apr 2017 13:05:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 03 15:05:07 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 1cv1fG-0000Lo-RJ for gctc-ntg-context-518@m.gmane.org; Mon, 03 Apr 2017 15:04:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E873384D5B; Mon, 3 Apr 2017 15:04:39 +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 T2GXHedl9tMX; Mon, 3 Apr 2017 15:04:38 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 1376384D55; Mon, 3 Apr 2017 15:04:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BB34984D55 for ; Mon, 3 Apr 2017 15:04:36 +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 XB9eauyVVfRd for ; Mon, 3 Apr 2017 15:04:36 +0200 (CEST) Original-Received: from mx03.uni-tuebingen.de (mx03.uni-tuebingen.de [134.2.5.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 24BA684D54 for ; Mon, 3 Apr 2017 15:04:26 +0200 (CEST) Original-Received: from math.uni-tuebingen.de (kyle.am10.uni-tuebingen.de [134.2.182.22]) by mx03.uni-tuebingen.de (Postfix) with ESMTPS id EDC7080C4E for ; Mon, 3 Apr 2017 15:04:25 +0200 (CEST) Original-Received: from [192.168.0.14] (ip-37-201-4-254.hsi13.unitymediagroup.de [37.201.4.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: msch) by math.uni-tuebingen.de (Postfix) with ESMTPSA id C67C11E0ADE for ; Mon, 3 Apr 2017 15:04:25 +0200 (CEST) In-Reply-To: X-Mailer: Apple Mail (2.3259) 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:97753 Archived-At: --===============6334603220751769389== Content-Type: multipart/alternative; boundary="Apple-Mail=_26F5C4A1-CA0D-44A1-B4BF-B85875308D60" --Apple-Mail=_26F5C4A1-CA0D-44A1-B4BF-B85875308D60 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Dear ConTeXt users, I have a question concerning font fallbacks in math fonts. I have not = been able to find an option to specify optical sizes in fallbacks. I = want to use Minion Math for the alphabetical symbols, and this font = ships with single font files for each optical size. So I am searching = for the right command to get for example the following behaviour: Use the CambriaMath fonts for mathematical symbols and use Minion Math = (Minion-Math-Regular.otf for standard size, Minion-Math-Caption.otf for = indices and Minion-Math-Tiny for sub-indices) for alphabetical symbols. Can anyone tell me which commands I have to use to achieve this? So the general question is paraphrased as follows: Use some font as a = general math font (here CambriaMath) and replace some symbols out of = another fonts that ships with single files for each optical size. One remark about that: Minion Math has supporting mkiv-files. So you can = use this font (specifying all optical sizes) by writing = \setupbodyfont[minion]. One could make use of that and maybe use a = command like \definefamilyfallback[MathFallback][family:minion][][force=3Dyes]. As far as I know a command like that does not exist at present. Maybe it = could be designed to take use of existing font definition files. And I have some similar problem: I do not like the mathematical symbols = of the STIX2 fonts that much (since they are mainly taken from STIX1) = and let us suppose now that I want to use again CambriaMath instead for = mathematical symbols. I was able to figure out the following commands = that nearly achieve what I want to get: = \definefontfallback[MathFallback][file:STIX2Math.otf][lowercasescript,uppe= rcasescript,lowercasefraktur,uppercasefraktur][force=3Dyes] % \starttypescriptcollection[stix2own] % \starttypescript [\s!math][stix2own][\s!all] \loadfontgoodies[cambria-math] \definefontsynonym[\s!MathRoman] [Cambria-Math] = [\s!features=3D{\s!math\mathsizesuffix},\s!designsize=3D\s!auto,\s!fallbac= ks=3D{MathFallback},\s!goodies=3Dcambria-math] \stoptypescript % \starttypescript [stix2own] \definetypeface [\typescriptone] [\s!mm] [\s!math] = [stix2own] [\s!default] \stoptypescript % \stoptypescriptcollection This font can be used by the command \setupbodyfont[stix2own]. The only problem is that STIX2 has design sizes embedded in the file = STIX2Math.otf that are used if I am using this file as whole for math, = but that are not used any longer using the mechanism defined above. That = means: If I use Cambria as Math font and replace the alphabetical = symbols out of STIX2Math.otf the optical sizes for indices are not used = any longer. What can be done to solve this second problem? One last question remains: I dislike the summation symbol of CambriaMath = (because it is too large in my eyes) and this is why I want to replace = it by the version of STIX2Math again (this symbols is indeed redesigned = in STIX2Math and looks very nice in my eyes). So I could add a second = font fallback that should be applied besides the one above. The unicode = slot of the summation symbol is 0x2211in STIX2Math. So I could define = \definefontfallback[SummationFallback][file:STIX2Math.otf][0x2211][force=3D= yes] and pass it as a second fallback as follows (changing the following line = in the example above): \definefontsynonym[\s!MathRoman] [Cambria-Math] = [\s!features=3D{\s!math\mathsizesuffix},\s!designsize=3D\s!auto,\s!fallbac= ks=3D{MathFallback,SummationFallback},\s!goodies=3Dcambria-math] The problem is that only one of those fallbacks is used if I pass two = arguments for fallbacks. Of course this problem can be solved easily if = I add the summation symbol to the list of replaced symbols in the first = fallback definition. But if I want to use a summation symbol out of = another font this trick does not work any longer. Besides there is a second problem in replacing the summation symbol in = the way described: Every time I am using $\sum$, ConTeXt uses the bigger = symbol designed for displayed formulas and not the one designed for = inline formulas. How can I solve this problem? Thank you very much for your assistance! If running minimal examples are = required I can of course provide them. But I hope someone understands = the fallback mechanism better than I do and then the minimal examples = written by me would be obsolete (besides the require some font = definition files which makes them more of less a little complex). = Besides because of Minion Math is commercial not everyone owns this font = an thus is unable to run the minimal example. Kind regards Mathias --Apple-Mail=_26F5C4A1-CA0D-44A1-B4BF-B85875308D60 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Dear ConTeXt users,

I have a question concerning font = fallbacks in math fonts. I have not been able to find an option to = specify optical sizes in fallbacks. I want to use Minion Math for the = alphabetical symbols, and this font ships with single font files for = each optical size. So I am searching for the right command to get for = example the following behaviour:

Use the CambriaMath fonts for = mathematical symbols and use Minion Math (Minion-Math-Regular.otf for = standard size, Minion-Math-Caption.otf for indices and Minion-Math-Tiny = for sub-indices) for alphabetical symbols.

Can anyone tell me which commands I = have to use to achieve this?

So the general question is paraphrased = as follows: Use some font as a general math font (here CambriaMath) and = replace some symbols out of another fonts that ships with single files = for each optical size.

One remark about that: Minion Math has supporting mkiv-files. = So you can use this font (specifying all optical sizes) by writing = \setupbodyfont[minion]. One could make use of that and maybe use a = command like

\definefamilyfallback[MathFallback][family:minion][<range = of symbols to be replaced>][force=3Dyes].

As far as I know a command like that = does not exist at present. Maybe it could be designed to take use of = existing font definition files.

And I have some similar problem: I do = not like the mathematical symbols of the STIX2 fonts that much (since = they are mainly taken from STIX1) and let us suppose now that I want to = use again CambriaMath instead for mathematical symbols. I was able to = figure out the following commands that nearly achieve what I want to = get:

\definefontfallback[MathFallback][file:STIX2Math.otf][lowercase= script,uppercasescript,lowercasefraktur,uppercasefraktur][force=3Dyes]
%
\starttypescriptcollection[stix2own]
= %
\starttypescript = [\s!math][stix2own][\s!all]
        = \loadfontgoodies[cambria-math]
        = \definefontsynonym[\s!MathRoman] [Cambria-Math] = [\s!features=3D{\s!math\mathsizesuffix},\s!designsize=3D\s!auto,\s!= fallbacks=3D{MathFallback},\s!goodies=3Dcambria-math]
    = \stoptypescript
%
= \starttypescript [stix2own]
    =      \definetypeface [\typescriptone] = [\s!mm] [\s!math]  [stix2own] [\s!default]
= \stoptypescript
= %
\stoptypescriptcollection

This font can be used by = the command \setupbodyfont[stix2own].

The only problem is that STIX2 has = design sizes embedded in the file STIX2Math.otf that are used if I am = using this file as whole for math, but that are not used any longer = using the mechanism defined above. That means: If I use Cambria as Math = font and replace the alphabetical symbols out of STIX2Math.otf the = optical sizes for indices are not used any longer.

What can be done to = solve this second problem?

One last question remains: I dislike the summation symbol of = CambriaMath (because it is too large in my eyes) and this is why I want = to replace it by the version of STIX2Math again (this symbols is indeed = redesigned in STIX2Math and looks very nice in my eyes). So I could add = a second font fallback that should be applied besides the one above. The = unicode slot of the summation symbol is 0x2211in STIX2Math. So I = could define

\definefontfallback[SummationFallback][file:STIX2Math.otf][0x22= 11][force=3Dyes]

and pass it as a second fallback as follows (changing the = following line in the example above):

\definefontsynonym[\s!MathRoman] [Cambria-Math] = [\s!features=3D{\s!math\mathsizesuffix},\s!designsize=3D\s!auto,\s!= fallbacks=3D{MathFallback,SummationFallback},\s!goodies=3Dcambria-math]

The problem is = that only one of those fallbacks is used if I pass two arguments for = fallbacks. Of course this problem can be solved easily if I add the = summation symbol to the list of replaced symbols in the first fallback = definition. But if I want to use a summation symbol out of another font = this trick does not work any longer.

Besides there is a second problem in = replacing the summation symbol in the way described: Every time I am = using $\sum$, ConTeXt uses the bigger symbol designed for displayed = formulas and not the one designed for inline formulas. How can I solve = this problem?

Thank you very much for your assistance! If running minimal = examples are required I can of course provide them. But I hope someone = understands the fallback mechanism better than I do and then the minimal = examples written by me would be obsolete (besides the require some font = definition files which makes them more of less a little complex). = Besides because of Minion Math is commercial not everyone owns this font = an thus is unable to run the minimal example.

Kind regards
Mathias

= --Apple-Mail=_26F5C4A1-CA0D-44A1-B4BF-B85875308D60-- --===============6334603220751769389== 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 --===============6334603220751769389==--