Dear Hans, Taco et al

I hope this is the appropriate place to ask my question
--- if not, my apologies.

I've compiled LuaTeX on Windows and have been using Hans'
presentation "using plain TEX" (from TUG 2009) to construct
a minimal working runtime environment based on plain tex.
Basically, a hand-coded texmf.cnf and a minimal (non-ConTeXt)
environment/TDS constructed around the "build" directory created by build.sh.

The reason for doing this is to start with a setup
which is the minimum possible, as a way to learn.
ConTeXt is very powerful and orders of magnitude more complex
than plain (obviously...) so I needed to strip that away, for now.

It seems to work well, so far.

My question relates to fonts. In the luatex-plain example:

\input plain
\directlua {tex.enableprimitives('', tex.extraprimitives())}
\pdfoutput=1
\everyjob \expandafter {%
\the\everyjob
\input luatex-basics\relax
\input luatex-fonts\relax
\input luatex-mplib\relax
}
\edef\fmtversion{\fmtversion+luatex}

===> luatex --ini luatex-plain.tex

You include some ConTeXt font machinery which I'd like
to experiment with using fonts I have in .afm/.pfb format only.

I ran

mtxrun --script font --names

to generate a font name database (luatex-fonts-names.lua)

 ["mappings"]={
  ["aharonibold"]={ "Aharoni Bold", "C:/Windows/fonts/ahronbd.ttf" },
  ["andalus"]={ "Andalus", "C:/Windows/fonts/andlso.ttf" },
  ["angsananew"]={ "Angsana New", "C:/Windows/fonts/angsa.ttf" },
  ["angsananewbold"]={ "Angsana New Bold", "C:/Windows/fonts/angsab.ttf"
<<snip  lots>>

and copied it across to my plain tex texmf tree.

Works fine, PDF outputs perfectly, so it enables lots more fonts in the plain format. However, the database is clearly restricted to TrueType and OpenType fonts so my question is:

Does the font machinery included by:

\input luatex-basics\relax
\input luatex-fonts\relax
\input luatex-mplib\relax

provide support for afm/pfb fonts?

TrueType etc are OK like this:

\font\testf=[arialbolditalicmt] at 12pt

(name taken from database)

However, as soon as I try to use this with afm/pfb files
it fails, unable to find the metrics.

For example:

\font\testa=file:MinionRegularItalic_wt350_wd450_op10 at 34pt

It may be potentially bad names that I'm using with underscores
(they are all named like this Minion_wtX_wdY_opZ)

(X,Y,Z are values for weight, width and optical size)

But it also failed with simple font names.

I checked that the fonts can be found:

\directlua {
local found = kpse.find_file("MinionRegularItalic_wt350_wd450_op10","afm")
  tex.print("$$"..found.."$$")
local ifound = kpse.find_file("MinionRegularItalic_wt350_wd450_op10","type1 fonts")
    tex.print("$$"..ifound.."$$")
}

($$ is a silly hack due to the _)

So, is it possible to find and load .afm/.pfb with your luatex-plain example. Is that font machinery included in luatex-plain?

If so, can you suggest why the luatex-plain example
might be failing with the .afm/.pfb files?

I would be very grateful for any insights you can provide.

Many, many thanks in advance.

And another busy day on the list!!!

Warm wishes

Graham












___________________________________________________________________________________
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 via email to