diff options
author | Marius <mariausol@gmail.com> | 2014-02-07 02:00:28 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2014-02-07 02:00:28 +0200 |
commit | 8c7fab57c5fd2db6b9ade5f7608add9f650c8460 (patch) | |
tree | 5c9c76a9c7c0c09508b26b77d26721b030bfff84 /scripts | |
parent | 4d2068d1244e2b0949367d9cd18bfabe9d559de3 (diff) | |
download | context-8c7fab57c5fd2db6b9ade5f7608add9f650c8460.tar.gz |
beta 2014.02.07 00:57
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-fonts.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua index 4340cb357..675d9fb12 100644 --- a/scripts/context/lua/mtx-fonts.lua +++ b/scripts/context/lua/mtx-fonts.lua @@ -413,8 +413,12 @@ function scripts.fonts.save() local sub = givenfiles[2] or "" local function save(savename,fontblob) if fontblob then + if fontblob.validation_state and table.contains(fontblob.validation_state,"bad_ps_fontname") then + report("ignoring bad fontname for %a",name) + savename = file.nameonly(name) .. "-bad-ps-name" + end savename = file.addsuffix(string.lower(savename),"lua") - report("fontsave, saving data in %s",savename) + report("fontsave, saving data in %a",savename) table.tofile(savename,fontloader.to_table(fontblob),"return") fontloader.close(fontblob) end @@ -426,7 +430,7 @@ function scripts.fonts.save() if suffix == 'ttf' or suffix == 'otf' or suffix == 'ttc' or suffix == "dfont" then local fontinfo = fontloader.info(filename) if fontinfo then - report("font: %s located as %s",name,filename) + report("font: %a located as %a",name,filename) if #fontinfo > 0 then for k=1,#fontinfo do local v = fontinfo[k] @@ -436,13 +440,13 @@ function scripts.fonts.save() save(fontinfo.fullname,fontloader.open(filename)) end else - report("font: %s cannot be read",filename) + report("font: %a cannot be read",filename) end else - report("font: %s not saved",filename) + report("font: %a not saved",filename) end else - report("font: %s not found",name) + report("font: %a not found",name) end else report("font: no name given") |