diff options
Diffstat (limited to 'tex/context/base/font-trt.lua')
-rw-r--r-- | tex/context/base/font-trt.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/font-trt.lua b/tex/context/base/font-trt.lua index ebe8007b7..abc92ba52 100644 --- a/tex/context/base/font-trt.lua +++ b/tex/context/base/font-trt.lua @@ -10,6 +10,7 @@ local rawget, dofile, next, type = rawget, dofile, next, type local cleanfilename = fonts.names.cleanfilename local splitbase = file.splitbase +local lower = string.lower --[[ldx-- <p>We provide a simple treatment mechanism (mostly because I want to demonstrate @@ -102,3 +103,14 @@ function treatments.applyfixes(filename,data) end end +function treatments.ignoredfile(fullname) + local treatmentdata = treatments.data or { } -- when used outside context + local _, basepart = splitbase(fullname) + local treatment = treatmentdata[basepart] or treatmentdata[lower(basepart)] + if treatment and treatment.ignored then + report_treatment("font file %a resolved as %a is ignored, reason %a",basepart,fullname,treatment.comment or "unknown") + return true + end +end + +fonts.names.ignoredfile = treatments.ignoredfile |