[NTG-context] kpfonts, math, type 1 font

Elspeth McGullicuddy elspethmcgullicuddy at gmail.com
Tue Jan 7 04:35:18 CET 2014


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 at gmail.com> wrote:
>
> Am 06.01.2014 um 19:56 schrieb Elspeth McGullicuddy <elspethmcgullicuddy at 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 at 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
> ___________________________________________________________________________________


More information about the ntg-context mailing list