ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Elspeth McGullicuddy <elspethmcgullicuddy@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: kpfonts, math, type 1 font
Date: Tue, 7 Jan 2014 04:35:18 +0100	[thread overview]
Message-ID: <CAGMMSTC5OajPQYNKu4e6vsQmAxEqfwUo+Y4vbbV2WN5VYfpMkg@mail.gmail.com> (raw)
In-Reply-To: <DE25C76C-01AF-436D-9925-200F91A3C502@gmail.com>

Thanks for the quick answer.

I'm not completely sure about the "lua" files for math support that I
should use as "template".
The Palatino one I haven't found;
The Garamond-math one might be that: "mdugm-math.lfg:

return {
    name = "mdugm-math",
    version = "1.00",
    comment = "Math fonts that complement URW Garamond.",
    author = "Hans, Mojca, Aditya",
    copyright = "ConTeXt development team",
    mathematics = {
        mapfiles = {
            "mdugm.map",
            "mkiv-base.map",
        },
        virtuals = {
            ["mdugm-rm"] = {
                { name = "file:ugmr8a", features = "virtualmath", main = true },
                { name = "mdugmr7m",  vector = "tex-mr", skewchar=0x7F },
                { name = "mdugmri7m", vector = "tex-mi", skewchar=0x7F },
                { name = "mdugmri7m", vector = "tex-it", skewchar=0x7F },
                { name = "mdugmm7m",  vector = "tex-bf", skewchar=0x7F },
                { name = "mdugmmi7m", vector = "tex-bi", skewchar=0x7F },
                { name = "mdugmr7y",  vector = "tex-sy",
skewchar=0x30, parameters = true },
                { name = "mdugmr7v",  vector = "tex-ex", extension = true },
                { name = "mdugmrma",  vector = "tex-ma" },
                { name = "mdugmrmb",  vector = "tex-mb" },
            },
            ["mdugm-bf"] = {
                { name = "file:ugmm8a", features = "virtualmath", main = true },
                { name = "mdugmm7m",  vector = "tex-mr", skewchar=0x7F },
                { name = "mdugmmi7m", vector = "tex-mi", skewchar=0x7F },
                { name = "mdugmmi7m", vector = "tex-it", skewchar=0x7F },
                { name = "mdugmm7y",  vector = "tex-sy",
skewchar=0x30, parameters = true },
                { name = "mdugmm7v",  vector = "tex-ex", extension = true },
                { name = "mdugmmma",  vector = "tex-ma" },
                { name = "mdugmmmb",  vector = "tex-mb" },
            }
        }
    }
}

In this example, I believe the files involved are tfm files
(ugmr8a.tfm, mdugmr7m.vf, in
http://packages.debian.org/squeeze/all/texlive-fonts-extra/filelist)

Note: the afm files of kpfonts are ziped in the doc directory.
And I've got vf files, 688 of them.

If you have other examples which I could be sure about, I'd be glad to
have them.

Regards,
Chris

On Tue, Jan 7, 2014 at 12:09 AM, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:
>
> Am 06.01.2014 um 19:56 schrieb Elspeth McGullicuddy <elspethmcgullicuddy@gmail.com>:
>
>> Hi everybody,
>> (best wishes for this new year by the way).
>>
>> There is this font:
>> http://www.ctan.org/pkg/kpfonts
>> Which is a postscript type 1 font, text and math.
>>
>> I've copied the files in the right places in the ${HOME}/texmf tree.
>> And a call to:
>> mtxrun --script fonts --list --all --pattern=*kp*, after a
>> mtxrun --script fonts --reload
>> seems to indicate that it is found by context all right.
>>
>> But now I haven't got the faintest idea on how to use it in a ConTEXt
>> document -- text + math.
>> My ConTEXt is beta not older than a fortnight.
>>
>> All examples I've found that could possibly apply were at least far
>> too complicate for my understanding, also likely outdated.
>
> Using a text font in type1-format is very easy, all you need is the afm and the pfb-file.
>
> The font files are put in the tex folder and to use them in your document you have to write a short typescript, below is a example how to use the urn garamond font.
>
> \starttypescript [serif] [charter]
>   \setups[font:fallback:serif]
>   \definefontsynonym [Serif] [file:ugmr8a.afm] [features=complete]
> \stoptypescript
>
> \definetypeface [mainface] [rm] [serif] [charter] [default]
>
> \setupbodyfont[mainface]
>
> \starttext
> \input knuth
> \stoptext
>
> The same has to be done for the kpfont but there is one problem, the archive on cyan doesn’t provide afm-files and you have to generate them yourself. Since the font provides only tfm-files it would be also possible to them but it’s better to work with afm-files.
>
>
> Adding support for the math font requires more work because you have to write also a Lua file where you specify which file is used for symbols, operator, letters etc. This isn’t very complicated (you can just modify the files for palatino or garamond math), you have to only look which files are used for the math fonts.
>
> 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://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
___________________________________________________________________________________

  reply	other threads:[~2014-01-07  3:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 18:56 Elspeth McGullicuddy
2014-01-06 23:09 ` Wolfgang Schuster
2014-01-07  3:35   ` Elspeth McGullicuddy [this message]
2014-01-07 15:32     ` Hans Hagen
2014-01-07 19:39       ` Elspeth McGullicuddy
2014-01-07 19:48         ` Wolfgang Schuster
2014-01-10  3:54           ` Elspeth McGullicuddy
2014-01-10 22:38             ` Elspeth McGullicuddy
2014-01-11 14:03               ` Wolfgang Schuster
2014-01-11 18:36                 ` Elspeth McGullicuddy
2014-01-11 19:48                   ` Elspeth McGullicuddy

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=CAGMMSTC5OajPQYNKu4e6vsQmAxEqfwUo+Y4vbbV2WN5VYfpMkg@mail.gmail.com \
    --to=elspethmcgullicuddy@gmail.com \
    --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).