diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua | 19 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/blopentype/blot.tex | 8 |
2 files changed, 23 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua b/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua index 638f83e984e..940fc5de2dd 100644 --- a/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua +++ b/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua @@ -129,6 +129,7 @@ local lfs = get_locals {lfs = "dir isdir isfile mkdir", kpse = "expand_var show_ -- Returns anything after the last dot, i.e. an extension. function lfs.extension (s) return str.lower(str.match(s, "%.([^%.]*)$")) +-- return str.match(s, "%.([^%.]*)$") end local extensions = { @@ -220,8 +221,8 @@ local normal_names = {} for _, name in ipairs(settings.normal) do normal_names[name] = true end -local local_path = lfs.expand_var("$TEXMFHOME") -local foundry_path = lfs.ensure_dir (local_path, "tex", "luatex", "foundry") +local local_path = lfs.expand_var("$TEXMFLOCAL")--:gsub(":",";") +local foundry_path = lfs.ensure_dir (local_path, "tex", "luatex", "blotfonts") -- local local_path = lfs.expand_var("$TEXMFHOME") -- local foundry_path = lfs.ensure_dir (local_path, "fonts", "truetype", "public", "gfs") local library_file = foundry_path .. "/" .. "readable.txt" @@ -244,13 +245,19 @@ local function extract_font (file, names) fi = fl.open end if not fi then - fl.error("Can't open %s", file) +-- fl.error("Can't open %s", file) + fl.error("\nCannot open file", file) return end end subname = name else fi = fl.open(file) + -- blot-fonts.lua:257: attempt to index a nil value (local 'fi') + if not fi then + print("\nCannot open file", file) + return + end end -- Getting the most precise information. Not necessarily the best -- solution, but since the user can modify the library, it's not so bad. @@ -282,6 +289,7 @@ end -- only those that arent in the libraries are considered. local fonts_done = {} local function check_fonts (rep, tb) + if lfs.isdir(rep) then for f in lfs.dir (rep) do if f ~= "." and f ~= ".." then f = str.gsub(rep, "/$", "") .. "/" .. f @@ -308,6 +316,7 @@ local function check_fonts (rep, tb) end end end + end end -- Writes the library to an external file. @@ -355,6 +364,7 @@ end -- If there is no library, we create it. local font_paths = lfs.show_path("opentype fonts") +font_paths = str.gsub(font_paths, ":", ";") font_paths = str.gsub(font_paths, "\\", "/") font_paths = str.gsub(font_paths, "/+", "/") font_paths = str.gsub(font_paths, "!!", "") @@ -398,6 +408,9 @@ local function load_library (lib) LIB = str.gsub(LIB, ";%s*;", ";;") LIB = str.gsub(LIB, ";+", ";") LIB = str.gsub(LIB, "^;", "") + LIB = str.gsub(LIB, ":%s*:", "::") + LIB = str.gsub(LIB, ":+", ":") + LIB = str.gsub(LIB, "^:", "") LIB = str.gsub(LIB, "%s+", " ") LIB = lp.match(explode_semicolon, LIB) diff --git a/Master/texmf-dist/tex/luatex/blopentype/blot.tex b/Master/texmf-dist/tex/luatex/blopentype/blot.tex index 44a89e553ef..bad87626b12 100644 --- a/Master/texmf-dist/tex/luatex/blopentype/blot.tex +++ b/Master/texmf-dist/tex/luatex/blopentype/blot.tex @@ -1,10 +1,11 @@ % blopentype: a basic luatex open type loader % % some (most) pitex macros still in place.- 30.12.2022 +% check history after `\endinput` % % User interface % -\message{This is blopentype, v0.0.0 December 2022} +\message{This is blopentype, v0.0.2 June 2023} \input luatex85.sty % deprecated 30.12.2022 \input yax % which itself \input's texapi @@ -252,3 +253,8 @@ % % % Date: November 2011. +% +% --- blopentype history +% +% 28-06-2023 fixed bug in blot-fonts.lua which affected nix systems. +% thanks to david.carlisle for useful patch.
\ No newline at end of file |