summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/blopentype
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-10 03:03:07 +0000
committerNorbert Preining <norbert@preining.info>2023-12-10 03:03:07 +0000
commit4d14c5388a9581dee1111261078e6141963ec24f (patch)
tree52553457b5385303c1ce97dcfa6e070ccd0235e7 /macros/luatex/generic/blopentype
parent1bac51c9be71358b55925783e16f3d8bc03d630b (diff)
CTAN sync 202312100303
Diffstat (limited to 'macros/luatex/generic/blopentype')
-rw-r--r--macros/luatex/generic/blopentype/README.md4
-rw-r--r--macros/luatex/generic/blopentype/blottest.pdfbin144031 -> 142732 bytes
-rw-r--r--macros/luatex/generic/blopentype/luatex/blot-fonts.lua20
-rw-r--r--macros/luatex/generic/blopentype/luatex/blot.tex107
4 files changed, 70 insertions, 61 deletions
diff --git a/macros/luatex/generic/blopentype/README.md b/macros/luatex/generic/blopentype/README.md
index c1d7382d08..4e21edd1cf 100644
--- a/macros/luatex/generic/blopentype/README.md
+++ b/macros/luatex/generic/blopentype/README.md
@@ -31,8 +31,6 @@ Good luck, and happy LuaTeXing
# Authors
-Version 0.0.3 (C) 2022-2023 Paul Isambert (author) and Luis Rivera (maintainer).
+(C) 2022-2023 Paul Isambert (author) and Luis Rivera (maintainer).
LaTeX Project Public License, LPPL Version 1.3c 2008-05-04 or MIT License
-
-September 3, 2023.
diff --git a/macros/luatex/generic/blopentype/blottest.pdf b/macros/luatex/generic/blopentype/blottest.pdf
index d5d3f2d904..20ac198b3d 100644
--- a/macros/luatex/generic/blopentype/blottest.pdf
+++ b/macros/luatex/generic/blopentype/blottest.pdf
Binary files differ
diff --git a/macros/luatex/generic/blopentype/luatex/blot-fonts.lua b/macros/luatex/generic/blopentype/luatex/blot-fonts.lua
index 982c595580..7b4462866d 100644
--- a/macros/luatex/generic/blopentype/luatex/blot-fonts.lua
+++ b/macros/luatex/generic/blopentype/luatex/blot-fonts.lua
@@ -129,7 +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, "%.([^%.]*)$") or "")
--- return str.match(s, "%.([^%.]*)$")
+-- return str.match(s, "%.([^%.]*)$") -- bugfix: dpc for empty field in file extension 230902
end
local extensions = {
@@ -221,9 +221,9 @@ local normal_names = {}
for _, name in ipairs(settings.normal) do
normal_names[name] = true
end
-local local_path = lfs.expand_var("$TEXMFLOCAL")--:gsub(":",";")
+local local_path = lfs.expand_var("$TEXMFLOCAL")
+-- local local_path = lfs.expand_var("$TEXMFHOME") -- :gsub(":",";") -- bugfix dpc: no path search gsub 0.0.2
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"
-- local library_file = "c:/texlive/texmf-local/tex/plain/pitex/readable.txt"
@@ -578,6 +578,8 @@ end
-- with such a name, so if there's an "f f" ligature in a font, no matter its name, "ff.lig"
-- will point to it.
local function ligature (comp, tb, phantoms)
+ if #tb == 0 then -- fast kludge to evade empty tables. jlrn 231207
+ else
local i = str.gsub(comp[1], "%.lig$", "") .. comp[2] .. ".lig"
phantoms[i] = true
tab.insert(tb.all_ligs, i)
@@ -589,6 +591,7 @@ local function ligature (comp, tb, phantoms)
tab.insert(comp, 1, i)
ligature(comp, tb, phantoms)
end
+ end -- endkludge 231209
end
local function get_lookups (t, lookup_table)
@@ -1208,14 +1211,17 @@ local function load_font (name, size, id, done)
loaded_font = apply_size(loaded_font, size, features.letterspacing, features.space)
loaded_font = activate_lookups(loaded_font, features, features.script, features.lang)
+ if #loaded_font == 0 then -- kludge for missing families/series, etc. 231207. jlrn.
+ else -- kludge 231207
loaded_font.name = loaded_font.name .. id
- loaded_font.fullname = loaded_font.fullname .. id
+ loaded_font.fullname = loaded_font.fullname .. id
local embedding = features.embedding or "subset"
if embedding ~= "no" and embedding ~= "subset" and embedding ~= "full" then
wri.error("Invalid value `%s' for the `embedding' feature. Value should be `no', `subset' or `full'.", embedding)
embedding = "subset"
end
loaded_font.embedding = embedding
+ end -- endkludge 231207
else
loaded_font = fl.read_tfm(lfs.find_file("cmr10", "tfm"), size)
end
@@ -1229,6 +1235,8 @@ callback.register("define_font", load_font)
History
0.0.0 First release
0.0.1 Bugfix
-0.0.2 Bugfix on font path search
-0.0.3 2023-09-02 Bugfix on font path search: empty file extension among font files
+0.0.2 2023-06-28 Bugfix on font path search: removed gsubs for Nix&Win
+0.0.3 2023-09-02 Bugfix on font path search: empty file extensions in font paths
+0.0.4 2023-12-07 Two kludges: one for missing ligatures, another for missing families/series;
+ some cleanup and housekeeping.
--]] \ No newline at end of file
diff --git a/macros/luatex/generic/blopentype/luatex/blot.tex b/macros/luatex/generic/blopentype/luatex/blot.tex
index 09dc58dff1..c4a0a79c99 100644
--- a/macros/luatex/generic/blopentype/luatex/blot.tex
+++ b/macros/luatex/generic/blopentype/luatex/blot.tex
@@ -6,7 +6,7 @@
%
% User interface
%
-\message{This is blopentype, v0.0.3 September 2023}
+\message{This is blopentype, v0.0.4 December 2023}
\input luatex85.sty % deprecated 30.12.2022
\input yax % which itself \input's texapi
@@ -211,54 +211,57 @@
\restorecatcodes
\endinput
-%
-% These are leftovers from Isambert's code: they'll be removed as
-% documentation improves.- 30.12.2022
-%
-% This is piTeX, a set of macros I (Paul Isambert) use to
-% typeset documentations for my packages (that's why it is
-% archived on CTAN).
-%
-% Perhaps in the future, when this achieves some kind of
-% format-like completude, it'll be publicly announced. In the
-% meanwhile, a documentation exists (pitex-doc.pdf, also readable
-% in a text editor as pitex-doc.txt).
-%
-%
-% You can of course use those macros, but you are on your
-% own, and the files will probably be modified without announcement.
-% The file is supposed to be \input on plain TeX with LuaTeX, at least v.0.6.
-%
-%
-% The files needed are:
-%
-% texapi.tex (an independent package for programming)
-% yax.tex (an independent package for key=value interface)
-% gates.tex and gates.lua (an independant package for overall architecture)
-% navigator.tex (an independant package for PDF features)
-% lua.ptx and base.ptxlua (Lua side)
-% files.ptx (file management)
-% fonts.ptx, fonts.ptxlua and foundry-settings.lua
-% (fonts, should be independant some day; actually
-% fonts.ptxlua can be used independantly, but there is
-% no doc)
-% sections.ptx (sectionning commands)
-% blocks.ptx (text blocks)
-% references.ptx (labels and references)
-% verbatim.ptx (typesetting verbatim)
-% inserts.ptx (footnotes and figures, a mess)
-% output.ptx (output routine)
-%
-% The file i-pitex.lua is needed only to typeset the documentation with the
-% Interpreter package.
-%
-%
-% 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.
-% 02-08-2023 fixed bug in blot-fonts.lua: failure on empty file extension among font files.
-% thanks to david.carlisle for useful patch.
-%
+
+These notes are leftovers from Isambert's code: they'll be removed as
+documentation improves.- 30.12.2022
+
+This is piTeX, a set of macros I (Paul Isambert) use to
+typeset documentations for my packages (that's why it is
+archived on CTAN).
+
+Perhaps in the future, when this achieves some kind of
+format-like completude, it'll be publicly announced. In the
+meanwhile, a documentation exists (pitex-doc.pdf, also readable
+in a text editor as pitex-doc.txt).
+
+
+You can of course use those macros, but you are on your
+own, and the files will probably be modified without announcement.
+The file is supposed to be \input on plain TeX with LuaTeX, at least v.0.6.
+
+
+The files needed are:
+
+texapi.tex (an independent package for programming)
+yax.tex (an independent package for key=value interface)
+gates.tex and gates.lua (an independant package for overall architecture)
+navigator.tex (an independant package for PDF features)
+lua.ptx and base.ptxlua (Lua side)
+files.ptx (file management)
+fonts.ptx, fonts.ptxlua and foundry-settings.lua
+ (fonts, should be independant some day; actually
+ fonts.ptxlua can be used independantly, but there is
+ no doc)
+sections.ptx (sectionning commands)
+blocks.ptx (text blocks)
+references.ptx (labels and references)
+verbatim.ptx (typesetting verbatim)
+inserts.ptx (footnotes and figures, a mess)
+output.ptx (output routine)
+
+The file i-pitex.lua is needed only to typeset the documentation with the
+Interpreter package.
+
+
+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.
+02-08-2023 fixed bug in blot-fonts.lua:
+ failure on files with empty extensions in font directories.
+ thanks to david.carlisle for useful patch.
+07-09-2023 fixed bugs in blot-fonts.lua:
+ - quick kludge to avoid empty ligature tables
+ - quick kludge to avoid missing font families/series: fallback to default font