Better font not found error

This commit is contained in:
Marcel Krüger 2020-07-14 22:10:39 +02:00
parent 8dd79f0134
commit 5dead1b1a0
2 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,12 @@ if status.ini_version then
else
callback_register('define_font', function(name, size)
local f = read_tfm(name, size)
if not f then return end
if not f then
tex.error(string.format("Font %q not found", name), "The requested font could't be loaded.\n\z
Are you sure that you passed the right name and\n\z
that the font is actually installed?")
return 0
end
return font.define(f)
end)
end

View File

@ -1,4 +1,3 @@
-- nodefont = true
-- Some helpers:
-- A kpse wrapper
local serialize_cff = require'luametalatex-font-cff'