[luatex] luatex - pdfmapline database

Hans Hagen pragma at wxs.nl
Sun Jul 17 23:11:22 CEST 2016


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.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list