[luatex] luatex - pdfmapline database

Pali Rohár pali.rohar at gmail.com
Mon Jul 18 18:32:59 CEST 2016


On Sunday 17 July 2016 23:11:22 Hans Hagen wrote:
> On 7/17/2016 8:56 PM, Pali Rohár wrote:
> > On Sunday 17 July 2016 10:48:23 Hans Hagen wrote:
> >> On 7/17/2016 1:30 AM, Pali Rohár wrote:
> >>>>> In luatex documentation in section 12.1.1 are described lua
> >>>>> functions pdf.mapfile() and pdf.mapline(), but those can be
> >>>>> used only for filling pdfmapline database. Not for retrieving
> >>>>> it or inspect it...
> >>>> 
> >>>> indeed, and there is no reason to consult them as map
> >>>> files/lines are a resource managed in sync with fonts (and in a
> >>>> modern luatex font setup  they are not even needed)
> >>> 
> >>> I was thinking about choosing ENC file for 8bit PFB fonts from
> >>> this database instead manually searching for correct ENC
> >>> files... As now it is possible to use TFM+PFB+ENC fonts files
> >>> via loader. And pdftex.map provides needed database for it.
> >> 
> >> that is something different ... mapfiles are explicitly loaded
> >> with \pdfmapfile or taken from an environment variable ... they
> >> kick in very late in the backend (finalizing document)
> >> 
> >> if you really want to do that you can write some lua code that
> >> looks at the relevant variable, and then parses the map file(s)
> >> it returns
> >> 
> >> (also, given the small amount of type one files that one would
> >> possibly want to load in a luatex setup one can as well make a
> >> dedicated database - or lua table - for it as it only involves a
> >> few files)
> >> 
> >> (and in the loader you probably can do without the enc esp for cs
> >> as it's one to one with the built-in default anyway)
> >> 
> >> Hans
> > 
> > Also from mapfile/mapline(s) it is possible distinguish if font is
> > Type1 PFB or bitmap PK (bitmap fonts are not present in mapfiles).
> > And bitmap parameter must be correctly passed to fontloader
> > otherwise font will be not loaded.
> 
> btw, A map file as defined by an environment variable is loaded after
> the font is defined i.e. when the file is finalized; \pdfmapfile will
> load directly but in that case you know what maptile and therefore
> also know its content and can define accordingly .. not much
> different from pdftex etc.

So in this case it is possible to load pdftex.map file (or file from 
environment variable; which ENV it is?) and parse it in lua code. And 
also redefine \pdfmapfile/\pdfmapfile commands to hook parse them into 
that lua code too... Looks like this could work and could be possible to 
implement...

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://tug.org/pipermail/luatex/attachments/20160718/4b2dfc2c/attachment.bin>


More information about the luatex mailing list