ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Zhichu Chen <chenzhichu@sinap.ac.cn>
To: <ntg-context@ntg.nl>
Subject: Re: Virtual font question
Date: Wed, 24 Jun 2015 18:33:09 +0800	[thread overview]
Message-ID: <558A8765.6080506@sinap.ac.cn> (raw)
In-Reply-To: <5588ECB6.9020904@sinap.ac.cn>


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

Hi everybody,

I finally got my typescript work. It was the "serif" typeface that 
failed me. When I defined the fixed size type:
===================================================================
         \definetypeface [mathtimespro] [rm] [serif] [times]     [default]
         \definetypeface [mathtimespro] [ss] [sans] [helvetica] 
[default] [rscale=0.9]
         \definetypeface [mathtimespro] [tt] [mono] [courier]   
[default] [rscale=1.1]
         \definetypeface [mathtimespro] [mm] [math] [mathtimespro]    
[default]
===================================================================
where mathtimespro in the last line was defined as:
===================================================================
         \definefontsynonym [MathTimeProA-Regular] 
[MTP06A-Regular@mtpro06a-regular]
===================================================================
Everything was fine. But the designsize version needs to be:
===================================================================
         \definetypeface [mathtimespro] [rm] [serif] [times]     
[default][designsize=auto]
         \definetypeface [mathtimespro] [ss] [sans]  [helvetica] 
[default] [rscale=0.9]
         \definetypeface [mathtimespro] [tt] [mono]  [courier] [default] 
[rscale=1.1]
         \definetypeface [mathtimespro] [mm] [math] [mathtimespro]    
[default][designsize=auto]
===================================================================
Without the last parameter in the serif definition, the math font could 
not be remapped (WHY???).

Fix me if I'm wrong about this conclusion.


Best regards,
Zhichu

On 06/23/2015 01:20 PM, Zhichu Chen wrote:
> 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
>> ___________________________________________________________________________________
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 11444 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2015-06-24 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 16:47 Zhichu Chen
2015-06-23  3:57 ` Aditya Mahajan
2015-06-23  5:20   ` Zhichu Chen
2015-06-24 10:33     ` Zhichu Chen [this message]

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=558A8765.6080506@sinap.ac.cn \
    --to=chenzhichu@sinap.ac.cn \
    --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).