texlive[67517] Master/texmf-dist: blopentype (30jun23)

commits+karl at tug.org commits+karl at tug.org
Fri Jun 30 22:51:48 CEST 2023


Revision: 67517
          http://tug.org/svn/texlive?view=revision&revision=67517
Author:   karl
Date:     2023-06-30 22:51:48 +0200 (Fri, 30 Jun 2023)
Log Message:
-----------
blopentype (30jun23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/blopentype/README.md
    trunk/Master/texmf-dist/doc/luatex/blopentype/blopentype.md
    trunk/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua
    trunk/Master/texmf-dist/tex/luatex/blopentype/blot.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/luatex/blopentype/LICENSE

Added: trunk/Master/texmf-dist/doc/luatex/blopentype/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/blopentype/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/luatex/blopentype/LICENSE	2023-06-30 20:51:48 UTC (rev 67517)
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Luis Rivera
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

Modified: trunk/Master/texmf-dist/doc/luatex/blopentype/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/blopentype/README.md	2023-06-30 20:51:26 UTC (rev 67516)
+++ trunk/Master/texmf-dist/doc/luatex/blopentype/README.md	2023-06-30 20:51:48 UTC (rev 67517)
@@ -1,5 +1,5 @@
 # blopentype
-Basic LuaTeX OpenType Handler
+Basic LuaTeX OpenType Manager
 
 # Description
 
@@ -11,9 +11,9 @@
 | fonts.ptxlua         | The Lua fontloader; should become independant some day. |
 | foundry-settings.lua | Default settings for the fontloader.             |
 
-Well: the day has come, and the fontloader has now become `blopentype`: a *Basic LuaTeX OpenType Handler*.
+Well: the day has come, and the fontloader has now become `blopentype`: a *Basic LuaTeX OpenType Manager*.
 
-The basic code is copied almost verbatim from Isambert's `PiTeX`, save the adoption of the filename extensions `ltm` for *LuaTeX macros*, `lts` for *LuaTeX scripts*, and `blot-sets.lua` for the basic basic settings. 
+The basic code is copied almost verbatim from Isambert's `PiTeX`, save the adoption of the canonical filename extensions `tex` for *LuaTeX macros*, `lua` for *LuaTeX scripts*, and `blot-sets.lua` for the basic basic settings. 
 The required dependencies are Isambert packages [texapi](https://ctan.org/pkg/texapi), [YaX](https://ctan.org/pkg/yax) and [Gates](https://ctan.org/pkg/gates), as stated in `DEPENDS.txt`.
 
 You may find an example of usage in the `blottest.[tex|pdf]` files, and some basic documentation in `blopentype.md`.
@@ -22,16 +22,17 @@
 
 The macros are still barely documented, and massively keep the names of their parent (`PiTeX`) package; that may be fixed some day.
 
-The font database is loaded at `$HOME/texmf/luatex/foundry/readable.txt`; it is not updated automatically after installing new fonts: you have to edit it manually, or else delete/rename(backup) it and rerun LuaTeX to rebuild it.
+The font database is stored at `$TEXMFLOCAL/texmf/luatex/blotfonts/readable.txt`.
+It is updated automatically after installing *and using* new fonts, but you may edit it, or else delete/rename(backup) the database by hand, and rerun LuaTeX to rebuild it.
 
-The character table for each typeface is stored in the `luatex/foundry` directory as a flat `lua` file; it would be nice to have it compiled as a `luac` file to save some space.
+The character table for each typeface is stored in the `luatex/blotfonts` directory as a flat `lua` file; it would be nice to have it compiled as a `luac/luc` file to save some space, some day.
 
 Good luck, and happy LuaTeXing
 
 # Authors 
 
-Version 0.0.0 (C) 2022 Paul Isambert (massively) and Luis Rivera (minor surgeon; or rather: kludger).
+Version 0.0.2 (C) 2023 Paul Isambert (author) and Luis Rivera (maintainer).
 
 LaTeX Project Public License, LPPL Version 1.3c 2008-05-04 or MIT License
 
-December 28, 2022
\ No newline at end of file
+June 29, 2023

Modified: trunk/Master/texmf-dist/doc/luatex/blopentype/blopentype.md
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/blopentype/blopentype.md	2023-06-30 20:51:26 UTC (rev 67516)
+++ trunk/Master/texmf-dist/doc/luatex/blopentype/blopentype.md	2023-06-30 20:51:48 UTC (rev 67517)
@@ -1,24 +1,38 @@
-# Basic LuaTeX OpenType Handler Minimal User Guide
+# Basic LuaTeX OpenType Manager Minimal User Guide
 
-As for version 0.0.0 December 2022
+As of version 0.0.1 May 2023
 
-Fonts (fonts.ltm and fonts.lts)
-==================================
+Loading the macros
+==================
 
+This is a Plain TeX macro package, so simply type
+
+```
+\input blot
+```
+
+and you are halfway through: there are font parameter defaults, but no font is loaded 
+automatically, since it must depend on your system; so you have to load fonts
+on your own.
+
+Fonts 
+=====
+
 The fontloader uses gates, but only superficially. They won't be
 documented here.
 
 To load a given font, you define it in YaX syntax with the `\setfont` command.
+Thus, the instruction:
 
-```\setfont <command>:<attributes>```
+```\setfont <fontcommand>:<attributes>```
 
-Sets <command> to call the font described in <attributes>; all defaults
-to the values of the `metafont` parameter. If `<command>` is `\mainfont`, 
-as the name of the main font for the document, the font is called at once; 
-any other `\command` requires explicit calls.
+sets <fontcommand> to call the font described in <attributes>; all new fonts default
+to the values of the `metafont` parameter described elsewhere. 
+If `<fontcommand>` is `\mainfont`, the font is called at once; 
+any other `\fontcommand` requires an explicit call.
 
-You may thing of `\setfont <command>` as similar to DEKTeX's `\font\cmr10 at 12pt` 
-or whatever font definition, but now the call is to an array of font attributes.
+You may thing of `\setfont <fontcommand>` as similar to DEKTeX's `\font<fontcommand> <parameters>`,
+but now the call is to an array of font attributes, enumerated below.
 
 `name`
 The family name of the font; e.g. Palatino Linotype for the main text of

Modified: trunk/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua	2023-06-30 20:51:26 UTC (rev 67516)
+++ trunk/Master/texmf-dist/tex/luatex/blopentype/blot-fonts.lua	2023-06-30 20:51:48 UTC (rev 67517)
@@ -129,6 +129,7 @@
 -- 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 @@
 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,7 +245,8 @@
         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
@@ -251,6 +253,11 @@
     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 @@
 -- 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 @@
       end
     end
   end
+  end
 end
 
 -- Writes the library to an external file.
@@ -355,6 +364,7 @@
 
 -- 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 @@
   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)

Modified: trunk/Master/texmf-dist/tex/luatex/blopentype/blot.tex
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/blopentype/blot.tex	2023-06-30 20:51:26 UTC (rev 67516)
+++ trunk/Master/texmf-dist/tex/luatex/blopentype/blot.tex	2023-06-30 20:51:48 UTC (rev 67517)
@@ -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



More information about the tex-live-commits mailing list.