[luatex] Loading PK fonts in Lua
luatex at nililand.de
Wed Oct 4 17:25:55 CEST 2017
Am Wed, 4 Oct 2017 16:11:07 +0200 schrieb David Shourabi Porcel:
> I am dealing with a TFM-PK font pair which I would like to load in
> Lua. The following code doesn't work, however:
> function define_font(name, size)
> metrics = font.read_tfm("font.tfm", size)
> metrics.type = "real"
> metrics.format = "type3"
> metrics.fullname = "font.600pk"
> metrics.filename = "font.600pk"
> metrics.embedding = "full"
> return metrics
> callback.register("define_font", define_font)
> LuaTeX complains:
> warning (file font) (type 3): font font at 216 not found
> That is, the metrics file is found and loaded, but the bitmap file is
> not. What am I doing wrong?
You didn't provide a complete example, so I can't test. But the "at
216" sounds as if you are using to use the font in a different
Why are you trying to load the font in lua instead of loading it
normally in the tex file?
> As far as I could understand from the manual, map files should not be
> needed (support for them might be removed in the future, anyway).
map-files were never needed for pk-fonts.
More information about the luatex