From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91762 Path: news.gmane.org!not-for-mail From: Zhichu Chen Newsgroups: gmane.comp.tex.context Subject: Re: Virtual font question Date: Tue, 23 Jun 2015 13:20:54 +0800 Message-ID: <5588ECB6.9020904@sinap.ac.cn> References: <55883C0B.4050309@sinap.ac.cn> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0621660002==" X-Trace: ger.gmane.org 1435037088 12123 80.91.229.3 (23 Jun 2015 05:24:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2015 05:24:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 23 07:24:34 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7GhG-00066n-Go for gctc-ntg-context-518@m.gmane.org; Tue, 23 Jun 2015 07:24:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BA47810257 for ; Tue, 23 Jun 2015 07:24:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZORgehlLatg5 for ; Tue, 23 Jun 2015 07:24:32 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 973A710262 for ; Tue, 23 Jun 2015 07:23:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 23A6710214 for ; Tue, 23 Jun 2015 07:23:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MrMUifpeP_07 for ; Tue, 23 Jun 2015 07:23:52 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 537051020A for ; Tue, 23 Jun 2015 07:23:51 +0200 (CEST) Original-Received: from sinapcas01.sinap.ac.cn (sinapcas01.sinap.ac.cn [210.72.8.15]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t5N5NiHo028098 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Tue, 23 Jun 2015 07:23:47 +0200 Original-Received: from [192.168.1.134] (180.162.52.114) by sinapcas01.sinap.ac.cn (210.72.8.5) with Microsoft SMTP Server id 14.1.438.0; Tue, 23 Jun 2015 13:23:38 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: X-Originating-IP: [180.162.52.114] X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=210.72.8.15; country=CN; region=Beijing Shi; city=Beijing; latitude=39.9289; longitude=116.3883; http://maps.google.com/maps?q=39.9289,116.3883&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07OHFnK9H - 08c7e3d0390c - 20150623 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of chenzhichu@sinap.ac.cn designates 210.72.8.15 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=210.72.8.15; envelope-from=; helo=sinapcas01.sinap.ac.cn; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . 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:91762 Archived-At: --===============0621660002== Content-Type: multipart/alternative; boundary="------------000002000003060002070008" --------------000002000003060002070008 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Hi Aditya, On 06/23/2015 11:57 AM, Aditya Mahajan wrote: > I don't have the fonts, so I cannot describe the exact method. But see > below and also have a look at Section 5 of > https://www.tug.org/TUGboat/tb30-2/tb95mahajan-cmath.pdf The > description is old, and some of the file locations have changes, but > the basic infrastructure is still the same. Thank you for sharing this article. It seems that the =================================================================== return { mathematics = { mapfiles = { "mtpro2.map", }, virtuals = { ["mtpro06a-regular"] = { ... =================================================================== codes may have done the job in the mathematics.make_font function. In this snippet: =================================================================== \definefontsynonym [LMMathRoman10-Regular] [LMMath10-Regular@lmroman10-math] =================================================================== I know that LMMathRoman10-Regular will be used as the font synonym, @lmroman10-math is the virtual font, but what does LMMath10-Regular stand for? I chose some random names in my typescript but maybe there's some magic there? > The vectors mptpro2-mi etc are not defined. Look at math-ttv.lua for a > list of predefined vectors (mapping type1 fonts to unicode symbols. It > is quite likely that the mtpro fonts would follow the "standard" > mappings; if not, you will need to create an approrpriate mapping for > each font. This is not difficult (just monotonous). I've already defined these vectors in the same .lfg file. What a tedious work it was, by the way. I thought that would be irrelevant, so I skipped those codes. I'm sorry I didn't make that clear. I almost forgot to mention. The font has its own \Relbar and \relbar characters rather than the equality and the dash marks. What is the best way to use them? I currently put them in a private-use-area slot in the vectors' definitions, but I'm not sure that's a good solution. > >> =================================================================== >> I guess the suffixes "f" "s" and "t" may correspond to "five" "seven" >> and "ten", but that's >> not important. I could use one of them as the virtual font in the >> typescript: > > Once this is done, rest of the typescript should work. It may be a > good idea to try to see if you can get roman letters from mtpro. If I claimed the font synonym with the virtual font directly: =================================================================== # typescripts \definefontsynonym [\s!MathRoman] [MTPro10a-Regular@mtpro10a-regular] =================================================================== the 10-size-version fonts were loaded without any problem. But if I want to use the designsize feature: =================================================================== -- lfg designsizes = { ["MathTimeProA-Regular"] = { ["4pt"] = "MTPro06a-Regular@mtpro06a-regular", ["5pt"] = "MTPro06a-Regular@mtpro06a-regular", ["6pt"] = "MTPro06a-Regular@mtpro06a-regular", ... # typescripts \definefontsynonym [\s!MathRoman] [\v!file:mathtimeproa-regular] =================================================================== the mathtimeproa-regular font could not be remapped to the correct virtual font with the appropriate size. I just want to know how type-imp-ebgaramond.mkiv managed to remap the designsize filename "file:ebgaramond-regular" to "file:EBGaramond12-Regular". > > Aditya > ___________________________________________________________________________________ > > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ --------------000002000003060002070008 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya,


On 06/23/2015 11:57 AM, Aditya Mahajan wrote:
I don't have the fonts, so I cannot describe the exac= t method. But see below and also have a look at Section 5 of
https://www.tug.org/TUGboat/tb30-2/tb95= mahajan-cmath.pdf The description is old, and some of the file locations have changes, but the basic infrastructure is still the same.
Thank you for sharing this article. It seems that the
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
return {
=C2=A0=C2=A0=C2=A0 mathematics =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mapfiles =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 "mtpro2.map",
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 virtuals =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ["mtpro06a-regular"] =3D {
...
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
codes may have done the job in the mathematics.make_font function.

In this snippet:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
\definefontsynonym
=C2=A0 [LMMathRoman10-Regular]
=C2=A0 [LMMath10-Regular@lmroman10-math]

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I know that LMMathRoma= n10-Regular will be used as the font synonym, @lmroman10-math is the
virtual font, but what does LMMath10-Regular stand for? I chose some random names in my typescript
but maybe there's some magic there?
The vectors mptpro2-mi etc are not defined. Look at math-ttv.lua for a list of predefined vectors (mapping type1 fonts to unicode symbols. It is quite likely that the mtpro fonts would follow the "standard" mappings; if not, you will need to create an approrpriate mapping for each font. This is not difficult (just monotonous).
I've already defined these vectors in the same .lfg file. What a tedious work it was, by the way. I thought
that would be irrelevant, so I skipped those codes. I'm sorry I didn't make that clear.

I almost forgot to mention. The font has its own \Relbar and \relbar characters rather than the equality
and the dash marks. What is the best way to use them? I currently put them in a private-use-area slot
in the vectors' definitions, but I'm not sure that's a good solution.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
I guess the suffixes "f" "s" and "t" may correspond to "five" "seven" and "ten", but that's
not important. I could use one of them as the virtual font in the typescript:

Once this is done, rest of the typescript should work. It may be a good idea to try to see if you can get roman letters from mtpro.
If I claimed the font synonym with the virtual font directly:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
# typescripts
\definefontsynonym [\s!MathRoman]=C2=A0=C2=A0=C2=A0=C2=A0 [MTPro10a-Regular@mtpro10a-regular]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
the 10-size-version fonts were loaded without any problem. But if I want to use the designsize feature:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-- lfg
=C2=A0=C2=A0=C2=A0 designsizes =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ["MathTimeProA-Re= gular"] =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ["4pt"]=C2=A0 =3D "MTPro06a-Regular@mtpro06a-regular", =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ["5pt"]=C2=A0 =3D "MTPro06a-Regular@mtpro06a-regular", =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ["6pt"]=C2=A0 =3D "MTPro06a-Regular@mtpro06a-regular", =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ...
# typescripts
\definefontsynonym [\s!MathRoman]=C2=A0=C2=A0=C2=A0=C2=A0 [\v!file:mathtimeproa-regular]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
the mathtimeproa-regul= ar font could not be remapped to the correct virtual font with the appropriate size.
I just want to know how type-imp-ebgaramond.mkiv managed to remap the designsize filename
"file:ebgaramond-regular" to "file:EBGaramond12-Reg= ular".

Aditya
_________________________________________________________________________= __________
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=C2=A0 :
http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/project= s/contextrev/
wiki=C2=A0=C2=A0=C2=A0=C2=A0 : http://contextgarden.net
_________________________________________________________________________= __________

--------------000002000003060002070008-- --===============0621660002== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0621660002==--