texlive[73751] Master: fontscripts (6feb25)
commits+karl at tug.org
commits+karl at tug.org
Thu Feb 6 21:43:49 CET 2025
Revision: 73751
https://tug.org/svn/texlive?view=revision&revision=73751
Author: karl
Date: 2025-02-06 21:43:49 +0100 (Thu, 06 Feb 2025)
Log Message:
-----------
fontscripts (6feb25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/fonts/fontscripts/README.md
trunk/Master/texmf-dist/doc/fonts/fontscripts/manifest.txt
trunk/Master/texmf-dist/source/fonts/fontscripts/dotoldstyle.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/dotsc2.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/dotscbuild.mtx
trunk/Master/texmf-dist/source/fonts/fontscripts/dotscmisc.mtx
trunk/Master/texmf-dist/source/fonts/fontscripts/dottaboldstyle.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tables.tex
trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.dtx
trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.ins
trunk/Master/texmf-dist/source/fonts/fontscripts/lining.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/newlatin-dotsc.mtx
trunk/Master/texmf-dist/source/fonts/fontscripts/oldstyle.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-cfr.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotalt-f_f.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinf.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinferior.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsup.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsuperior.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1-f_f.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/t1j-f_f.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotinf.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotsup.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-euro.etx
trunk/Master/texmf-dist/source/fonts/fontscripts/ucdotalt.etx
trunk/Master/tlpkg/libexec/ctan2tds
Added Paths:
-----------
trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf
trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf
trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-test.lvt
trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tests.tex
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-build.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-check.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-ctan.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-doc.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-utils.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-vars.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-code.tex
trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-doc.tex
trunk/Master/texmf-dist/source/fonts/fontscripts/unfakable.mtx
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts.pdf
trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-ctan.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/fontinst.lua
trunk/Master/texmf-dist/source/fonts/fontscripts/tag.lua
Modified: trunk/Master/texmf-dist/doc/fonts/fontscripts/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/fontscripts/README.md 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/doc/fonts/fontscripts/README.md 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,4 +1,4 @@
-$Id: README.md 10379 2024-09-24 20:56:31Z cfrees $
+$Id: README.md 10772 2025-02-05 23:38:41Z cfrees $
=================================================
# fontscripts
@@ -38,7 +38,17 @@
## Revision History
=================================================
-Initial release.
+- v0.1 Initial release.
+- v0.2 Restructuring of code to use a more modular and (hopefully) flexible
+approach. Other tool chains can now use functions to build and keep font support
+files and ensure unique encoding names. Facilities for 'sandboxing' the
+building and testing of font packages are now provided and utilised by default.
+Almost all package functions and variables are now in a dedicated namespace to
+prevent any possible conflicts. TDS locations are suggested to facilitate use
+if installed and default templates are provided for the template system.
+fntbuild.lua can now insert font subset encoding declarations into font
+definition files, as recently requested by the LaTeX Project. Changes are
+detailed in the documentation.
=================================================
## Code Repositories
@@ -58,8 +68,8 @@
Clea F. Rees
-Version 0.1
-2024-09-24
+Version 0.2
+2025-02-05
=================================================
vim: et:tw=80:sw=0:
Added: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf 2025-02-06 20:43:49 UTC (rev 73751)
Property changes on: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-code.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf 2025-02-06 20:43:49 UTC (rev 73751)
Property changes on: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/fonts/fontscripts/fontscripts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/fonts/fontscripts/manifest.txt
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/fontscripts/manifest.txt 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/doc/fonts/fontscripts/manifest.txt 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,32 +1,24 @@
# Manifest for fontscripts
-Copyright (C) 2024 Clea F. Rees
+This file is a listing of all files considered to be part of this package.
+It is automatically generated with `l3build manifest`.
-This work may be distributed and/or modified under the conditions of the LaTeX
-Project Public License, either version 1.3c of this license or (at your option)
-any later version. The latest version of this license is in
- https://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX version
-2008-05-04 or later.
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is Clea F. Rees.
-
-This work consists of all files listed in manifest.txt.
-
-This file was automatically generated by `l3build manifest`.
-
## Source files
### Package files
-* fontscripts.dtx
-* fontscripts.ins
-* fontinst.lua
-* fnt-ctan.lua
-* README.md
+* fontscripts.dtx ‡
+* fontscripts.ins ‡
+* fntbuild.lua ‡
+* fntbuild-build.lua ‡
+* fntbuild-check.lua ‡
+* fntbuild-ctan.lua ‡
+* fntbuild-doc.lua ‡
+* fntbuild-utils.lua ‡
+* fntbuild-vars.lua ‡
+* README.md ‡
## Derived files
@@ -35,29 +27,34 @@
### Package files
* manifest.txt
-* dotoldstyle.etx
-* dotsc2.etx
-* dottaboldstyle.etx
-* lining.etx
-* oldstyle.etx
-* t1-cfr.etx
-* t1-dotalt-f_f.etx
-* t1-dotinf.etx
-* t1-dotinferior.etx
-* t1-dotsup.etx
-* t1-dotsuperior.etx
-* t1-f_f.etx
-* t1j-f_f.etx
-* ts1-dotinf.etx
-* ts1-dotsup.etx
-* ts1-euro.etx
-* ucdotalt.etx
-* tag.lua
-* dotscbuild.mtx
-* dotscmisc.mtx
-* newlatin-dotsc.mtx
-* fnt-tables.tex
+* dotoldstyle.etx
+* dotsc2.etx
+* dottaboldstyle.etx
+* lining.etx
+* oldstyle.etx
+* t1-cfr.etx
+* t1-dotalt-f_f.etx
+* t1-dotinf.etx
+* t1-dotinferior.etx
+* t1-dotsup.etx
+* t1-dotsuperior.etx
+* t1-f_f.etx
+* t1j-f_f.etx
+* ts1-dotinf.etx
+* ts1-dotsup.etx
+* ts1-euro.etx
+* ucdotalt.etx
+* fnt-test.lvt †
+* dotscbuild.mtx
+* dotscmisc.mtx
+* newlatin-dotsc.mtx
+* unfakable.mtx
+* fnt-tables.tex †
+* fnt-tests.tex †
+* fontscripts-code.tex
+* fontscripts-doc.tex
### Typeset documentation
-* fontscripts.pdf
+* fontscripts-code.pdf ‡
+* fontscripts-doc.pdf ‡
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/dotoldstyle.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/dotoldstyle.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/dotoldstyle.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `dotoldstyle')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/dotsc2.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/dotsc2.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/dotsc2.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `dotsc2')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/dotscbuild.mtx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/dotscbuild.mtx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/dotscbuild.mtx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `dotscbuild')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/dotscmisc.mtx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/dotscmisc.mtx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/dotscmisc.mtx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `dotscmisc')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/dottaboldstyle.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/dottaboldstyle.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/dottaboldstyle.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `dottaboldstyle')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Deleted: trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-ctan.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-ctan.lua 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-ctan.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,105 +0,0 @@
--- $Id: fnt-ctan.lua 10399 2024-09-27 02:16:30Z cfrees $
--------------------------------------------------
-local exts = {}
-
--------------------------------------------------
--- origcopyctan()
--- copy David Carlisle
-origcopyctan = copyctan
-
--------------------------------------------------
--- extname(filename)
-function extname(filename)
- local b = basename(filename)
- ext = string.gsub(b, "^[^%.]*%.", "")
- if ext == nil then
- gwall("Failed to get extension ",ext,1)
- end
- return ext
-end
--------------------------------------------------
--- copysubctan(files,srcdir,targdir)
-function copysubctan(files,srcdir,targdir)
- local errorlevel
- local extdir
- if not direxists(targdir) then
- errorlevel = mkdir(targdir)
- if errorlevel ~= 0 then return errorlevel end
- end
- for i,j in ipairs(files) do
- local ext = extname(j)
- if exts[ext] == nil then
- extdir = ext
- exts[ext] = ext
- else
- extdir = exts[ext]
- end
- if not direxists(targdir .. "/" .. extdir) then
- errorlevel = mkdir(targdir .. "/" .. extdir)
- if errorlevel ~= 0 then return errorlevel end
- end
- errorlevel = cp(j,srcdir,targdir .. "/" .. extdir)
- if errorlevel ~= 0 then return errorlevel end
- end
- return 0
-end
--------------------------------------------------
--- copyctan()
-function copyctan()
- local keepdir = keepdir or sourcefiledir .. "/keep"
- local errorlevel
- local targdir = ctandir .. "/" .. ctanpkg
- keptfiles = {}
- if #exts == 0 then exts = {"afm","dtx","enc","fd","ins","map","md","otf","pdf","pfb","pfm","tex","tfm","txt","vf"} end
- if not exts["pfb"] then exts["pfb"] = "type1" end
- if not exts["pfm"] then exts["pfm"] = "type1" end
- if not exts["ttf"] then exts["ttf"] = "truetype" end
- if not exts["otf"] then exts["otf"] = "opentype" end
- if not exts["fd"] then exts["fd"] = "latex" end
- if not exts["dtx"] then exts["dtx"] = "source" end
- if not exts["ins"] then exts["ins"] = "source" end
- if not exts["md"] then exts["md"] = "doc" end
- if not exts["txt"] then exts["txt"] = "doc" end
- if not exts["tex"] then exts["tex"] = "doc" end
- if not exts["pdf"] then exts["pdf"] = "doc" end
- for i,j in ipairs(filelist(keepdir,"*.*")) do
- if j ~= "." and j ~= ".." then
- table.insert(keptfiles,j)
- end
- end
- copysubctan(keptfiles,keepdir,targdir)
- origcopyctan()
- local g = {}
- for i,j in ipairs(exts) do
- local f = filelist(targdir,"*." .. j)
- if #f ~= 0 then
- for m,n in ipairs(f) do
- if n ~= "README.md" and n ~= "README" then
- table.insert(g,n)
- end
- end
- end
- end
- if #g ~= 0 then
- errorlevel = copysubctan(g,targdir,targdir)
- if errorlevel ~= 0 then return errorlevel end
- end
- for i,j in ipairs(exts) do
- errorlevel = rm(targdir, "*." .. j)
- if errorlevel ~= 0 then return errorlevel end
- end
- if fileexists(targdir .. "/COPYING") then
- if not direxists(targdir .. "/doc") then mkdir(targdir .. "/doc") end
- errorlevel = cp("COPYING",targdir,targdir .. "/doc")
- if errorlevel ~= 0 then return errorlevel end
- errorlevel = rm(targdir, "COPYING")
- if errorlevel ~= 0 then return errorlevel end
- end
- -- this is horrible: ctan() copies all the files, we deal with them, and then it copies all the textfiles a second time!
- textfiles = {"README","README.md"}
- return 0
-end
--- end copyctan()
--------------------------------------------------
-
--- vim: ts=2:sw=2:et:
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tables.tex
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tables.tex 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tables.tex 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `tables')
%%
-%% Copyright (C) 2024 Clea F. Rees.
+%% Copyright (C) 2024-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -30,7 +30,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pdftracingfonts=1
\RequirePackage{svn-prov}
-\ProvidesFileSVN{$Id: fontscripts.dtx 10412 2024-09-27 15:10:34Z cfrees $}[v0.1 \revinfo][\outFileName]
+\ProvidesFileSVN[fnt-tables.tex]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.2 \revinfo][\filebase: font table template]
\DefineFileInfoSVN
\documentclass[10pt,a4paper]{article}
\usepackage{geometry}
@@ -40,6 +40,9 @@
\xfonttable{#1}{#2}{#3}{#4}%
\clearpage
}
+
+TABLES
+
\endinput
%%
%% End of file `fnt-tables.tex'.
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-test.lvt
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-test.lvt (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-test.lvt 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,51 @@
+%%
+%% This is file `fnt-test.lvt',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontscripts.dtx (with options: `lvt')
+%%
+%% Copyright (C) 2024-2025 Clea F. Rees.
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This file may only be distributed together with a copy of the package
+%% fontscripts. You may however distribute the package fontscripts without
+%% such generated files.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{svn-prov}
+\ProvidesFileSVN[fnt-test.lvt]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo][fontscripts: l3build test template]
+\listfiles
+\input regression-test.tex\relax
+\input fnt-tests.tex\relax
+\setlength{\parindent}{0pt}
+\textheight=250mm
+\textwidth=160mm
+\oddsidemargin=0mm
+\evensidemargin=0mm
+\headheight=0pt
+\headsep=0pt
+\topmargin=-10mm
+\marginparwidth=0pt
+\marginparsep=0pt
+
+SAMP
+
+\endinput
+%%
+%% End of file `fnt-test.lvt'.
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tests.tex
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tests.tex (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tests.tex 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,227 @@
+%%
+%% This is file `fnt-tests.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontscripts.dtx (with options: `tests')
+%%
+%% Copyright (C) 2024-2025 Clea F. Rees.
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This file may only be distributed together with a copy of the package
+%% fontscripts. You may however distribute the package fontscripts without
+%% such generated files.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pdftracingfonts=1
+\RequirePackage{svn-prov}
+\ProvidesFileSVN[fnt-tests.tex]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo][fontscripts: l3build tests]
+\documentclass[10pt,a4paper]{article}
+\usepackage{fonttable}
+\usepackage{tracefnt}% infoshow is default; debugshow traces maths fonts, too
+\PassOptionsToPackage{nfssext-cfr}{debug}
+\newcounter{tccharcnt}
+\NewDocumentCommand \tcfnttest { o m }
+{%
+ \iftctest
+ \stepcounter{tccharcnt}{\normalfont\thetccharcnt:~}%
+ % \texttt{\textbackslash #2}:
+ \IfValueTF{#1}{%
+ \csname #2\endcsname {#1}%
+ }{%
+ \csname #2\endcsname
+ }%
+ \fi
+}
+\newif\iftctest
+\tctesttrue
+\makeatletter
+\newcommand\sampler{}
+\def\sampler#1#2#3#4{%
+ \setcounter{tccharcnt}{0}%
+ % \tracingoutput=1
+ #1 / #2 / #3 / #4 :
+
+ \tracinglostchars\thr@@
+ % \tracingonline\thr@@
+ \showoutput
+ \pikfont{#1}{#2}{#3}{#4}%
+ \aztext
+
+ \AZtext
+
+ \digitstext
+
+ \punctext
+
+ \knutext
+
+ Ææ Ŵŵ Ŷŷ Šš €
+
+ percent: \%
+
+ \begin{tabular}{llllllllll}
+ \tcfnttest{S} &
+ \tcfnttest[I]{capitalacute} &
+ \tcfnttest[I]{capitalbreve} &
+ \tcfnttest[I]{capitalcaron} &
+ \tcfnttest[I]{capitalcedilla} &
+ \tcfnttest[I]{capitalcircumflex} &
+ \tcfnttest[I]{capitaldieresis} &
+ \tcfnttest[I]{capitaldotaccent} &
+ \tcfnttest[I]{capitalgrave} &
+ \tcfnttest[I]{capitalhungarumlaut} \\
+ \tcfnttest[I]{capitalnewtie} &
+ \tcfnttest[I]{capitalogonek} &
+ \tcfnttest[I]{capitalring} &
+ \tcfnttest[I]{capitaltie} &
+ \tcfnttest[I]{capitaltilde} &
+ \tcfnttest{textacutedbl} &
+ \tcfnttest{textasciiacute} &
+ \tcfnttest{textasciibreve} &
+ \tcfnttest{textasciicaron} &
+ \tcfnttest{textasciicircum} \\
+ \tcfnttest{textasciidieresis} &
+ \tcfnttest{textasciigrave} &
+ \tcfnttest{textasciimacron} &
+ \tcfnttest{textasciitilde} &
+ \tcfnttest{textasteriskcentered} &
+ \tcfnttest{textbackslash} &
+ \tcfnttest{textbaht} &
+ \tcfnttest{textbar} &
+ \tcfnttest{textbardbl} &
+ \tcfnttest{textbigcircle} \\
+ \tcfnttest{textblank} &
+ \tcfnttest{textborn} &
+ \tcfnttest{textbraceleft} &
+ \tcfnttest{textbraceright} &
+ \tcfnttest{textbrokenbar} &
+ \tcfnttest{textbullet} &
+ \tcfnttest{textcelsius} &
+ \tcfnttest{textcent} &
+ \tcfnttest{textcentoldstyle} &
+ \tcfnttest{textcircledP} \\
+ \tcfnttest{textcolonmonetary} &
+ \tcfnttest{textcompwordmark} &
+ \tcfnttest{textcopyleft} &
+ \tcfnttest{textcopyright} &
+ \tcfnttest{textcurrency} &
+ \tcfnttest{textdagger} &
+ \tcfnttest{textdaggerdbl} &
+ \tcfnttest{textdblhyphen} &
+ \tcfnttest{textdblhyphenchar} &
+ \tcfnttest{textdegree} \\
+ \tcfnttest{textdied} &
+ \tcfnttest{textdiscount} &
+ \tcfnttest{textdiv} &
+ \tcfnttest{textdivorced} &
+ \tcfnttest{textdollar} &
+ \tcfnttest{textdollaroldstyle} &
+ \tcfnttest{textdong} &
+ \tcfnttest{textdownarrow} &
+ \tcfnttest{texteightoldstyle} &
+ \tcfnttest{textestimated} \\
+ \tcfnttest{texteuro} &
+ \tcfnttest{textfiveoldstyle} &
+ \tcfnttest{textflorin} &
+ \tcfnttest{textfouroldstyle} &
+ \tcfnttest{textfractionsolidus} &
+ \tcfnttest{textgravedbl} &
+ \tcfnttest{textguarani} &
+ \tcfnttest{textinterrobang} &
+ \tcfnttest{textinterrobangdown} &
+ \tcfnttest{textlangle} \\
+ \tcfnttest{textlbrackdbl} &
+ \tcfnttest{textleaf} &
+ \tcfnttest{textleftarrow} &
+ \tcfnttest{textlira} &
+ \tcfnttest{textlnot} &
+ \tcfnttest{textlquill} &
+ \tcfnttest{textmarried} &
+ \tcfnttest{textmho} &
+ \tcfnttest{textminus} &
+ \tcfnttest{textmu} \\
+ \tcfnttest{textmusicalnote} &
+ \tcfnttest{textnaira} &
+ \tcfnttest{textnaira} &
+ \tcfnttest{textnineoldstyle} &
+ \tcfnttest{textnumero} &
+ \tcfnttest{textohm} &
+ \tcfnttest{textonehalf} &
+ \tcfnttest{textoneoldstyle} &
+ \tcfnttest{textonequarter} &
+ \tcfnttest{textonesuperior} \\
+ \tcfnttest{textopenbullet} &
+ \tcfnttest{textordfeminine} &
+ \tcfnttest{textordmasculine} &
+ \tcfnttest{textparagraph} &
+ \tcfnttest{textperiodcentered} &
+ \tcfnttest{textpertenthousand} &
+ \tcfnttest{textperthousand} &
+ \tcfnttest{textpeso} &
+ \tcfnttest{textpilcrow} &
+ \tcfnttest{textpm} \\
+ \tcfnttest{textquotedblleft} &
+ \tcfnttest{textquotedblright} &
+ \tcfnttest{textquoteleft} &
+ \tcfnttest{textquoteright} &
+ \tcfnttest{textquotesingle} &
+ \tcfnttest{textquotestraightbase} &
+ \tcfnttest{textquotestraightdblbase} &
+ \tcfnttest{textrangle} &
+ \tcfnttest{textrbrackdbl} &
+ \tcfnttest{textrecipe} \\
+ \tcfnttest{textreferencemark} &
+ \tcfnttest{textregistered} &
+ \tcfnttest{textrightarrow} &
+ \tcfnttest{textrquill} &
+ \tcfnttest{textsection} &
+ \tcfnttest{textservicemark} &
+ \tcfnttest{textsevenoldstyle} &
+ \tcfnttest{textsixoldstyle} &
+ \tcfnttest{textsterling} &
+ \tcfnttest{textsurd} \\
+ \tcfnttest{textthreeoldstyle} &
+ \tcfnttest{textthreequarters} &
+ \tcfnttest{textthreequartersemdash} &
+ \tcfnttest{textthreesuperior} &
+ \tcfnttest{texttildelow} &
+ \tcfnttest{texttimes} &
+ \tcfnttest{texttrademark} &
+ \tcfnttest{texttwelveudash} &
+ \tcfnttest{texttwooldstyle} &
+ \tcfnttest{texttwosuperior} \\
+ \tcfnttest{textuparrow} &
+ \tcfnttest{textwon} &
+ \tcfnttest{textyen} &
+ \tcfnttest{textzerooldstyle} &
+ &
+ &
+ &
+ &
+ &
+ \\
+ \end{tabular}
+
+ \vfil\break
+}
+
+\makeatother
+\endinput
+%%
+%% End of file `fnt-tests.tex'.
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fnt-tests.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-build.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-build.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-build.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,676 @@
+-- $Id:
+-------------------------------------------------
+-- fntbuild-build
+-------------------------------------------------
+-------------------------------------------------
+-- map_cat (frags,dir,mapfile) {{{
+--- at param frags table
+--- at param dir string
+--- at param mapfile string
+--- at return 0 on success, number of errors otherwise
+--- at see
+--- at usage private
+local function map_cat (frags,dir,mapfile)
+ mapfile = mapfile or "pdftex.map"
+ local n = 0
+ if #frags == 0 then
+ frags = { "cm.map", "cm-super-t1.map", "cm-super-ts1.map", "lm.map" }
+ end
+ if #fnt.mapfiles_add ~= 0 then
+ for _,i in ipairs(fnt.mapfiles_add) do
+ table.insert(frags,i)
+ end
+ end
+ if fileexists(dir .. "/" .. mapfile) then
+ local errorlevel = rm(dir,mapfile)
+ fnt.gwall("Removal of ",dir .. "/" .. mapfile,errorlevel)
+ end
+ if #frags ~= 0 then
+ local m = assert(io.open(dir .. "/" .. mapfile,"a"))
+ for _,i in ipairs(frags) do
+ -- kpse.find_file assumes filetype tex i.e. ignores file ext.
+ local ff = kpse.find_file(i,"map")
+ if ff ~= "" then
+ local f = assert(io.open(ff),"rb")
+ local l = f:read("*all")
+ f:close()
+ m:write(l)
+ else
+ fnt.gwall("Search for map fragment ",i,1)
+ n = n + 1
+ end
+ end
+ m:close()
+ end
+ return n
+end
+-- }}}
+-------------------------------------------------
+-- buildinit_hook
+--- at return 0
+--- at usage public
+local function buildinit_hook () return 0 end
+-------------------------------------------------
+-- buildinit {{{
+-- hack copy of checkinit()
+--- at return 0 on success, error level otherwise
+--- at see
+--- at usage public
+local function buildinit ()
+ cleandir(fnt.fntdir)
+ -- l3build never cleans this by default?
+ cleandir(localdir)
+ fnt.dep_install (fnt.builddeps)
+ -- is this a appropriate? better not?
+ for i,j in ipairs(filelist(localdir)) do
+ cp(j,localdir,fnt.fntdir)
+ end
+ print("Unpacking ...\n")
+ -- direct usage is legitimate ...
+ -- https://chat.stackexchange.com/transcript/message/66617079#66617079
+ local errorlevel = unpack()
+ if errorlevel ~= 0 then
+ fnt.gwall("Unpacking ",module,errorlevel)
+ return fnt.nifergwall
+ else
+ for i,j in ipairs(fnt.buildfiles) do
+ cp(j,unpackdir,fnt.fntdir)
+ end
+ if #fnt.buildsuppfiles_sys ~= 0 then
+ for _,j in ipairs(fnt.buildsuppfiles_sys) do
+ if fileexists(j) then
+ cp(basename(j),dirname(j),fnt.fntdir)
+ else
+ local jpath = kpse.find_file(j)
+ local jdir = dirname(jpath)
+ cp(j,jdir,fnt.fntdir)
+ end
+ end
+ end
+ end
+ if not fnt.buildsearch then
+ -- we aren't typesetting, so we really don't need a map file
+ -- not sure this is really needed - do any tools use this anyway?
+ -- https://rosettacode.org/wiki/Create_a_file
+ io.open(fnt.fntdir .. "/pdftex.map", "w"):close()
+ end
+ return buildinit_hook()
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- build_fnt {{{
+--- at param file string
+--- at param cmd string
+--- at param file string
+--- at return 0 on success, error level otherwise
+--- at see
+--- at usage public
+local function build_fnt (dir,cmd,file)
+ file = file or ""
+ cmd = cmd or ""
+ dir = dir or unpackdir
+ local build_fnt_env = fnt.build_fnt_env or {}
+ local build_fnt_envset = ""
+ if #build_fnt_env ~= 0 then
+ for _,i in ipairs(build_fnt_env) do
+ build_fnt_envset = build_fnt_envset .. os_concat .. os_setenv .. " " .. i
+ end
+ end
+ -- steal from l3build-check.lua
+ local preamble =
+ -- would it be simpler to copy the typesetting sandbox here?
+ -- paths in the logs don't matter and copying localdir complicates things a bit
+ -- No use of localdir here as the files get copied to testdir:
+ -- avoids any paths in the logs
+ os_setenv .. " TEXINPUTS=." .. fnt.localtexmf()
+ .. (fnt.buildsearch and os_pathsep or "")
+ .. os_concat ..
+ -- no need for LUAINPUTS here
+ -- but we need to set more variables ...?!
+ (fnt.buildsearch and "" or
+ (os_setenv .. " TEXMFAUXTREES={}"
+ .. os_concat .. os_setenv .. " TEXMFHOME={}"
+ .. os_concat .. os_setenv .. " TEXMFLOCAL={}"
+ .. os_concat .. os_setenv .. " TEXMFCONFIG=."
+ .. os_concat .. os_setenv .. " TEXMFVAR=."
+ .. os_concat .. os_setenv .. " VFFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " TFMFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " TEXFONTMAPS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " T1FONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " AFMFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " TTFFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " OPENTYPEFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " LIGFONTS=${TEXINPUTS}"
+ .. os_concat .. os_setenv .. " ENCFONTS=${TEXINPUTS}")
+ )
+ .. build_fnt_envset
+ .. os_concat
+ local errorlevel = runcmd(
+ preamble .." " .. cmd .. " " .. file, dir
+ )
+ fnt.gwall(cmd,file,errorlevel)
+ return errorlevel
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- fntkeeper {{{
+--- at param dir string
+--- at return 0 on success, error level otherwise
+--- at see
+--- at usage public
+local function fntkeeper (dir)
+ dir = dir or fnt.fntdir
+ local rtn = direxists(fnt.keepdir)
+ if not rtn then
+ local errorlevel = mkdir(fnt.keepdir)
+ if errorlevel ~= 0 then
+ print("DO NOT BUILD STANDARD TARGETS WITHOUT RESOLVING!!\n")
+ fnt.gwall("Attempt to create directory ", fnt.keepdir, errorlevel)
+ end
+ else
+ local errorlevel = cleandir(fnt.keepdir)
+ if errorlevel ~= 0 then
+ print("KEEP CONTAMINATED!\n")
+ fnt.gwall("Attempt to clean directory ",fnt.keepdir,errorlevel)
+ end
+ end
+ local keepdir = abspath(fnt.keepdir) -- abspath requires existence
+ if fnt.keepfiles ~= {} then
+ for i,j in ipairs(fnt.keepfiles) do
+ local rtn = cp(j, dir, keepdir)
+ if rtn ~= 0 then
+ fnt.gwall("Copy ", j, errorlevel)
+ print("DO NOT BUILD STANDARD TARGETS WITHOUT RESOLVING!\n")
+ end
+ end
+ else
+ print("ARE YOU SURE YOU DON'T WANT TO KEEP THE FONTS??!!\n")
+ end
+ if fnt.keeptempfiles ~= {} then
+ rtn = direxists(fnt.keeptempdir)
+ if not rtn then
+ local errorlevel = mkdir(fnt.keeptempdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Attempt to create directory ", fnt.keeptempdir, errorlevel)
+ end
+ else
+ local errorlevel = cleandir(fnt.keeptempdir)
+ if errorlevel ~= 0 then
+ print("keeptemp contaminated!\n")
+ fnt.gwall("Attempt to clean directory ",fnt.keeptempdir,errorlevel)
+ end
+ end
+ for i,j in ipairs(fnt.keeptempfiles) do
+ local errorlevel = cp(j,dir,fnt.keeptempdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Copy ", j, errorlevel)
+ end
+ end
+ end
+ return fnt.nifergwall
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- fnt_subset {{{
+--- at params fd, family, fnt.subset
+--- at usage private
+local function fnt_subset (fd,fam,subset)
+ local defn = string.gsub(fnt.subsettemplate,"%$FONTFAMILY",fam)
+ defn = string.gsub(defn,"%$SUBSET",subset)
+ local f = assert(io.open(fnt.fntdir .. "/" .. fd, "rb"))
+ local content = f:read("*all")
+ f:close()
+ local patt
+ if string.match(content, "\\endinput") then
+ patt = "(\\endinput)"
+ else
+ patt = "()$"
+ end
+ f = assert(io.open(fnt.fntdir .. "/" .. fd, "w"))
+ f:write("%% Encoding subset declaration added by fontscripts\n",
+ (string.gsub(content,patt,"\n\n" .. defn .. "\n\n%1"))
+ )
+ f:close()
+ return 0 -- how to make this return an error level?
+end
+-- }}}
+-------------------------------------------------
+-- fntsubsetter {{{
+--- at param
+--- at description add encoding fnt.subset definitions for TS1 if applicable and requested
+--- at return 0 on success, error level or 1 otherwise
+--- at see
+--- at usage public
+local function fntsubsetter ()
+ local tcsubset = tcsubset or "9"
+ if fnt.subset == nil or fnt.subset == false then return 0 end
+ local subsetfiles = fnt.subsetfiles or {}
+ if type(subsetfiles) == "string" and subsetfiles ~= "auto" then
+ local s = subsetfiles
+ subsetfiles = { s }
+ end
+ if #subsetfiles == 0 then
+ for i in lfs.dir(fnt.fntdir) do
+ -- we avoid using filelist() here because it doesn't support char sets
+ if string.match(i, "^[Tt][Ss]1.*%.fd$") then
+ table.insert(subsetfiles,i)
+ end
+ end
+ end
+ if #subsetfiles == 0 then return 0 end
+ for _, i in ipairs(subsetfiles) do
+ local fam = string.gsub(i, "^[Tt][Ss]1(.+)%.fd$", "%1")
+ local s = fnt.subsetdefns[fam] or tcsubset
+ local errorlevel = fnt_subset(i,fam,s)
+ fnt.gwall("Inserting TS1 subset definition ",i,errorlevel)
+ end
+ return fnt.nifergwall
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- uniquify {{{
+-- oherwydd fy mod i bron ag anfon pob un ac mae'n amlwg fy mod i wedi anfon
+-- bacedi heb ei wneud hwn yn y gorffennol, well i mi wneud rhywbeth (scriptiau
+-- gwneud-cyhoeddus a make-public yn argraffu rhybudd os encs yn y cymysg
+-- (cymraeg yn ofnadwy hefyd)
+--- at param tag string
+--- at return 0 on success, error level or 1 otherwise
+--- at see
+--- at usage public
+local function uniquify (tag)
+ local dir = ""
+ tag = tag or fnt.encodingtag or ""
+ local pkgbase = fnt.pkgbase or ""
+ local pkglist = {}
+ if standalone then
+ dir = fnt.keepdir
+ else
+ dir = fnt.fntdir
+ end
+ if fileexists(dir .. "/pdftex.map") then
+ print("\nRemoving temporary pdftex.map from ", dir, "...\n")
+ local errorlevel = rm(dir,"pdftex.map")
+ fnt.gwall("Removing ","pdftex.map",errorlevel)
+ end
+ if pkgbase == "" then
+ print("pkgbase unspecified. Trying to guess ... ")
+ if not standalone then
+ pkglist = filelist(dir,"*.sty")
+ if #pkglist == 0 then
+ pkglist = filelist(unpackdir,"*.sty")
+ end
+ if #pkglist ~= 0 then
+ pkgbase = string.gsub(pkglist[1], "%.sty", "")
+ print("Guessing ", pkgbase)
+ end
+ end
+ end
+ if pkgbase == "" then
+ if ctanpkg ~= module and module ~= "" and module ~= nil then
+ print("Guessing ", module)
+ pkgbase = module
+ else
+ pkgbase = string.gsub(ctanpkg, "adf$", "")
+ if pkgbase ~= "" then
+ print("Guessing ", pkgbase)
+ end
+ end
+ end
+ if pkgbase == "" then
+ pkgbase = "NotAMatchAtAll"
+ fnt.gwall("Guessing pkgbase ","",1)
+ end
+ local encs = encs or filelist(dir,"*.enc")
+ local maps = maps or filelist(dir,"*.map")
+ print("Uniquifying encodings ... ")
+ for _,i in ipairs(encs) do print(" ", i) end
+ print("\nUniquifying maps ... ")
+ for _,i in ipairs(maps) do print(" ", i) end
+ print(" ...\n")
+ if #encs == 0 then
+ return 0
+ elseif tag == "" then
+ if #maps ~= 0 then
+ if #maps == 1 then
+ tag = string.gsub(maps[1],"%.map$","")
+ else
+ local t = ""
+ local tt = ""
+ for i,j in ipairs(maps) do
+ if tt == t then
+ tt = string.gsub(j,"%w%.map$","")
+ elseif t == "" then
+ t = string.gsub(j,"%w%.map$","")
+ end
+ end
+ if t == tt then
+ tag = tt
+ else
+ fnt.gwall("Attempt to find tag ","",1)
+ end
+ end
+ end
+ if tag ~= "" then
+ for i, j in ipairs(encs) do
+ if string.match(j,"-" .. tag .. "%.enc$")
+ or string.match(j, module)
+ or string.match(j,ctanpkg)
+ or string.match(j,pkgbase)
+ or string.match(j, string.gsub(module, "adf", "")) then
+ print(j, "... OK\n")
+ else
+ local targenc = (string.gsub(j,"%.enc$","-" .. tag .. ".enc"))
+ print("Target encoding is", targenc, "\n")
+ if fileexists(dir .. "/" .. targenc) then
+ fnt.gwall("Target encoding exists !! ", targenc, 1)
+ return 1
+ else
+ local f = assert(io.open(dir .. "/" .. j,"rb"))
+ local content = f:read("*all")
+ f:close()
+ local new_content = (string.gsub(content,
+ "(\n%%%%BeginResource: encoding fontinst%-autoenc[^\n ]*)( *\n/fontinst%-autoenc[^ %[]*)( %[)",
+ "\n%% Encoding renamed by fontscripts\n\n%1-"
+ .. tag .. "%2-" .. tag .. "%3"
+ ))
+ if new_content ~= content then
+ print("Writing unique encoding to ", targenc)
+ f = assert(io.open(dir .. "/" .. targenc,"w"))
+ -- remove the second value returned by string.gsub
+ f:write((string.gsub(new_content,"\n",fnt.os_newline_cp)))
+ f:close()
+ if fileexists(dir .. "/" .. targenc) then
+ local errorlevel = rm(dir,j)
+ if errorlevel ~= 0 then
+ fnt.gwall("Attempt to rm old encoding ",j,errorlevel)
+ end
+ if #maps ~= 0 then
+ local jpatt = string.gsub(j,"%-","%%-")
+ jpatt = string.gsub(jpatt,"%.","%%.")
+ for k,m in ipairs(maps) do
+ f = assert(io.open(dir .. "/" .. m,"rb"))
+ local mcontent = f:read("*all")
+ f:close()
+ local new_mcontent = (string.gsub(mcontent,
+ "(%<%[?)" .. jpatt ..
+ "( %<%w+%.pfb \" fontinst%-autoenc[%w%-_]*)( ReEncodeFont)",
+ "%1" .. targenc .. "%2-" .. tag .. "%3"
+ ))
+ if new_mcontent ~= mcontent then
+ print("Writing adjusted map lines to ", m)
+ f = assert(io.open(dir .. "/" .. m,"w"))
+ -- remove the second value returned by string.gsub
+ f:write("%% Encodings renamed by fontscripts\n",
+ (string.gsub(new_mcontent,"\n",fnt.os_newline_cp)))
+ f:close()
+ else
+ print("Nothing to do for ", m, ".\n")
+ end
+ end
+ else
+ print("FOUND NO MAPS??\n")
+ end
+ else
+ fnt.gwall("Attempt to write ",targenc,1)
+ end
+ else
+ fnt.gwall("Attempt to uniquify " .. j .. " as ",targenc,1)
+ end
+ end
+ end
+ end
+ end
+ return fnt.nifergwall
+ end
+ print("Something weird happened.\n")
+ return 1
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- fontinst
+-------------------------------------------------
+-- finst {{{
+--- at param patt string
+--- at param dir string
+--- at param mode string
+--- at return
+--- at see
+--- at usage public
+local function finst (patt,dir,mode)
+ dir = dir or "."
+ mode = mode or "nonstopmode"
+ local cmd = "pdftex --interaction=" .. mode
+ -- https://lunarmodules.github.io/luafilesystem/examples.html (expl)
+ -- l3build-file-functions.lua (filelist fn)
+ local targs = filelist(dir,patt)
+ for i,j in ipairs(targs) do
+ -- local errorlevel = tex(j,dir,cmd)
+ local errorlevel = build_fnt(dir,cmd,j)
+ fnt.gwall("Compilation of ", j, errorlevel)
+ end
+end
+-- }}}
+-------------------------------------------------
+-- fontinst {{{
+--- at param dir string
+--- at param mode string
+--- at return 0 on success, error level otherwise
+--- at see
+--- at usage public
+local function fontinst (dir,mode)
+ -- dir = dir or unpackdir
+ dir = dir or fnt.fntdir
+ mode = mode or "errorstopmode --halt-on-error"
+ standalone = false
+ fnt.encodingtag = fnt.encodingtag or ""
+ if #fnt.buildsuppfiles_sys == 0 then
+ print("Assuming all fontinst files should be available during build.\n")
+ local path = kpse.var_value("TEXMFDIST") .. "/tex/fontinst"
+ fnt.buildsuppfiles_sys = fnt.lsrdir(path)
+ end
+ buildinit ()
+ local tfmfiles = filelist(dir,"*.tfm")
+ for i,j in ipairs(tfmfiles) do
+ local plname = string.gsub(j, "%.tfm$", ".pl")
+ if fileexists(dir .. "/" .. plname) then
+ print(plname, "already exists!")
+ return 1
+ else
+ local cmd = "tftopl " .. j .. " " .. plname
+ -- safe or not?
+ local errorlevel = runcmd(cmd,dir)
+ -- necessary or not?
+ -- local errorlevel = build_fnt(cmd,dir)
+ fnt.gwall("Conversion to pl from tfm ",j,errorlevel)
+ -- remove tfm to reduce pollution of package later
+ rm(dir,j)
+ fnt.gwall("Deletion of tfm ", j, errorlevel)
+ end
+ end
+ for i,j in ipairs(fnt.familymakers) do
+ local errorlevel = finst(j,dir,mode)
+ fnt.gwall("Compilation of driver ", j, errorlevel)
+ end
+ if fnt.nifergwall ~= 0 then return fnt.nifergwall end
+ for i,j in ipairs(fnt.mapmakers) do
+ local errorlevel = finst (j,dir,mode)
+ fnt.gwall("Compilation of map ", j, errorlevel)
+ end
+ if fnt.nifergwall ~= 0 then return fnt.nifergwall end
+ print("Tidying up build directory ...\n")
+ for _,i in ipairs(fnt.buildsuppfiles_sys) do
+ local errorlevel = rm(dir,i)
+ fnt.gwall("Removal of ",dir .. "/" .. i,errorlevel)
+ end
+ for i,j in ipairs(fnt.binmakers) do
+ local targs = filelist(dir,j)
+ -- https://www.lua.org/pil/21.1.html
+ for k,m in ipairs(targs) do
+ targ = dir .. "/" .. m
+ -- is this really the right way to do this?
+ -- surely it is not at all safe?
+ -- though presumably no worse than executing the script directly
+ for line in io.lines(targ) do
+ if string.match(line,"^pltotf [a-zA-Z0-9%-]+%.pl [a-zA-Z0-9%-]+%.tfm$") then
+ -- local errorlevel = runcmd(line,dir)
+ local errorlevel = build_fnt(dir,line)
+ fnt.gwall("Creation of TFM using " .. line .. " from ", j, errorlevel)
+ else
+ print("Ignoring unexpected line \"" .. line .. "\" in", j .. ".\n")
+ fnt.nifergwall = fnt.nifergwall + 1
+ end
+ end
+ end
+ end
+ if fnt.nifergwall ~= 0 then return fnt.nifergwall end
+ local targs = filelist(dir,"*.vpl")
+ for i,j in ipairs(targs) do
+ -- local cmd = "vptovf " .. j
+ -- local errorlevel = runcmd(cmd,dir)
+ local cmd = "vptovf"
+ local errorlevel = build_fnt(dir,cmd,j)
+ fnt.gwall("Creation of virtual font from ", j, errorlevel)
+ end
+ -- edit the .fd files if a scale factor is declared because fontinst
+ -- doesn't allow us to do this and the last message to the mailing list
+ -- is from 2022 with no response from the maintainer
+ local fdfiles = filelist(dir, "*.fd")
+ for i,j in ipairs(fdfiles) do
+ local f = assert(io.open(dir .. "/" .. j,"rb"))
+ local content = f:read("*all")
+ f:close()
+ local new_content = content
+ local csscaleaux = string.match(content, "%<%-%> *\\([%a%d][%a%d]*@@scale)")
+ if csscaleaux ~= nil then
+ local csscale = string.gsub(csscaleaux, "@(@)", "%1")
+ if csscale ~= nil then
+ new_content = string.gsub(content, "(\\DeclareFontFamily{)",
+ "%% addaswyd o t1phv.fd (dyddiad y ffeil fd: 2020-03-25)\n\\expandafter\\ifx\\csname "
+ .. csscale .. "\\endcsname\\relax\n \\let\\" .. csscaleaux
+ .. "\\@empty\n\\else\n \\edef\\" .. csscaleaux
+ .. "{s*[\\csname " .. csscale .. "\\endcsname]}%%\n\\fi\n\n%1")
+ end
+ end
+ csscaleaux = string.match(content,
+ "\\DeclareFontFamily{[^}]*}{[^}]*}{[^}]*\\hyphenchar *\\font *=[^}\n]*}")
+ if csscaleaux ~= nil then
+ content = new_content
+ new_content = string.gsub(content,
+ "(\\DeclareFontFamily{[^}]*}{[^}]*}{\\hyphenchar) *(\\font) *(=[^ }\n]*) *([^ }\n]* *})",
+ "%1%2%3%4")
+ end
+ if new_content ~= content then
+ local f = assert(io.open(dir .. "/" .. j,"w"))
+ -- this somehow removes the second value returned by string.gsub??
+ f:write("%% Scaling added by fontscripts\n",(string.gsub(new_content,
+ "\n",fnt.os_newline_cp)))
+ f:close()
+ end
+ end
+ local errorlevel = uniquify(fnt.encodingtag)
+ if errorlevel ~= 0 then
+ fnt.gwall("Encodings not uniquified! Do not submit to CTAN! uniquify("
+ .. fnt.encodingtag .. ")","",errorlevel)
+ end
+ errorlevel = fntsubsetter()
+ if errorlevel ~= 0 then
+ fnt.gwall("Encoding fnt.subset definitions not inserted! fntsubsetter() ","",errorlevel)
+ end
+ errorlevel = fntkeeper()
+ if errorlevel ~= 0 then
+ fnt.gwall(
+ "FONT KEEPER FAILED! DO NOT MAKE STANDARD TARGETS WITHOUT RESOLVING!! fntkeeper() ",
+ dir, errorlevel)
+ end
+ return fnt.nifergwall
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- afm2tfm (simple symbol fonts only)
+-------------------------------------------------
+-- afm2tfm (dir) {{{
+--- at param dir string
+--- at return 0 on success, number of errors otherwise
+--- at see
+--- at usage public
+local function afm2tfm (dir)
+ dir = dir or fnt.fntdir
+ local fntbasename = fntbasename or module
+ local map = mapfile or fntbasename .. ".map"
+ local fntencs = fnt.encs or {}
+ standalone = false
+ fnt.encodingtag = fnt.encodingtag or ""
+ buildinit ()
+ print("Running afm2tfm. Please be patient ...\n")
+ local afms = filelist(dir,"*.afm")
+ local content = ""
+ for i,k in ipairs(afms) do
+ j = string.gsub(k,"%.afm","")
+ if fntencs[j] == nil then
+ local rtn = fileexists(dir .. "/" .. j .. ".enc")
+ if not rtn then
+ errorlevel = build_fnt(dir,"afm2tfm " .. k " >> " .. dir
+ .. "/" .. map .. ".tmp")
+ else
+ errorlevel = build_fnt(dir, "afm2tfm " .. k .. " -p " .. j
+ .. ".enc" .. " >> " .. dir .. "/" .. map .. ".tmp")
+ end
+ elseif not fileexists(dir .. "/" .. fntencs[j]) then
+ fnt.gwall("Search for encoding specified for " .. j .. " ",dir,1)
+ else
+ errorlevel = build_fnt(dir, "afm2tfm " .. k .. " -p " .. fntencs[j]
+ .. " >> " .. dir .. "/" .. map .. ".tmp")
+ end
+ if errorlevel ~= 0 then
+ fnt.gwall("afm2tfm (" .. j ..") ",dir,errorlevel)
+ else
+ local g = assert(io.open(dir .. "/" .. map .. ".tmp","rb"))
+ local c = g:read("all")
+ g:close()
+ content = content .. string.gsub(c, "\n", " <"
+ .. string.gsub(k,"%.afm",".pfb") .. "\n")
+ rm(dir, map .. ".tmp")
+ end
+ end
+ -- need to do this as uniquify() isn't used
+ -- otherwise the file ends up in localdir (and probably the package)
+ -- catching this is the only benefit I can see in my inability to clean localdir
+ if fileexists(dir .. "/pdftex.map") then
+ local errorlevel = rm(dir,"pdftex.map")
+ fnt.gwall("Removing ","pdftex.map",errorlevel)
+ end
+ local f
+ f = assert(io.open(dir .. "/" .. map, "w"))
+ f:write((string.gsub(content,"\n",fnt.os_newline_cp)))
+ f:close()
+ errorlevel = fntkeeper()
+ if errorlevel ~= 0 then
+ fnt.gwall("FONT KEEPER FAILED! DO NOT MAKE STANDARD TARGETS WITHOUT RESOLVING!! ",
+ dir, errorlevel)
+ end
+ return fnt.nifergwall
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- exports {{{
+fnt.build_fnt = build_fnt
+fnt.buildinit = buildinit
+fnt.buildinit_hook = buildinit_hook
+fnt.finst = finst
+fnt.fntkeeper = fntkeeper
+fnt.fntsubsetter = fntsubsetter
+fnt.afm2tfm = afm2tfm
+fnt.fontinst = fontinst
+fnt.map_cat = map_cat
+fnt.uniquify = uniquify
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-build.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-check.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-check.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-check.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,454 @@
+-- $Id: fntbuild-check.lua 10763 2025-02-04 20:28:32Z cfrees $
+-------------------------------------------------
+-- fntbuild-check
+-------------------------------------------------
+-- writes lvt files
+-- ensures build products are available
+-- enforces sandbox if checksearch is false
+-------------------------------------------------
+-------------------------------------------------
+-- local copio_aux {{{
+---Copy files or directory contents recursively.
+--- at return 0 on success, error level otherwise
+--- at see
+--- at param locs table
+--- at param dest string
+--- at param kpsevar string
+--- at param indent string
+--- at usage private
+local function copio_aux (locs,dest,kpsevar,indent)
+ indent = indent .. " "
+ for _,i in ipairs(locs) do
+ local path = kpse.var_value(kpsevar) .. i
+ local attr = lfs.attributes (path)
+ if type(attr) == "table" then
+ if attr.mode == "directory" then
+ print(indent .. i .. "/")
+ local tmpls = filelist(path)
+ for _,j in ipairs(tmpls) do
+ if j ~= "." and j ~= ".." then
+ local att = lfs.attributes (path .. "/" .. j)
+ assert (type(att) == "table")
+ if att.mode == "directory" then
+ copio_aux({path .. "/" .. j},dest,kpsevar,indent)
+ else
+ local errorlevel = cp(j,path,dest)
+ fnt.gwall("Copying ",path .. "/" .. j,errorlevel)
+ end
+ end
+ end
+ elseif fileexists(path) then
+ print(" " .. i)
+ local errorlevel = cp(basename(path),dirname(path),dest)
+ fnt.gwall("Copying ",path,errorlevel)
+ else
+ fnt.gwall("Lookup ",path,1)
+ end
+ else
+ fnt.gwall("Getting information about ",i,1)
+ end
+ end
+end
+-- }}}
+-------------------------------------------------
+-- local copio {{{
+---Copy files or directory contents recursively.
+--- at return 0 on success, error level otherwise
+--- at see
+--- at param locs table
+--- at param dest string
+--- at param kpsevar string
+--- at usage private
+local function copio (locs,dest,kpsevar)
+ if locs == nil then return 0 end
+ if #locs == 0 then return 0 end
+ kpsevar = kpsevar or "TEXMFDIST"
+ copio_aux(locs,dest,kpsevar,"")
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- local test {{{
+---Generates lvt files for l3build check from fds and template.
+--- at param fntpkgname string
+--- at param fds table
+--- at param content string
+--- at param maps table
+--- at param fdsdir string
+--- at return 0 on success, error level otherwise
+--- at see
+--- at usage public
+local function test (fntpkgname,fds,content,maps,fdsdir)
+ local coll = ""
+ -- suffix ly -> ly1 ; no suffix -> t1
+ local collly = ""
+ local targname = fntpkgname .. "-auto-test.lvt"
+ local targnamely = fntpkgname .. "-auto-test-ly1.lvt"
+ local targfile = unpackdir .. "/" .. targname
+ local targfilely = unpackdir .. "/" .. targnamely
+ -- ly1 boolean
+ local yy = 0
+ -- texnansi/ly1 fds
+ local lys = {}
+ -- ec/t1 fds
+ local ecs = {}
+ -- local mapsly = ""
+ print("Creating test file for", fntpkgname, "with fds: ")
+ for i, j in ipairs(fds) do print(" fd:", j) end
+ print("\n")
+ -- l3build-tagging.lua
+ for i, j in ipairs(fds) do
+ -- local errorlevel = cp(j, fnt.keepdir, unpackdir)
+ if string.match(j,"^ly1") then
+ yy = 1
+ table.insert(lys,j)
+ else
+ table.insert(ecs,j)
+ end
+ if fdsdir ~= unpackdir then
+ local errorlevel = cp(j, fdsdir, unpackdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Copy ", j, errorlevel)
+ return errorlevel
+ end
+ end
+ end
+ -- restart so we get the filtered list (hopefully)
+ for i, j in ipairs(ecs) do
+ j = unpackdir .. "/" .. j
+ for line in io.lines(j) do
+ -- it would be much better to filter the file list ...
+ if string.match(line,
+ "^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$") then
+ coll = (coll .. string.gsub(string.gsub(line,"%{$","%%%%"),
+ "^\\DeclareFontShape%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}",
+ "\n\\TEST{test-%1-%2-%3-%4}{%%%%\n \\sampler{%1}{%2}{%3}{%4}%%%%\n}"))
+ end
+ end
+ end
+ if yy == 1 then
+ for i, j in ipairs(lys) do
+ j = unpackdir .. "/" .. j
+ for line in io.lines(j) do
+ -- it would be much better to filter the file list ...
+ if string.match(line,
+ "^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$") then
+ collly = (collly .. string.gsub(string.gsub(line,"%{$","%%%%"),
+ "^\\DeclareFontShape%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}",
+ "\n\\TEST{test-%1-%2-%3-%4}{%%%%\n \\sampler{%1}{%2}{%3}{%4}%%%%\n}"))
+ end
+ end
+ end
+ coll = maps .. "\n\\usepackage[enc=t1]{" .. fntpkgname
+ .. "}\n\\begin{document}\n\\START\n"
+ .. coll .. "\n\\END\n\\end{document}\n"
+ collly = maps .. "\n\\usepackage[enc=ly1]{" .. fntpkgname
+ .. "}\n\\begin{document}\n\\START\n" .. collly
+ .. "\n\\END\n\\end{document}\n"
+ else
+ -- assume package doesn't have an encoding option and is t1/ts1 only
+ coll = maps .. "\n\\usepackage{" .. fntpkgname
+ .. "}\n\\begin{document}\n\\START\n" .. coll
+ .. "\n\\END\n\\end{document}\n"
+ end
+ -- coll = maps .. "\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n"
+ local new_content =
+ "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on "
+ .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n"
+ .. string.gsub(content, "\nSAMP *\n", coll)
+ local f = assert(io.open(targfile,"w"))
+ -- this somehow removes the second value returned by string.gsub??
+ f:write((string.gsub(new_content,"\n",fnt.os_newline_cp)))
+ f:close()
+ if yy == 1 then
+ new_content = "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on "
+ .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n" .. string.gsub(content,
+ "\nSAMP *\n", collly)
+ local f = assert(io.open(targfilely,"w"))
+ -- this somehow removes the second value returned by string.gsub??
+ f:write((string.gsub(new_content,"\n",fnt.os_newline_cp)))
+ f:close()
+ end
+ -- PAID Â CHEISIO YR ISOD!!
+ -- cp(targname,unpackdir,testfiledir)
+ local errorlevel = cp(targname,unpackdir,testdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Attempt to copy ", targname, errorlevel)
+ end
+ errorlevel = cp(targnamely,unpackdir,testdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Attempt to copy ", targnamely, errorlevel)
+ end
+ return fnt.nifergwall
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- redefine l3build function
+-------------------------------------------------
+-- local check_init {{{
+---Additional setup for testing tailored to font packages.
+--- at return 0 on success, error level otherwise
+--- at see l3build
+--- at usage N/A
+local function check_init ()
+ local filename = fnt.testtemp
+ local regfile = fnt.regress
+ local file = unpackdir .. "/" .. filename
+ -- local fnttestdir = maindir .. "/fnt-tests"
+ local maps = ""
+ local mapfiles=filelist(fnt.keepdir, "*.map")
+ local mapsdir = ""
+ local fdsdir = ""
+ -- local adds = checksuppfiles_addlst or maindir .. "/checksuppfiles-add.lst"
+ if not checksearch then
+ fnt.map_cat(fnt.mapfiles_sys,testdir)
+ end
+ -- how did this ever work?
+ for _,i in ipairs(filelist(fnt.keepdir)) do
+ if i ~= "." and i ~= ".." then
+ local errorlevel = cp(i,fnt.keepdir,testdir)
+ fnt.gwall("Copying ",i,errorlevel)
+ end
+ end
+ if not checksearch then
+ print("\nAssuming some basic files should be available during testing.\n\nAdding files to", testdir, "from")
+ if #fnt.checksuppfiles_sys == 0 then
+ fnt.checksuppfiles_sys = {
+ "/tex/latex/base/article.cls",
+ "/tex/latex/base/fontenc.sty",
+ "/tex/latex/base/omlcmm.fd",
+ "/tex/latex/base/omlcmr.fd",
+ "/tex/latex/base/omscmr.fd",
+ "/tex/latex/base/omscmsy.fd",
+ "/tex/latex/base/omxcmex.fd",
+ "/tex/latex/base/ot1cmr.fd",
+ "/tex/latex/base/ot1cmss.fd",
+ "/tex/latex/base/ot1cmtt.fd",
+ "/tex/latex/base/size10.clo",
+ "/tex/latex/base/size11.clo",
+ "/tex/latex/base/size12.clo",
+ "/tex/latex/base/t1cmr.fd",
+ "/tex/latex/base/t1cmss.fd",
+ "/tex/latex/base/t1cmtt.fd",
+ "/tex/latex/base/tracefnt.sty",
+ "/tex/latex/base/ts1cmr.fd",
+ "/tex/latex/base/ts1cmss.fd",
+ "/tex/latex/base/ts1cmtt.fd",
+ "/tex/latex/base/ucmr.fd",
+ "/tex/latex/base/ucmss.fd",
+ "/tex/latex/base/ucmtt.fd",
+ "/tex/latex/l3build",
+ "/tex/latex/l3backend",
+ "/tex/latex/fonttable/fonttable.sty",
+ "/fonts/enc/dvips/base",
+ "/fonts/enc/dvips/cm-super",
+ "/fonts/type1/public/amsfonts/cm",
+ "/fonts/type1/public/cm-super",
+ "/fonts/tfm/public/cm",
+ "/fonts/tfm/jknappen/ec",
+ }
+ end
+ copio(fnt.checksuppfiles_sys,testdir,"TEXMFDIST")
+ if not fileexists(testdir .. "/" .. regfile) then
+ if fileexists(unpackdir .. "/" .. regfile) then
+ cp(regfile,unpackdir,testdir)
+ print("Using regression tests from " .. unpackdir .. "/" .. regfile .. ".\n")
+ else
+ table.insert(fnt.checksuppfiles_add,regfile)
+ print("Adding " .. regfile .. "to fnt.checksuppfiles_add.\n")
+ end
+ else
+ print("Using regression tests from " .. testdir .. "/" .. regfile .. ".\n")
+ end
+ if #fnt.checksuppfiles_add ~= 0 then
+ local str = kpse.var_value("TEXMFDIST")
+ if string.match(str,"%-") then str = string.gsub(str,"%-","%%-") end
+ for _,j in ipairs(fnt.checksuppfiles_add) do
+ if string.match(j,"^/") then
+ copio({j},testdir,"TEXMFDIST")
+ else
+ local jpath = kpse.lookup(j)
+ if jpath ~= nil then
+ local jdir = dirname(jpath)
+ if string.match(jdir,"^" .. str) then
+ print(" " .. jpath)
+ local errorlevel = cp(j,jdir,testdir)
+ fnt.gwall("Copying ",j,errorlevel)
+ else
+ fnt.gwall("Restricted search for ",j,1)
+ end
+ else
+ fnt.gwall("Finding ",j,errorlevel)
+ end
+ end
+ end
+ end
+ end
+ -- setup & test creation
+ if #mapfiles == 0 then
+ mapfiles=filelist(unpackdir, "*.map")
+ if #mapfiles == 0 then
+ fnt.gwall("Attempt to find map files ", ".map", 1)
+ return 1
+ else
+ print("\nUsing maps from", unpackdir)
+ mapsdir = unpackdir
+ end
+ else
+ mapsdir = fnt.keepdir
+ print("\nUsing maps from", fnt.keepdir)
+ end
+ local fntpkgnames = fntpkgnames or filelist(unpackdir,"*.sty")
+ for i, j in ipairs(fntpkgnames) do
+ fntpkgnames[i] = string.gsub(j,"%.sty","")
+ end
+ -------
+ local autotestfdstmp = filelist(fnt.keepdir, "*.fd")
+ -- if they're not kept, they may be source (e.g. berenisadf)
+ if #autotestfdstmp == 0 then
+ autotestfdstmp = filelist(unpackdir, "*.fd")
+ if #autotestfdstmp == 0 then
+ fnt.gwall("Attempt to find fd files ", ".fd", 1)
+ return 1
+ else
+ fdsdir = unpackdir
+ print("Using fds from", unpackdir)
+ end
+ else
+ fdsdir = fnt.keepdir
+ print("Using fds from", fnt.keepdir)
+ end
+ if #autotestfdstmp == 0 then
+ print("Something is amiss - this code should never be executed!")
+ fnt.gwall("Attempt to locate fd files ", ".fd", 1)
+ elseif #fnt.autotestfds == 0 then
+ for i, j in ipairs(autotestfdstmp) do
+ if not ( string.match(j,"^ts1") or string.match(j,"^u") ) then
+ table.insert (fnt.autotestfds, j)
+ end
+ end
+ end
+ -------
+ -- if fntestfds.<package name> has been specified, use that (should be a table)
+ -- o/w assign the fnt.autotestfds table to fntestfds.<package name>
+ -- but remember fnt.fnttestfds may be pairs and/or ipairs ...
+ -- there must be a better way to do this ...
+ if #fnt.fnttestfds == 0 then
+ print("\n#fnt.fnttestfds:", #fnt.fnttestfds)
+ if #fnt.autotestfds ~= 0 then
+ print("#fnt.autotestfds:",#fnt.autotestfds)
+ for i,j in ipairs(fntpkgnames) do
+ if fnt.fnttestfds[j] == nil then
+ print("Auto-assigning fnt.autotestfds to fnt.fnttestfds[" .. j .. "] ...\n")
+ fnt.fnttestfds[j] = {}
+ for a,b in ipairs(fnt.autotestfds) do
+ table.insert(fnt.fnttestfds[j],b)
+ end
+ end
+ end
+ end
+ else
+ local testmes = {}
+ for i,j in ipairs(fnt.fnttestfds) do
+ table.insert(testmes,j)
+ end
+ for i, j in ipairs(fntpkgnames) do
+ -- I really don't understand tables (and I know this is very, very basic)
+ if fnt.fnttestfds[j] == nil then
+ fnt.fnttestfds[j] = {}
+ -- use only if fnt.fnttestfds isn't specified either as table of tables or
+ -- table of files/globs
+ -- this doesn't seem very robust
+ for k, l in ipairs(testmes) do
+ table.insert (fnt.fnttestfds[j], l)
+ end
+ end
+ end
+ end
+ -------
+ for i, j in ipairs(mapfiles) do
+ maps = maps .. "\n\\pdfmapfile{-" .. j .. "}\n\\pdfmapfile{+" .. j .. "}"
+ end
+ -- maps = maps .. "\n\\pdfmapfile{+pdftex.map}"
+ if next(fnt.fnttestfds) == nil then
+ print("Skipping test creation.\n")
+ else
+ print("Creating (additional) test file(s).\n")
+ if not fileexists(unpackdir .. "/" .. filename) then
+ if fileexists(testdir .. "/" .. filename) then
+ cp(filename,testdir,unpackdir)
+ print("Using local " .. filename .. " from " .. testdir .. "...\n")
+ elseif fileexists(localdir .. "/" .. filename) then
+ cp(filename,localdir,unpackdir)
+ print("Using " .. filename .. " from " .. localdir .. "...\n")
+ else
+ local ffeil = kpse.find_file(filename)
+ if ffeil ~= nil then
+ cp(filename,dirname(ffeil),unpackdir)
+ print("Using " .. filename .. " from " .. dirname(ffeil) .. " ...\n")
+ else
+ print("Skipping test creation. This is probably not what you want if I've come this far.\n")
+ filename = 0
+ fnt.gwall("Copy ", filename, 1)
+ end
+ end
+ else
+ print("Using local " .. filename .. " ...\n")
+ end
+ -- local errorlevel = cp(filename,fnttestdir,unpackdir)
+ -- local errorlevel = ren(unpackdir, filename, targname)
+ if filename ~= 0 then
+ -- need to get content here
+ -- copy this from l3build-tagging.lua
+ local f = assert(io.open(file,"rb"))
+ local content = f:read("*all")
+ f:close()
+ -- ought to normalise line endings here
+ -- copied from l3build
+ -- but I don't understand why the first subs is needed
+ -- is it a problem if the file doesn't end with a newline?
+ content = string.gsub(content .. (string.match(content,"\n$") and ""
+ or "\n"), "\r\n", "\n")
+ content = string.gsub(content,
+ "\\RequirePackage%{svn%-prov%}\n\\ProvidesFileSVN%{[^%}]*%}%[[^%]]*%]%[[^%]]*%]\n",
+ "")
+ for i, j in ipairs(fntpkgnames) do
+ -- create the test file for each package
+ -- errorlevel = test(j,fnt.fnttestfds[j],content,maps)
+ -- dyw fnt.fnttestfds.j ddim yn gweithio yma!!
+ errorlevel = test(j,fnt.fnttestfds[j],content,maps,fdsdir)
+ if errorlevel ~= 0 then
+ fnt.gwall("Font test creation ", j, errorlevel)
+ return errorlevel
+ end
+ end
+ rm(unpackdir,filename)
+ end
+ end
+ if not checksearch then
+ local localtexmf = fnt.localtexmf()
+ checkopts = checkopts
+ .. " --cnf-line=TEXMFAUXTREES={} --cnf-line=TEXMFHOME={} --cnf-line=TEXMFLOCAL={} --cnf-line=TEXMFCONFIG=. --cnf-line=TEXMFVAR=. --cnf-line=VFFONTS=."
+ .. localtexmf .. " --cnf-line=TFMFONTS=."
+ .. localtexmf .. " --cnf-line=TEXFONTMAPS=."
+ .. localtexmf .. " --cnf-line=T1FONTS=."
+ .. localtexmf .. " --cnf-line=AFMFONTS=."
+ .. localtexmf .. " --cnf-line=TTFFONTS=."
+ .. localtexmf .. " --cnf-line=OPENTYPEFONTS=."
+ .. localtexmf .. " --cnf-line=LIGFONTS=."
+ .. localtexmf .. " --cnf-line=ENCFONTS=."
+ .. localtexmf
+ end
+ return 0
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- exports {{{
+fnt.checkinit_hook = check_init
+fnt.test = test
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-check.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-ctan.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-ctan.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-ctan.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,114 @@
+-- $Id: fntbuild-ctan.lua 10743 2025-01-29 02:29:53Z cfrees $
+-------------------------------------------------
+local exts = {}
+
+-------------------------------------------------
+-- origcopyctan()
+-- copy David Carlisle
+local origcopyctan = copyctan
+
+-------------------------------------------------
+-- local extname(filename) {{{
+local function extname(filename)
+ local b = basename(filename)
+ ext = string.gsub(b, "^[^%.]*%.", "")
+ if ext == nil then
+ fnt.gwall("Failed to get extension ",ext,1)
+ end
+ return ext
+end
+-- }}}
+-------------------------------------------------
+-- local copysubctan(files,srcdir,targdir) {{{
+local function copysubctan(files,srcdir,targdir)
+ local errorlevel
+ local extdir
+ if not direxists(targdir) then
+ errorlevel = mkdir(targdir)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ for i,j in ipairs(files) do
+ local ext = extname(j)
+ if exts[ext] == nil then
+ extdir = ext
+ exts[ext] = ext
+ else
+ extdir = exts[ext]
+ end
+ if not direxists(targdir .. "/" .. extdir) then
+ errorlevel = mkdir(targdir .. "/" .. extdir)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ errorlevel = cp(j,srcdir,targdir .. "/" .. extdir)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ return 0
+end
+-- }}}
+-------------------------------------------------
+-- local copy_ctan() {{{
+local function copy_ctan()
+ local keepdir = fnt.keepdir or sourcefiledir .. "/keep"
+ local errorlevel
+ local targdir = ctandir .. "/" .. ctanpkg
+ keptfiles = {}
+ if #exts == 0 then exts = {"afm","dtx","enc","fd","ins","map","md",
+ "otf","pdf","pfb","pfm","tex","tfm","txt","vf"} end
+ if not exts["pfb"] then exts["pfb"] = "type1" end
+ if not exts["pfm"] then exts["pfm"] = "type1" end
+ if not exts["ttf"] then exts["ttf"] = "truetype" end
+ if not exts["otf"] then exts["otf"] = "opentype" end
+ if not exts["fd"] then exts["fd"] = "latex" end
+ if not exts["dtx"] then exts["dtx"] = "source" end
+ if not exts["ins"] then exts["ins"] = "source" end
+ if not exts["md"] then exts["md"] = "doc" end
+ if not exts["txt"] then exts["txt"] = "doc" end
+ if not exts["tex"] then exts["tex"] = "doc" end
+ if not exts["pdf"] then exts["pdf"] = "doc" end
+ for i,j in ipairs(filelist(keepdir,"*.*")) do
+ if j ~= "." and j ~= ".." then
+ table.insert(keptfiles,j)
+ end
+ end
+ copysubctan(keptfiles,keepdir,targdir)
+ origcopyctan()
+ local g = {}
+ for i,j in ipairs(exts) do
+ local f = filelist(targdir,"*." .. j)
+ if #f ~= 0 then
+ for m,n in ipairs(f) do
+ if n ~= "README.md" and n ~= "README" then
+ table.insert(g,n)
+ end
+ end
+ end
+ end
+ if #g ~= 0 then
+ errorlevel = copysubctan(g,targdir,targdir)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ for i,j in ipairs(exts) do
+ errorlevel = rm(targdir, "*." .. j)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ if fileexists(targdir .. "/COPYING") then
+ if not direxists(targdir .. "/doc") then mkdir(targdir .. "/doc") end
+ errorlevel = cp("COPYING",targdir,targdir .. "/doc")
+ if errorlevel ~= 0 then return errorlevel end
+ errorlevel = rm(targdir, "COPYING")
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ -- this is horrible: ctan() copies all the files, we deal with them,
+ -- and then it copies all the textfiles a second time!
+ textfiles = {"README","README.md"}
+ return 0
+end
+-- end copyctan() }}}
+-------------------------------------------------
+-------------------------------------------------
+-- exports {{{
+fnt.copyctan = copy_ctan
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-ctan.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-doc.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-doc.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-doc.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,104 @@
+-- $Id: fntbuild-doc.lua 10769 2025-02-05 20:41:12Z cfrees $
+-------------------------------------------------
+-- fntbuild-doc
+-------------------------------------------------
+-------------------------------------------------
+-- redefine l3build fn
+-------------------------------------------------
+-- local doc_init {{{
+---Additional setup for typesetting tailored to font packages with optional
+---creation of template-based docs e.g. font tables.
+--- at return 0 on success, error level otherwise
+--- at see l3build
+--- at usage N/A
+local function doc_init ()
+ -- local fdfiles = filelist(fnt.keepdir, "*.fd")
+ local fdfiles = filelist(unpackdir, "*.fd")
+ local filename = fnt.tablestemp
+ local targname = ctanpkg .. "-tables.tex"
+ local file = unpackdir .. "/" .. filename
+ local targfile = unpackdir .. "/" .. targname
+ local coll = ""
+ -- local fnttestdir = maindir .. "/fnt-tests"
+ local maps = ""
+ local mapfiles=filelist(unpackdir, "*.map")
+ local yy = 0
+ for i, j in ipairs(mapfiles) do
+ maps = maps .. "\n\\pdfmapfile{-" .. j .. "}\n\\pdfmapfile{+" .. j .. "}"
+ end
+ if not fileexists(unpackdir .. "/" .. filename) then
+ if fileexists(typesetdir .. "/" .. filename) then
+ cp(filename,typesetdir,unpackdir)
+ print("Using " .. filename .. " from " .. typesetdir .. ".")
+ elseif fileexists(localdir .. "/" .. filename) then
+ cp(filename,localdir,unpackdir)
+ print("Using " .. filename .. " from " .. localdir .. ".")
+ else
+ local ffeil = kpse.find_file(filename)
+ if ffeil ~= nil then
+ cp(filename,dirname(ffeil),unpackdir)
+ print("Using " .. filename .. " from " .. dirname(ffeil) .. ".")
+ else
+ print("Skipping font tables.\n")
+ filename = nil
+ end
+ end
+ else
+ print("Using " .. filename .. " from " .. unpackdir .. ".")
+ end
+ if filename then
+ print("Creating font tables ...\n")
+ -- need to get content here
+ -- copy this from l3build-tagging.lua
+ local f = assert(io.open(file,"rb"))
+ local content = f:read("*all")
+ f:close()
+ -- ought to normalise line endings here
+ -- copied from l3build
+ -- but I don't understand why the first subs is needed
+ -- is it a problem if the file doesn't end with a newline?
+ content = string.gsub(content .. (string.match(content,"\n$") and ""
+ or "\n"), "\r\n", "\n")
+ content = string.gsub(content,
+ "\\RequirePackage%{svn%-prov%}\n\\ProvidesFileSVN%{[^%}]*%}%[[^%]]*%]%[[^%]]*%]\n",
+ "")
+ -- l3build-tagging.lua
+ for i, j in ipairs(fdfiles) do
+ if string.match(j,"^ly1") then
+ yy = 1
+ end
+ j = unpackdir .. "/" .. j
+ for line in io.lines(j) do
+ if string.match(line,
+ "^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$"
+ ) then
+ coll = (coll .. string.gsub(string.gsub(line,"%{$","%%%%"),
+ "^\\DeclareFontShape","\n\\sampletable"))
+ end
+ end
+ end
+ if yy == 1 then
+ maps = "\n\\input{ly1enc.def}\n" .. maps
+ end
+ coll = maps .. "\n\\begin{document}\n" .. coll .. "\n\\end{document}\n"
+ local new_content =
+ "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on "
+ .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n" .. string.gsub(content,
+ "\n%s*TABLES%s*\n", coll)
+ local f = assert(io.open(targfile,"w"))
+ f:write((string.gsub(new_content,"\n",fnt.os_newline_cp)))
+ f:close()
+ rm(unpackdir,filename)
+ cp(targname,unpackdir,typesetdir)
+ end
+ return 0
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- exports {{{
+fnt.docinit_hook = doc_init
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-doc.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-utils.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-utils.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-utils.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,156 @@
+-- $Id: fntbuild-utils.lua 10743 2025-01-29 02:29:53Z cfrees $
+-------------------------------------------------
+-- fntbuild-utils
+-------------------------------------------------
+-------------------------------------------------
+-- l3build duplicates
+-------------------------------------------------
+-- copy non-public things from l3build
+-- these are just copied because they aren't documented
+-- so we duplicate them as we're not entitled to use them o/w
+-- I've tried to eliminate local shorthands for clarity
+-- should these all be local? or renamed? or both?
+-------------------------------------------------
+-- os_newline_cp {{{
+local os_newline_cp = "\n"
+if os.type == "windows" then
+ if tonumber(status.luatex_version) < 100 or
+ (tonumber(status.luatex_version) == 100
+ and tonumber(status.luatex_revision) < 4) then
+ os_newline_cp = "\r\n"
+ end
+end
+-- }}}
+-------------------------------------------------
+-- localtexmf {{{
+-- from l3build-aux.lua
+-- Construct a localtexmf including any tdsdirs
+-- Needed for checking and typesetting, hence global
+local function localtexmf()
+ local paths = ""
+ for src,_ in pairs(tdsdirs) do
+ paths = paths .. os_pathsep .. abspath(src) .. "//"
+ end
+ if texmfdir and texmfdir ~= "" and direxists(texmfdir) then
+ paths = paths .. os_pathsep .. abspath(texmfdir) .. "//"
+ end
+ return paths
+end
+-- }}}
+-------------------------------------------------
+-- get_script_name {{{
+local function get_script_name()
+ if string.match(arg[0], "l3build$") or string.match(arg[0], "l3build%.lua$") then
+ return kpse.lookup("l3build.lua")
+ else
+ return arg[0] -- Why no lookup here?
+ end
+end
+-- }}}
+-------------------------------------------------
+-- dep_install {{{
+--- at param
+--- at return
+--- at see
+--- at usage
+local function dep_install(deps)
+ local error_level
+ for _, dep in ipairs(deps) do
+ print("Installing dependency:", dep)
+ error_level = run(dep, "texlua " .. get_script_name() .. " unpack -q")
+ if error_level ~= 0 then
+ return error_level
+ end
+ end
+ return 0
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- additions
+-------------------------------------------------
+-- lsrdir_aux {{{
+--- at param path string
+--- at param filenames table
+--- at return table
+--- at see
+--- at usage private
+local function lsrdir_aux (path,filenames)
+ for file in lfs.dir(path) do
+ if file ~= "." and file ~= ".." then
+ local f = path .. "/" .. file
+ local attr = lfs.attributes (f)
+ -- why is this necessary?
+ -- lfs.attributes does or doesn't return a table?
+ -- David Carlisle: poss. nil rather than table
+ -- -> assert then gives error
+ assert (type(attr) == "table")
+ if attr.mode == "directory" then
+ lsrdir_aux (f,filenames)
+ else
+ table.insert(filenames,file)
+ end
+ end
+ end
+ return filenames
+end
+-- }}}
+-- lsrdir {{{
+-- https://lunarmodules.github.io/luafilesystem/examples.html
+--- at param path string
+--- at param filenames table
+--- at return table
+--- at see
+--- at usage public
+local function lsrdir (path,filenames)
+ local filenames = filenames or {}
+ filenames = lsrdir_aux (path,filenames)
+ return filenames
+end
+-- }}}
+-------------------------------------------------
+-- build_config() {{{
+---use fntbuild-config.lua if found
+--- at usage private
+local function build_config()
+ local configs = {}
+ -- not sure what the correct test is here?
+ -- if options["target"] .. "search" then
+ if fnt.buildsearch then
+ local f = kpse.find_file("fntbuild-config.lua")
+ if f ~= nil then
+ dofile(f)
+ print("\nWARNING: Using local configuration from", f
+ .. ".\nYour package may not build elsewhere.\n")
+ table.insert(configs,f)
+ end
+ end
+ if fileexists(maindir .. "/fntbuild-config.lua") then
+ dofile(maindir .. "/fntbuild-config.lua")
+ print("\nUsing local configuration from", maindir
+ .. "/fntbuild-config.lua.\nEnsure this is included when publishing sources.\n")
+ table.insert(configs,maindir .. "/fntbuild-config.lua")
+ end
+ if fileexists(sourcefiledir .. "/fntbuild-config.lua") then
+ dofile(sourcefiledir .. "/fntbuild-config.lua")
+ print("\nUsing local configuration from", sourcefiledir
+ .. "/fntbuild-config.lua.\nEnsure this is included when publishing sources.\n")
+ table.insert(configs,sourcefiledir .. "/fntbuild-config.lua")
+ end
+ if #configs == 0 then
+ print("\nNo fntbuild-config.lua found.\nUsing defaults.\n")
+ end
+ return 0
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- exports {{{
+fnt.build_config = build_config
+fnt.dep_install = dep_install
+fnt.localtexmf = localtexmf
+fnt.lsrdir = lsrdir
+fnt.os_newline_cp = os_newline_cp
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-utils.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-vars.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-vars.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-vars.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,159 @@
+-- $Id: fntbuild-vars.lua 10763 2025-02-04 20:28:32Z cfrees $
+-- fntbuild variables
+-------------------------------------------------
+-------------------------------------------------
+-- l3build variables needed before l3build defines them {{{
+-------------------------------------------------
+sourcefiledir = sourcefiledir or "."
+maindir = maindir or sourcefiledir
+-- builddir
+-- should be global? or local is better?
+builddir = builddir or maindir .. "/build"
+-- }}}
+-------------------------------------------------
+-- l3build variables with changed defaults {{{
+-------------------------------------------------
+binaryfiles = {"*.pdf", "*.zip", "*.vf", "*.tfm", "*.pfb", "*.pfm", "*.ttf",
+ "*.otf", "*.tar.gz"}
+-- also very easy for font files not to get installed properly and the old ones used
+-- note this overrides the l3build default
+checksearch = false
+-- maindir before checkdeps
+-- maindir = "../.."
+-- checkdeps = { maindir .. "/fnt-tests" }
+checkengines = { "pdftex" }
+checkformat = "latex"
+-- cleanfiles changed below
+installfiles = {"*.afm", "*.cls", "*.enc", "*.fd", "*.map", "*.otf", "*.pfb",
+ "*.pfm", "*.sty", "*.tfm", "*.ttf", "*.vf"}
+-- need module test or default?
+sourcefiles = {"*.afm", "afm/*.afm", "*.pfb", "*.pfm", "*.dtx", "*.ins",
+ "opentype/*.otf", "*.otf", "tfm/*.tfm", "truetype/*.ttf", "*.ttf",
+ "type1/*.pfb", "type1/*.pfm"}
+-- tdslocations changed below
+typesetexe = "TEXMFDOTDIR=.:../local: pdflatex"
+typesetfiles = typesetfiles or {"*.dtx", "*-tables.tex", "*-example.tex"}
+-- typesetsourcefiles changed below
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- additional variables (inc. dependant changes) {{{
+-------------------------------------------------
+-------------------------------------------------
+-- font definitions to use when auto-generating tests
+--- at see fnt_test() checkinit_hook() fnt.fnttestfds
+--- at usage public
+fnt.autotestfds = fnt.autotestfds or {}
+-- script containing commands to convert pl and vpl files to binary form
+--- at see fontinst()
+--- at usage public
+fnt.binmakers = fnt.binmakers or {"*-pltotf.sh"}
+--- at usage public
+-- it is way too easy to pick up the same package's files in the dist tree
+-- when that happens, some installation tools fail to generate duplicate files
+-- once the update goes to ctan, the files disappear ...
+fnt.buildsearch = false
+fnt.builddeps = fnt.builddeps or {}
+-- should use existing fnt variables, I think
+fnt.buildfiles = fnt.buildfiles or { "*.afm", "*.enc", "*.etx", "*.fd", "*.lig",
+ "*.make", "*.map", "*.mtx", "*.nam", "*.otf", "*.pe", "*.tex" , "*.tfm" }
+fnt.buildsuppfiles_sys = fnt.buildsuppfiles_sys or {}
+-- sys replaces defaults; add ads to them
+fnt.checksuppfiles_sys = fnt.checksuppfiles_sys or {}
+fnt.checksuppfiles_add = fnt.checksuppfiles_add or {}
+-- \TeX{} files to compile to produce pl, vpl etc.
+--- at see fontinst()
+--- at usage public
+fnt.familymakers = fnt.familymakers or {"*-drv.tex"}
+fnt.fntdir = fnt.fntdir or builddir .. "/fnt"
+-- font definitions to use when auto-generating tests
+--- at see fnt_test() checkinit_hook() fnt.autotestfds
+--- at usage public
+fnt.fnttestfds = fnt.fnttestfds or {}
+fnt.mapfiles_sys = fnt.mapfiles_sys or {}
+fnt.mapfiles_add = fnt.mapfiles_add or {}
+-- sourcefiledir must be specified first
+-- directory to store build products
+--- at usage public
+fnt.keepdir = fnt.keepdir or sourcefiledir .. "/keep"
+-- directory to store keeptempfiles
+--- at usage public
+fnt.keeptempdir = fnt.keeptempdir or sourcefiledir .. "/keeptemp"
+-- build products
+--- at usage public
+fnt.keepfiles = fnt.keepfiles or {"*.enc", "*.fd", "*.map", "*.tfm", "*.vf"}
+-- files to keep for diagnostics, but which shouldn't be packaged
+--- at usage public
+fnt.keeptempfiles = fnt.keeptempfiles or {"*.mtx", "*.pl", "*-pltotf.sh", "*-rec.tex",
+ "*.vpl", "*.zz"}
+cleanfiles = {fnt.keeptempfiles} -- ** changed default
+-- \TeX{} files to compile to produce map file fragments etc.
+--- at see fontinst()
+--- at usage public
+fnt.mapmakers = fnt.mapmakers or {"*-map.tex"}
+-- file containing regression tests
+--- at see check_init() in fntbuild-check.lua
+--- at usage public
+fnt.regress = fnt.regress or "fnt-tests.tex"
+--- at see fntsubsetter()
+--- at usage public
+--- at boolean
+--- at description whether to add fnt.subset defns to fd files for TC encodings
+fnt.subset = false
+--- at see fntsubsetter()
+--- at usage public
+--- at usage fnt.subsetdefns.<family> = <fnt.subset>
+--- at description table: list of TC fds to insert fnt.subset defns into
+--- at description entry keys should be family names; entry values should be values
+--- at description for fnt.subsetdefns.<key> = <value>,
+--- at description <key> will be substituted for $FONTFAMILY and
+--- at description <value> will be substituted for $SUBSET into the fnt.subsettemplate
+fnt.subsetdefns = fnt.subsetdefns or {}
+--- at see fntsubsetter()
+--- at usage public
+--- at usage value should be list of filenames as table
+--- at description list of font defn files to insert fnt.subset defns into
+--- at description defaults to all fds matching [Tt][Ss]1.*\.fd
+fnt.subsetfiles = fnt.subsetfiles or {}
+--- at see fntsubsetter()
+--- at description $FONTFAMILY and $SUBSET may be used as placeholders
+--- at description template for inserted lines specifying TS1 encoding subsets in
+--- at description fnt.subsetfiles
+--- at usage public
+fnt.subsettemplate = fnt.subsettemplate or
+ "\\DeclareEncodingSubset{TS1}{$FONTFAMILY}{$SUBSET}"
+-- file to use as template for tables
+--- at see doc_init() in fntbuild-doc.lua
+--- at usage public
+fnt.tablestemp = fnt.tablestemp or "fnt-tables.tex"
+-- file to use as template for tests
+--- at see check_init() in fntbuild-check.lua
+--- at usage public
+fnt.testtemp = fnt.testtemp or "fnt-test.lvt"
+-------------------------------------------------
+-- fnt.vendor and module must be specified before tdslocations
+--- at usage public
+fnt.vendor = fnt.vendor or "public"
+tdslocations = { -- ** changed default
+ "fonts/afm/" .. fnt.vendor .. "/" .. module .. "/" .. "*.afm",
+ "fonts/enc/dvips/" .. module .. "/" .. "*.enc",
+ "fonts/map/dvips/" .. module .. "/" .. "*.map",
+ "fonts/opentype/" .. fnt.vendor .. "/" .. module .. "/" .. "*.otf",
+ "fonts/tfm/" .. fnt.vendor .. "/" .. module .. "/" .. "*.tfm",
+ "fonts/truetype/" .. fnt.vendor .. "/" .. module .. "/" .. "*.ttf",
+ "fonts/type1/" .. fnt.vendor .. "/" .. module .. "/" .. "*.pfb",
+ "fonts/type1/" .. fnt.vendor .. "/" .. module .. "/" .. "*.pfm",
+ "fonts/vf/" .. fnt.vendor .. "/" .. module .. "/" .. "*.vf",
+ "source/fonts/" .. module .. "/" .. "*.etx",
+ "source/fonts/" .. module .. "/" .. "*.mtx",
+ "source/fonts/" .. module .. "/" .. "*-drv.tex",
+ "source/fonts/" .. module .. "/" .. "*-map.tex",
+ "tex/latex/" .. module .. "/" .. "*.fd",
+ "tex/latex/" .. module .. "/" .. "*.sty"
+}
+typesetsourcefiles = {fnt.keepdir .. "/*"} -- ** changed default
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild-vars.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild.lua (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,153 @@
+-- $Id: fntbuild.lua 10743 2025-01-29 02:29:53Z cfrees $
+-------------------------------------------------
+-------------------------------------------------
+-- I don't know how to bootstrap this ...
+-- these are needed when fontscripts is part of the same repo
+-------------------------------------------------
+sourcefiledir = sourcefiledir or "."
+maindir = maindir or sourcefiledir
+-------------------------------------------------
+-- namespace
+--- at usage ??
+fnt = fnt or {}
+-- error-tracking
+--- at usage private
+fnt.nifergwall = 0
+-- target names
+-- fnttarg
+--- at usage private
+local ntarg = "fnttarg"
+-- uniquifyencs
+--- at usage private
+local utarg = "uniquifyencs"
+-------------------------------------------------
+-- fnt.gwall {{{
+--- at param msg string
+--- at param file string
+--- at param rtn number
+--- at see
+--- at usage private
+function fnt.gwall (msg,file,rtn)
+ file = file or "current file"
+ msg = msg or "Error:"
+ rtn = rtn or 0
+ if rtn ~= 0 then
+ fnt.nifergwall = fnt.nifergwall + rtn
+ print (msg, file, "failed (" .. rtn .. ")\n")
+ end
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+local possplaces = { sourcefiledir, maindir, maindir .. "/fontscripts" }
+for _,i in ipairs (possplaces) do
+ if fileexists( i .. "/fntbuild.lua" ) then
+ fnt.fntbuild_home = i
+ break
+ end
+end
+print("fnt.fntbuild_home:", fnt.fntbuild_home)
+if fnt.fntbuild_home == nil then
+ -- dwyn o Joseph Wright: l3build.lua
+ -- ar gael am fod Joseph yn wneud kpse.set_program_name("kpsewhich")
+ -- gweler texdoc luatex
+ local p = kpse.find_file("fntbuild.lua", "lua")
+ if p ~= nil and p ~= "" then
+ fnt.fntbuild_home = dirname(p)
+ else
+ fnt.gwall("Search for ","self",1)
+ end
+end
+-------------------------------------------------
+print("Found myself in", fnt.fntbuild_home)
+-------------------------------------------------
+-- dwyn o Joseph Wright: l3build.lua
+local function fntbuild_require (frag)
+ require(kpse.lookup("fntbuild-" .. frag .. ".lua", { path = fnt.fntbuild_home }))
+end
+-------------------------------------------------
+fntbuild_require("vars")
+fntbuild_require("utils")
+fntbuild_require("build")
+fntbuild_require("check")
+fntbuild_require("doc")
+fntbuild_require("ctan")
+-------------------------------------------------
+-- load user config
+-- local (if fnt.buildsearch) - maindir -- sourcefiledir
+-------------------------------------------------
+-- execute before testing afmtotfm so fnttarg is correct in case the
+-- config sets it true
+fnt.build_config()
+-------------------------------------------------
+-------------------------------------------------
+-- fontinst must be specified first
+-- it just ain't TeX
+-- ntarg {{{
+target_list[ntarg] = {
+ func = fnt.fontinst,
+ desc = "Creates TeX font file",
+ pre = function(names)
+ if names then
+ print("fontinst does not need names\n")
+ help()
+ exit(1)
+ end
+ return 0
+ end
+}
+-- }}}
+-- utarg {{{
+target_list[utarg] = {
+ func = fnt.uniquify,
+ desc = "Uniquifies encodings ONLY",
+ pre = function(names)
+ standalone = true
+ if names and #names > 1 then
+ print("Too many encoding tags specified; no more than one allowed")
+ help()
+ exit(1)
+ else
+ names = names or encodingtag or ""
+ end
+ return 0
+ end
+}
+-- }}}
+-- diwedd targets
+-------------------------------------------------
+-------------------------------------------------
+-- fnt.afmtotfm -> fnttarg {{{
+if fnt.afmtotfm then
+ target_list[ntarg] = {
+ func = fnt.afm2tfm,
+ desc = "Creates TeX font files",
+ pre = function(names)
+ if names then
+ print("fntmake does not need names\n")
+ help()
+ exit(1)
+ end
+ return 0
+ end
+ }
+end
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+if options["target"] == "install" then
+ table.insert(sourcefiles,fnt.keepdir .. "/*.*")
+end
+-------------------------------------------------
+-------------------------------------------------
+-- override l3build functions {{{
+checkinit_hook = fnt.checkinit_hook
+copyctan = fnt.copyctan
+docinit_hook = fnt.docinit_hook
+-- }}}
+-- other exports {{{
+fnt.ntarg = ntarg
+-- }}}
+-------------------------------------------------
+-------------------------------------------------
+-- vim: ts=2:sw=2:et:foldmethod=marker:
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fntbuild.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/source/fonts/fontscripts/fontinst.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fontinst.lua 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fontinst.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,755 +0,0 @@
--- $Id: fontinst.lua 10430 2024-09-29 04:31:40Z cfrees $
--- Build configuration for electrumadf
--- l3build.pdf listing 1 tudalen 9
---[[
- os.setenv requires shell-escape (which l3build always enables) but will
- *appear** to set the variable anyway i.e will report the value even though
- it isn't set
- os.execute("env") can be used to show the environment
- os.setenv is luatex and not in the standard builtin os lua library
- ref. https://tex.stackexchange.com/questions/720446/how-can-i-export-variables-to-the-environment-when-running-l3build?noredirect=1#comment1791863_720446
---]]
-os.setenv ("PATH", "/usr/local/texlive/bin:/usr/bin:")
-os.setenv ("TEXMFHOME", ".")
-os.setenv ("TEXMFLOCAL", ".")
-os.setenv ("TEXMFARCH", ".")
--------------------------------------------------
--- copy non-public things from l3build
-local os_newline_cp = "\n"
-if os.type == "windows" then
- if tonumber(status.luatex_version) < 100 or
- (tonumber(status.luatex_version) == 100
- and tonumber(status.luatex_revision) < 4) then
- os_newline_cp = "\r\n"
- end
-end
--------------------------------------------------
-nifergwall = 0
-ntarg = "fnttarg"
-utarg = "uniquifyencs"
-function gwall (msg,file,rtn)
- file = file or "current file"
- msg = msg or "Error: "
- rtn = rtn or 0
- if rtn ~= 0 then
- nifergwall = nifergwall + rtn
- print (msg .. file .. " failed (" .. rtn .. ")\n")
- end
-end
-function finst (patt,dir,mode)
- dir = dir or "."
- mode = mode or "nonstopmode"
- local cmd = "pdftex --interaction=" .. mode
- local targs = {}
- -- https://lunarmodules.github.io/luafilesystem/examples.html (expl)
- -- l3build-file-functions.lua (filelist fn)
- targs = filelist(dir,patt)
- for i,j in ipairs(targs) do
- local errorlevel = tex(j,dir,cmd)
- gwall("Compilation of ", j, errorlevel)
- end
-end
-function fntkeeper ()
- local dir = dir or unpackdir
- local rtn = direxists(keepdir)
- if not rtn then
- local errorlevel = mkdir(keepdir)
- if errorlevel ~= 0 then
- print("DO NOT BUILD STANDARD TARGETS WITHOUT RESOLVING!!\n")
- gwall("Attempt to create directory ", keepdir, errorlevel)
- end
- else
- local errorlevel = cleandir(keepdir)
- if errorlevel ~= 0 then
- print("KEEP CONTAMINATED!\n")
- gwall("Attempt to clean directory ",keepdir,errorlevel)
- end
- end
- local keepdir = abspath(keepdir) -- abspath requires existence
- if keepfiles ~= {} then
- for i,j in ipairs(keepfiles) do
- local rtn = cp(j, unpackdir, keepdir)
- if rtn ~= 0 then
- gwall("Copy ", j, errorlevel)
- print("DO NOT BUILD STANDARD TARGETS WITHOUT RESOLVING!\n")
- end
- end
- else
- print("ARE YOU SURE YOU DON'T WANT TO KEEP THE FONTS??!!\n")
- end
- if keeptempfiles ~= {} then
- rtn = direxists(keeptempdir)
- if not rtn then
- local errorlevel = mkdir(keeptempdir)
- if errorlevel ~= 0 then
- gwall("Attempt to create directory ", keeptempdir, errorlevel)
- end
- else
- local errorlevel = cleandir(keeptempdir)
- if errorlevel ~= 0 then
- print("keeptemp contaminated!\n")
- gwall("Attempt to clean directory ",keeptempdir,errorlevel)
- end
- end
- for i,j in ipairs(keeptempfiles) do
- local errorlevel = cp(j,unpackdir,keeptempdir)
- if errorlevel ~= 0 then
- gwall("Copy ", j, errorlevel)
- end
- end
- end
- return nifergwall
-end
--- oherwydd fy mod i bron ag anfon pob un ac mae'n amlwg fy mod i wedi anfon bacedi heb ei wneud hwn yn y gorffennol, well i mi wneud rhywbeth (scriptiau gwneud-cyhoeddus a make-public yn argraffu rhybudd os encs yn y cymysg
--- (cymraeg yn ofnadwy hefyd)
-function uniquify (tag)
- local dir = ""
- tag = tag or encodingtag or ""
- local pkgbase = pkgbase or ""
- if standalone then
- dir = keepdir
- if pkgbase == "" then
- print("pkgbase unspecified. Trying to guess ... ")
- if ctanpkg ~= module and module ~= "" and module ~= nil then
- print("Guessing " .. module)
- pkgbase = module
- else
- pkgbase = string.gsub(ctanpkg, "adf$", "")
- if pkgbase ~= "" then
- print("Guessing " .. pkgbase)
- end
- end
- end
- else
- dir = unpackdir
- if pkgbase == "" then
- local pkglist = filelist(dir,"*.sty")
- if #pkglist ~= 0 then
- pkgbase = pkglist[1]
- end
- end
- end
- local encs = encs or filelist(dir,"*.enc")
- local maps = maps or filelist(dir,"*.map")
- if #encs == 0 then
- return 0
- else
- if tag == "" then
- if #maps ~= 0 then
- if #maps == 1 then
- tag = string.gsub(maps[1],"%.map$","")
- else
- local t = ""
- local tt = ""
- for i,j in ipairs(maps) do
- if tt == t then
- tt = string.gsub(j,"%w%.map$","")
- else
- if t == "" then
- t = string.gsub(j,"%w%.map$","")
- end
- end
- end
- if t == tt then
- tag = tt
- else
- gwall("Attempt to find tag ","",1)
- end
- end
- end
- end
- if tag ~= "" then
- for i, j in ipairs(encs) do
- if string.match(j,"-" .. tag .. "%.enc$") or string.match(j, module) or string.match(j,ctanpkg) or string.match(j,pkgbase) then
- print(j .. " ... OK\n")
- else
- local targenc = (string.gsub(j,"%.enc$","-" .. tag .. ".enc"))
- print("Target encoding is " .. targenc .. "\n")
- if fileexists(dir .. "/" .. targenc) then
- gwall("Target encoding exists !! ", targenc, 1)
- return 1
- else
- local f = assert(io.open(dir .. "/" .. j,"rb"))
- local content = f:read("*all")
- f:close()
- local new_content = (string.gsub(content,"(\n%%%%BeginResource: encoding fontinst%-autoenc[^\n ]*)( *\n/fontinst%-autoenc[^ %[]*)( %[)","%1-" .. tag .. "%2-" .. tag .. "%3"))
- if new_content ~= content then
- print("Writing unique encoding to " .. targenc)
- f = assert(io.open(dir .. "/" .. targenc,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_content,"\n",os_newline_cp)))
- f:close()
- if fileexists(dir .. "/" .. targenc) then
- local errorlevel = rm(dir,j)
- if errorlevel ~= 0 then
- gwall("Attempt to rm old encoding ",j,errorlevel)
- end
- if #maps ~= 0 then
- local jpatt = string.gsub(j,"%-","%%-")
- jpatt = string.gsub(jpatt,"%.","%%.")
- for k,m in ipairs(maps) do
- f = assert(io.open(dir .. "/" .. m,"rb"))
- local mcontent = f:read("*all")
- f:close()
- local new_mcontent = (string.gsub(mcontent,"(%<%[?)" .. jpatt .. "( %<%w+%.pfb \" fontinst%-autoenc[%w%-_]*)( ReEncodeFont)", "%1" .. targenc .. "%2-" .. tag .. "%3"))
- if new_mcontent ~= mcontent then
- print("Writing adjusted map lines to " .. m)
- f = assert(io.open(dir .. "/" .. m,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_mcontent,"\n",os_newline_cp)))
- f:close()
- else
- gwall("Amending map ",m,1)
- end
- end
- else
- print("FOUND NO MAPS??\n")
- end
- else
- gwall("Attempt to write ",targenc,1)
- end
- else
- gwall("Attempt to uniquify " .. j .. " as ",targenc,1)
- end
- end
- end
- end
- end
- return nifergwall
- end
- print("Something weird happened.\n")
- return 1
-end
-function fontinst (dir,mode)
- dir = dir or unpackdir
- mode = mode or "errorstopmode --halt-on-error"
- standalone = false
- encodingtag = encodingtag or ""
- -- if not direxists(dir) then
- -- print("Missing directory. Unpacking first.\n")
- print("Unpacking ...\n")
- local errorlevel = unpack()
- -- end
- local tfmfiles = filelist(dir,"*.tfm")
- for i,j in ipairs(tfmfiles) do
- local plname = string.gsub(j, "%.tfm$", ".pl")
- if fileexists(unpackdir .. "/" .. plname) then
- print(plname .. " already exists!")
- return 1
- else
- local cmd = "tftopl " .. j .. " " .. plname
- local errorlevel = runcmd(cmd,dir)
- gwall("Conversion to pl from tfm ",j,errorlevel)
- -- remove tfm to reduce pollution of package later
- rm(unpackdir,j)
- gwall("Deletion of tfm ", j, errorlevel)
- end
- end
- for i,j in ipairs(familymakers) do
- local errorlevel = finst(j,dir,mode)
- gwall("Compilation of driver ", j, errorlevel)
- end
- if nifergwall ~= 0 then return nifergwall end
- for i,j in ipairs(mapmakers) do
- local errorlevel = finst (j,dir,mode)
- gwall("Compilation of map ", j, errorlevel)
- end
- if nifergwall ~= 0 then return nifergwall end
- for i,j in ipairs(binmakers) do
- local targs = filelist(dir,j)
- -- https://www.lua.org/pil/21.1.html
- for k,m in ipairs(targs) do
- targ = dir .. "/" .. m
- -- is this really the right way to do this?
- -- surely it is not at all safe?
- -- though presumably no worse than executing the script directly
- for line in io.lines(targ) do
- if string.match(line,"^pltotf [a-zA-Z0-9%-]+%.pl [a-zA-Z0-9%-]+%.tfm$") then
- local errorlevel = runcmd(line,dir)
- gwall("Creation of TFM using " .. line .. " from ", j, errorlevel)
- else
- print("Ignoring unexpected line \"" .. line .. "\" in " .. j .. ".\n")
- nifergwall = nifergwall + 1
- end
- end
- end
- end
- if nifergwall ~= 0 then return nifergwall end
- local targs = filelist(dir,"*.vpl")
- for i,j in ipairs(targs) do
- local cmd = "vptovf " .. j
- local errorlevel = runcmd(cmd,dir)
- gwall("Creation of virtual font from ", j, errorlevel)
- end
- -- edit the .fd files if a scale factor is declared because fontinst
- -- doesn't allow us to do this and the last message to the mailing list
- -- is from 2022 with no response from the maintainer
- local fdfiles = filelist(unpackdir, "*.fd")
- for i,j in ipairs(fdfiles) do
- local f = assert(io.open(unpackdir .. "/" .. j,"rb"))
- local content = f:read("*all")
- f:close()
- local new_content = content
- local csscaleaux = string.match(content, "%<%-%> *\\([%a%d][%a%d]*@@scale)")
- if csscaleaux ~= nil then
- local csscale = string.gsub(csscaleaux, "@(@)", "%1")
- if csscale ~= nil then
- new_content = string.gsub(content, "(\\DeclareFontFamily{)", "%% addaswyd o t1phv.fd (dyddiad y ffeil fd: 2020-03-25)\n\\expandafter\\ifx\\csname " .. csscale .. "\\endcsname\\relax\n \\let\\" .. csscaleaux .. "\\@empty\n\\else\n \\edef\\" .. csscaleaux .. "{s*[\\csname " .. csscale .. "\\endcsname]}%%\n\\fi\n\n%1")
- end
- end
- csscaleaux = string.match(content, "\\DeclareFontFamily{[^}]*}{[^}]*}{[^}]*\\hyphenchar *\\font *=[^}\n]*}")
- if csscaleaux ~= nil then
- content = new_content
- new_content = string.gsub(content, "(\\DeclareFontFamily{[^}]*}{[^}]*}{\\hyphenchar) *(\\font) *(=[^ }\n]*) *([^ }\n]* *})", "%1%2%3%4")
- end
- if new_content ~= content then
- local f = assert(io.open(unpackdir .. "/" .. j,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_content,"\n",os_newline_cp)))
- f:close()
- end
- end
- local errorlevel = uniquify(encodingtag)
- if errorlevel ~= 0 then
- gwall("Encodings not uniquified! Do not submit to CTAN! uniquify(" .. encodingtag .. ")","",errorlevel)
- end
- errorlevel = fntkeeper()
- if errorlevel ~= 0 then
- gwall("FONT KEEPER FAILED! DO NOT MAKE STANDARD TARGETS WITHOUT RESOLVING!! fntkeeper() ", unpackdir, errorlevel)
- end
- return nifergwall
-end
-dofile(maindir .. "/tag.lua")
--- fnt_test
-function fnt_test (fntpkgname,fds,content,maps,fdsdir)
- local coll = ""
- -- suffix ly -> ly1 ; no suffix -> t1
- local collly = ""
- local targname = fntpkgname .. "-auto-test.lvt"
- local targnamely = fntpkgname .. "-auto-test-ly1.lvt"
- local targfile = unpackdir .. "/" .. targname
- local targfilely = unpackdir .. "/" .. targnamely
- -- ly1 boolean
- local yy = 0
- -- texnansi/ly1 fds
- local lys = {}
- -- ec/t1 fds
- local ecs = {}
- -- local mapsly = ""
- print("Creating test file for " .. fntpkgname .. " with fds: ")
- for i, j in ipairs(fds) do print("fd: " .. j) end
- -- l3build-tagging.lua
- for i, j in ipairs(fds) do
- -- local errorlevel = cp(j, keepdir, unpackdir)
- if string.match(j,"^ly1") then
- yy = 1
- table.insert(lys,j)
- else
- table.insert(ecs,j)
- end
- if fdsdir ~= unpackdir then
- local errorlevel = cp(j, fdsdir, unpackdir)
- if errorlevel ~= 0 then
- gwall("Copy ", j, errorlevel)
- return errorlevel
- end
- end
- end
- -- restart so we get the filtered list (hopefully)
- for i, j in ipairs(ecs) do
- j = unpackdir .. "/" .. j
- for line in io.lines(j) do
- -- it would be much better to filter the file list ...
- if string.match(line,"^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$") then
- coll = (coll .. string.gsub(string.gsub(line,"%{$","%%%%"),"^\\DeclareFontShape%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}","\n\\TEST{test-%1-%2-%3-%4}{%%%%\n \\sampler{%1}{%2}{%3}{%4}%%%%\n}"))
- end
- end
- end
- if yy == 1 then
- for i, j in ipairs(lys) do
- j = unpackdir .. "/" .. j
- for line in io.lines(j) do
- -- it would be much better to filter the file list ...
- if string.match(line,"^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$") then
- collly = (collly .. string.gsub(string.gsub(line,"%{$","%%%%"),"^\\DeclareFontShape%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}%{([^%}]*)%}","\n\\TEST{test-%1-%2-%3-%4}{%%%%\n \\sampler{%1}{%2}{%3}{%4}%%%%\n}"))
- end
- end
- end
- coll = maps .. "\n\\usepackage[enc=t1]{" .. fntpkgname .. "}\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n"
- collly = maps .. "\n\\usepackage[enc=ly1]{" .. fntpkgname .. "}\n\\begin{document}\n\\START\n" .. collly .. "\n\\END\n\\end{document}\n"
- else
- -- assume package doesn't have an encoding option and is t1/ts1 only
- coll = maps .. "\n\\usepackage{" .. fntpkgname .. "}\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n"
- end
- -- coll = maps .. "\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n"
- local new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\nSAMP *\n", coll)
- local f = assert(io.open(targfile,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_content,"\n",os_newline_cp)))
- f:close()
- if yy == 1 then
- new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\nSAMP *\n", collly)
- local f = assert(io.open(targfilely,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_content,"\n",os_newline_cp)))
- f:close()
- end
- -- PAID Â CHEISIO YR ISOD!!
- -- cp(targname,unpackdir,testfiledir)
- local errorlevel = cp(targname,unpackdir,testdir)
- if errorlevel ~= 0 then
- gwall("Attempt to copy ", targname, errorlevel)
- end
- errorlevel = cp(targnamely,unpackdir,testdir)
- if errorlevel ~= 0 then
- gwall("Attempt to copy ", targnamely, errorlevel)
- end
- return nifergwall
-end
--- checkinit_hook
-function checkinit_hook ()
- local filename = "fnt-test.lvt"
- local file = unpackdir .. "/" .. filename
- local fnttestdir = maindir .. "/fnt-tests"
- local maps = ""
- local mapfiles=filelist(keepdir, "*.map")
- local mapsdir = ""
- local fdsdir = ""
- if #mapfiles == 0 then
- mapfiles=filelist(unpackdir, "*.map")
- if #mapfiles == 0 then
- gwall("Attempt to find map files ", ".map", 1)
- return 1
- else
- print("Using maps from " .. unpackdir .. "\n")
- mapsdir = unpackdir
- end
- else
- mapsdir = keepdir
- print("Using maps from " .. keepdir .. "\n")
- end
- local fntpkgnames = fntpkgnames or filelist(unpackdir,"*.sty")
- for i, j in ipairs(fntpkgnames) do
- fntpkgnames[i] = string.gsub(j,"%.sty","")
- end
- -------
- local autotestfdstmp = filelist(keepdir, "*.fd")
- -- if they're not kept, they may be source (e.g. berenisadf)
- if #autotestfdstmp == 0 then
- autotestfdstmp = filelist(unpackdir, "*.fd")
- if #autotestfdstmp == 0 then
- gwall("Attempt to find fd files ", ".fd", 1)
- return 1
- else
- fdsdir = unpackdir
- print("Using fds from " .. unpackdir .. "\n")
- end
- else
- fdsdir = keepdir
- print("Using fds from " .. keepdir .. "\n")
- end
- if #autotestfdstmp == 0 then
- print("Something is amiss - this code should never be executed!\n")
- gwall("Attempt to locate fd files ", ".fd", 1)
- else
- if #autotestfds == 0 then
- for i, j in ipairs(autotestfdstmp) do
- if not string.match(j,"^ts1") then
- table.insert (autotestfds, j)
- end
- end
- end
- end
- -------
- -- if fntestfds.<package name> has been specified, use that (should be a table)
- -- o/w assign the autotestfds table to fntestfds.<package name>
- -- but remember fnttestfds may be pairs and/or ipairs ...
- -- there must be a better way to do this ...
- if #fnttestfds == 0 then
- for i,j in ipairs(fntpkgnames) do
- if fnttestfds[j] == nil then
- print("Auto-assigning autotestfds to fnttestfds[" .. j .. "].\n")
- fnttestfds[j] = {}
- for a,b in ipairs(autotestfds) do
- table.insert(fnttestfds[j],b)
- end
- end
- end
- else
- local testmes = {}
- for i,j in ipairs(fnttestfds) do
- table.insert(testmes,j)
- end
- for i, j in ipairs(fntpkgnames) do
- -- I really don't understand tables (and I know this is very, very basic)
- if fnttestfds[j] == nil then
- fnttestfds[j] = {}
- -- use only if fnttestfds isn't specified either as table of tables or table of files/globs
- -- this doesn't seem very robust
- for k, l in ipairs(testmes) do
- table.insert (fnttestfds[j], l)
- end
- end
- end
- end
- -------
- for i, j in ipairs(mapfiles) do
- maps = maps .. "\n\\pdfmapfile{-" .. j .. "}\n\\pdfmapfile{+" .. j .. "}"
- end
- -- maps = maps .. "\n\\pdfmapfile{+pdftex.map}"
- if not fileexists(fnttestdir .. "/" .. filename) then
- print("Skipping test creation.\n")
- else
- local errorlevel = cp(filename,fnttestdir,unpackdir)
- -- local errorlevel = ren(unpackdir, filename, targname)
- if errorlevel ~= 0 then
- gwall("Copy ", filename, errorlevel)
- return errorlevel
- else
- -- need to get content here
- -- copy this from l3build-tagging.lua
- local f = assert(io.open(file,"rb"))
- local content = f:read("*all")
- f:close()
- -- ought to normalise line endings here
- -- copied from l3build
- -- but I don't understand why the first subs is needed
- -- is it a problem if the file doesn't end with a newline?
- content = string.gsub(content .. (string.match(content,"\n$") and "" or "\n"), "\r\n", "\n")
- content = string.gsub(content, "\\RequirePackage%{svn%-prov%}\n\\ProvidesFileSVN%{[^%}]*%}%[[^%]]*%]%[[^%]]*%]\n", "")
- for i, j in ipairs(fntpkgnames) do
- -- create the test file for each package
- -- errorlevel = fnt_test(j,fnttestfds[j],content,maps)
- -- dyw fnttestfds.j ddim yn gweithio yma!!
- errorlevel = fnt_test(j,fnttestfds[j],content,maps,fdsdir)
- if errorlevel ~= 0 then
- gwall("Font test creation ", j, errorlevel)
- return errorlevel
- end
- end
- rm(unpackdir,filename)
- end
- end
- return 0
-end
--- doc_init
-function docinit_hook ()
- -- local fdfiles = filelist(keepdir, "*.fd")
- local fdfiles = filelist(unpackdir, "*.fd")
- local filename = "fnt-tables.tex"
- local targname = ctanpkg .. "-tables.tex"
- local file = unpackdir .. "/" .. filename
- local targfile = unpackdir .. "/" .. targname
- local coll = ""
- local fnttestdir = maindir .. "/fnt-tests"
- local maps = ""
- local mapfiles=filelist(unpackdir, "*.map")
- local yy = 0
- for i, j in ipairs(mapfiles) do
- maps = maps .. "\n\\pdfmapfile{-" .. j .. "}\n\\pdfmapfile{+" .. j .. "}"
- end
- if not fileexists(fnttestdir .. "/" .. filename) then
- print("Skipping font tables.\n")
- else
- local errorlevel = cp(filename,fnttestdir,unpackdir)
- -- local errorlevel = ren(unpackdir, filename, targname)
- if errorlevel ~= 0 then
- gwall("Copy ", filename, errorlevel)
- return errorlevel
- else
- -- need to get content here
- -- copy this from l3build-tagging.lua
- local f = assert(io.open(file,"rb"))
- local content = f:read("*all")
- f:close()
- -- ought to normalise line endings here
- -- copied from l3build
- -- but I don't understand why the first subs is needed
- -- is it a problem if the file doesn't end with a newline?
- content = string.gsub(content .. (string.match(content,"\n$") and "" or "\n"), "\r\n", "\n")
- content = string.gsub(content, "\\RequirePackage%{svn%-prov%}\n\\ProvidesFileSVN%{[^%}]*%}%[[^%]]*%]%[[^%]]*%]\n", "")
- -- l3build-tagging.lua
- for i, j in ipairs(fdfiles) do
- if string.match(j,"^ly1") then
- yy = 1
- end
- j = unpackdir .. "/" .. j
- for line in io.lines(j) do
- if string.match(line,"^\\DeclareFontShape%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{[^%}]*%}%{$") then
- coll = (coll .. string.gsub(string.gsub(line,"%{$","%%%%"),"^\\DeclareFontShape","\n\\sampletable"))
- end
- end
- end
- if yy == 1 then
- maps = "\n\\input{ly1enc.def}\n" .. maps
- end
- coll = maps .. "\n\\begin{document}\n" .. coll .. "\n\\end{document}\n"
- local new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\n\\endinput *\n", coll)
- local f = assert(io.open(targfile,"w"))
- -- this somehow removes the second value returned by string.gsub??
- f:write((string.gsub(new_content,"\n",os_newline_cp)))
- f:close()
- rm(unpackdir,filename)
- cp(targname,unpackdir,sourcefiledir)
- end
- end
- return 0
-end
--- fontinst must be specified first
--- it just ain't TeX
--- ntarg
-target_list[ntarg] = {
- func = fontinst,
- desc = "Creates TeX font file",
- pre = function(names)
- if names then
- print("fontinst does not need names\n")
- help()
- exit(1)
- end
- return 0
- end
-}
--- utarg
-target_list[utarg] = {
- func = uniquify,
- desc = "Uniquifies encodings ONLY",
- pre = function(names)
- standalone = true
- if names and #names > 1 then
- print("Too many encoding tags specified; no more than one allowed")
- help()
- exit(1)
- else
- names = names or encodingtag or ""
- end
- return 0
- end
-}
--- diwedd targets
--------------------------------------------------
-autotestfds = autotestfds or {}
--- auxfiles = {"*.aux"}
-bakext = ".bkup"
-binaryfiles = {"*.pdf", "*.zip", "*.vf", "*.tfm", "*.pfb", "*.pfm", "*.ttf", "*.otf", "*.tar.gz"}
-binmakers = {"*-pltotf.sh"}
--- maindir before checkdeps
--- maindir = "../.."
-checkdeps = {maindir .. "/nfssext-cfr", maindir .. "/fnt-tests"}
-checkengines = {"pdftex"}
-checkformat = "latex"
--- checksuppfiles = {""}
-cleanfiles = {keeptempfiles}
-ctanreadme = "README.md"
-demofiles = {"*-example.tex"}
-familymakers = {"*-drv.tex"}
-flatten = true
-flattentds = false
-fnttestfds = fnttestfds or {}
--- fntautotestfds = fntautotestfds or {}
-installfiles = {"*.afm", "*.cls", "*.enc", "*.fd", "*.map", "*.otf", "*.pfb", "*.pfm", "*.sty", "*.tfm", "*.ttf", "*.vf"}
--- match default as not yet existent
-sourcefiledir = sourcefiledir or "."
-keepdir = keepdir or sourcefiledir .. "/keep"
-keeptempdir = keeptempdir or sourcefiledir .. "/keeptemp"
-keepfiles = keepfiles or {"*.enc", "*.fd", "*.map", "*.tfm", "*.vf"}
-keeptempfiles = keeptempfiles or {"*.mtx", "*.pl", "*-pltotf.sh", "*-rec.tex", "*.vpl", "*.zz"}
-manifestfile = "manifest.txt"
-mapmakers = {"*-map.tex"}
-packtdszip = false
--- need module test or default?
-sourcefiles = {"*.afm", "afm/*.afm", "*.pfb", "*.pfm", "*.dtx", "*.ins", "opentype/*.otf", "*.otf", "tfm/*.tfm", "truetype/*.ttf", "*.ttf", "type1/*.pfb", "type1/*.pfm"}
-tagfiles = {"*.dtx", "*.ins", "manifest.txt", "MANIFEST.txt", "README", "README.md"}
--- vendor and module must be specified before tdslocations
-vendor = vendor or "public"
-tdslocations = {
- "fonts/afm/" .. vendor .. "/" .. module .. "/" .. "*.afm",
- "fonts/enc/dvips/" .. module .. "/" .. "*.enc",
- "fonts/map/dvips/" .. module .. "/" .. "*.map",
- "fonts/opentype/" .. vendor .. "/" .. module .. "/" .. "*.otf",
- "fonts/tfm/" .. vendor .. "/" .. module .. "/" .. "*.tfm",
- "fonts/truetype/" .. vendor .. "/" .. module .. "/" .. "*.ttf",
- "fonts/type1/" .. vendor .. "/" .. module .. "/" .. "*.pfb",
- "fonts/type1/" .. vendor .. "/" .. module .. "/" .. "*.pfm",
- "fonts/vf/" .. vendor .. "/" .. module .. "/" .. "*.vf",
- "source/fonts/" .. module .. "/" .. "*.etx",
- "source/fonts/" .. module .. "/" .. "*.mtx",
- "source/fonts/" .. module .. "/" .. "*-drv.tex",
- "source/fonts/" .. module .. "/" .. "*-map.tex",
- "tex/latex/" .. module .. "/" .. "*.fd",
- "tex/latex/" .. module .. "/" .. "*.sty"
-}
--- after maindir
-typesetdeps = {maindir .. "/nfssext-cfr"}
--- enable l3build doc/check to find font files
--- cannot concatenate variables here as they don't (yet?) exist
-typesetexe = "TEXMFDOTDIR=.:../local: pdflatex"
-typesetfiles = typesetfiles or {"*.dtx", "*-tables.tex", "*-example.tex"}
-typesetsourcefiles = {keepdir .. "/*", "nfssext-cfr*.sty"}
-unpackexe = "pdflatex"
-unpackfiles = {"*.ins"}
--------------------------------------------------
-if fileexists(maindir .. "/fnt-ctan.lua") then
- dofile(maindir .. "/fnt-ctan.lua")
-end
--------------------------------------------------
--- afmtotfm
--- only set this true for ultra simple symbol fonts!
-afmtotfm = afmtotfm or false
--------------------------------------------------
--- fnt_afmtotfm (dir,mode)
-function fnt_afmtotfm (dir,mode)
- dir = dir or unpackdir
- mode = mode or "errorstopmode --halt-on-error"
- local fntbasename = fntbasename or module
- local map = mapfile or fntbasename .. ".map"
- print("Unpacking ...\n")
- local errorlevel = unpack()
- print("Running afm2tfm. Please be patient ...\n")
- local afms = filelist(unpackdir,"*.afm")
- local content = ""
- for i,j in ipairs(afms) do
- local rtn = fileexists(unpackdir .. "/" .. string.gsub(j,"%.afm",".enc"))
- if not rtn then
- errorlevel = run(dir, "afm2tfm " .. j .. " >> " .. dir .. "/" .. map .. ".tmp")
- else
- errorlevel = run(dir, "afm2tfm " .. j .. " -p " .. string.gsub(j,"%.afm",".enc") .. " > " .. dir .. "/" .. map .. ".tmp")
- end
- if errorlevel ~= 0 then
- gwall("afm2tfm (" .. j ..") ",dir,errorlevel)
- else
- local g = assert(io.open(dir .. "/" .. map .. ".tmp","rb"))
- local c = g:read("all")
- g:close()
- content = content .. string.gsub(c, "\n", " <" .. string.gsub(j,"%.afm",".pfb") .. "\n")
- rm(dir, map .. ".tmp")
- end
- end
- local f
- f = assert(io.open(dir .. "/" .. map, "w"))
- f:write((string.gsub(content,"\n",os_newline_cp)))
- f:close()
- errorlevel = fntkeeper()
- if errorlevel ~= 0 then
- gwall("FONT KEEPER FAILED! DO NOT MAKE STANDARD TARGETS WITHOUT RESOLVING!! ", unpackdir, errorlevel)
- end
- return nifergwall
-end
--------------------------------------------------
--- fnt_afmtotfm -> fnttarg
-if afmtotfm then
- target_list[ntarg] = {
- func = fnt_afmtotfm,
- desc = "Creates TeX font files",
- pre = function(names)
- if names then
- print("fntmake does not need names\n")
- help()
- exit(1)
- end
- return 0
- end
- }
-end
--------------------------------------------------
--- vim: ts=2:sw=2:et:
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-code.tex
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-code.tex (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-code.tex 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,39 @@
+%%
+%% This is file `fontscripts-code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontscripts.dtx (with options: `doc-code')
+%%
+%% Copyright (C) 2024-2025 Clea F. Rees.
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This file may only be distributed together with a copy of the package
+%% fontscripts. You may however distribute the package fontscripts without
+%% such generated files.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{svn-prov}
+\def\GetFileBaseName#1-#2\nil{#1}
+\edef\MyFileBaseName{\expandafter\GetFileBaseName\jobname\nil}
+\ProvidesFileSVN[\MyFileBaseName code]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo]
+\DefineFileInfoSVN
+\input{\MyFileBaseName.dtx}
+\endinput
+%%
+%% End of file `fontscripts-code.tex'.
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-doc.tex
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-doc.tex 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,40 @@
+%%
+%% This is file `fontscripts-doc.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontscripts.dtx (with options: `doc')
+%%
+%% Copyright (C) 2024-2025 Clea F. Rees.
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This file may only be distributed together with a copy of the package
+%% fontscripts. You may however distribute the package fontscripts without
+%% such generated files.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{svn-prov}
+\def\GetFileBaseName#1-#2\nil{#1}
+\edef\MyFileBaseName{\expandafter\GetFileBaseName\jobname\nil}
+\ProvidesFileSVN[\MyFileBaseName doc]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo]
+\DefineFileInfoSVN
+\AddToHook{begindocument}{\OnlyDescription}
+\input{\MyFileBaseName.dtx}
+\endinput
+%%
+%% End of file `fontscripts-doc.tex'.
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.dtx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.dtx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% fontscripts.dtx
-% Additions and changes Copyright (C) 2010-2024 Clea F. Rees.
+% Additions and changes Copyright (C) 2010-2025 Clea F. Rees.
% Code from skeleton.dtx Copyright (C) 2015-2024 Scott Pakin (see below).
%
% This work may be distributed and/or modified under the
@@ -29,7 +29,7 @@
% \iffalse
%<*driver>
\RequirePackage{svn-prov}
-\ProvidesFileSVN{$Id: fontscripts.dtx 10412 2024-09-27 15:10:34Z cfrees $}[v0.1 \revinfo][\filebase DTX: l3build scripts for font installation]
+\ProvidesFileSVN{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.2 \revinfo][\filebase DTX: l3build scripts for font installation]
\DefineFileInfoSVN[fontscripts]
\documentclass[10pt,british,lm-default=false]{l3doc}
% l3doc loads fancyvrb
@@ -39,12 +39,12 @@
\EnableCrossrefs
\CodelineIndex
\RecordChanges
-% \OnlyDescription
+^^A \OnlyDescription
\DoNotIndex{\verb,\ProvidesPackageSVN,\NeedsTeXFormat,\ProcessKeyOptions}
\usepackage{babel}
\usepackage{fancyhdr}
\usepackage[rm={proportional,lining},sf={proportional,lining},tt={monowidth,lining,tabular}]{cfr-lm}
-\usepackage[plain]{fancyref}
+\usepackage{cleveref}
\usepackage{array,tabularx}
\usepackage{xcolor}
\usepackage{xurl}
@@ -116,7 +116,7 @@
}
}
}
-\keys_define:nn { clm / doc }
+\keys_define:nn { fnt / doc }
{
unknown .code:n = {
\cs_if_free:cT { \l_keys_key_str }
@@ -125,12 +125,12 @@
}
},
}
-\NewDocumentCommand \clmdocset { +m }
+\NewDocumentCommand \fntdocset { +m }
{
- \keys_set:nn { clm / doc } { #1 }
+ \keys_set:nn { fnt / doc } { #1 }
}
\ExplSyntaxOff
-\clmdocset{%
+\fntdocset{%
bug={\href{https://codeberg.org/cfr/nfssext/issues}{\textsc{bugtracker}}},
codeberg={\href{https://codeberg.org/cfr/nfssext}{\textsc{codeberg}}},
github={\href{https://github.com/cfr42/nfssext}{\textsc{github}}},
@@ -165,6 +165,18 @@
\ExplSyntaxOff
\NewDocumentCommand \istable{m}{\texttt{= \{}\ivals{#1}\texttt{\}}\par\noindent}
\NewDocumentCommand \isstring{m}{\texttt{= ''}\meta{#1}\texttt{''}\par\noindent}
+\NewDocumentCommand \isbool{}{\texttt{= }\meta{true\textbar false}\par\noindent}
+\newcommand*\afm{\textsc{afm}}
+\newcommand*\enc{\textsc{enc}}
+\newcommand*\etx{\textsc{etx}}
+\newcommand*\fd{\textsc{fd}}
+\newcommand*\map{\textsc{map}}
+\newcommand*\mtx{\textsc{mtx}}
+\newcommand*\pfb{\textsc{pfb}}
+\newcommand*\pl{\textsc{pl}}
+\newcommand*\tfm{\textsc{tfm}}
+\newcommand*\vf{\textsc{vf}}
+\newcommand*\vpl{\textsc{vpl}}
\definecolor{strawberry}{rgb}{1.000,0.000,0.502}
\definecolor{blueberry}{rgb}{0.000,0.000,1.000}
\definecolor{moss}{rgb}{0.000,0.502,0.251}
@@ -171,6 +183,8 @@
\makeatletter
\def\@xobeysp{\leavevmode\penalty100\ }
\makeatother
+\newcolumntype{T}{>{\ttfamily\arraybackslash}l}
+\fvset{gobble=0}
\begin{document}
\DocInput{\filename}
\end{document}
@@ -178,6 +192,7 @@
% \fi
%
% \changes{v0.1}{2024-09-24}{First public release.}
+% \changes{v0.2}{2025-01-28}{Use \texttt{fnt} prefix in Lua scripts.}
%
% \maketitle\thispagestyle{empty}
% \pdfinfo{%
@@ -197,7 +212,8 @@
% \begin{abstract}
% \noindent
% \lpack{fontscripts} provides variant font encodings, support metrics and Lua script fragments to automate the creation of \TeX{}/\LaTeXe{} font files for 8-bit engines using \lpack{l3build}.
-% A template-based system enables the automatic generation of font tables and \lpack{l3build} tests.\smallskip
+% A template-based system enables the automatic generation of font tables and \lpack{l3build} tests.
+% Variables support the addition of encoding subset declarations for the Text Companion (\texttt{TS1}) encoding and variable scaling factors in font definition files.\smallskip
%
% The script fragments\footnote{%
% The main script fragments are written in \emph{extremely elementary} Lua.
@@ -206,49 +222,177 @@
% For tools which do not otherwise support it, such as \lpack{fontinst}, the scripts enable the automatic addition of variable scaling in font definition files.
% A semi-automatic system tries to ensure font encoding names are unique.\smallskip
%
-% The script fragments are primarily designed for \lpack{fontinst}, but can easily be modified to work with other tools.
+% The script fragments were originally designed for \lpack{fontinst}, but support for \texttt{afm2tfm} (intended for fonts consisting entirely of ornaments etc.) is provided and a modular approach enables easy modification for other tools.
% The default configuration is intended to be cross-platform and requires only tools included in \TeX{} Live, but the documentation includes a simple adaption for integration with FontForge and \textsc{gnu} make.
% \end{abstract}
%
% \tableofcontents
-%
+%
+% \section{Quick Start}\label{sec:start}
+%
+% \textbf{This assumes you are familiar with basic usage of \lpack{l3build}.
+% If not, please see \lpack{l3build}'s manual for basic setup.}
+%
+% Configuring your project for \lpack{l3build} includes creation of a file, \file{build.lua}, in your working directory.
+% This should specify at least the \texttt{module} name, typically the name of your package.
+% So you should have something like this,
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbatim}
+module = "fontastic"
+\end{verbatim}
+% \iffalse
+%</verb>
+% \fi
+% We now need to edit this file to make \pkg{l3build} aware of the Lua \texttt{fntbuild} scripts provided by \lpack{fontscripts}.
+% \iffalse
+%<*verb>
+% \fi
+%^^A kpse.set_program_name("kpsewhich")
+\begin{verbatim}
+module = "fontastic"
+require(kpse.lookup("fntbuild.lua"))
+\end{verbatim}
+% \iffalse
+%</verb>
+% \fi
+% This should be sufficient to make the functions provided by the script available.
+% To effectively use these functions, however, you will probably need to provide configuration details for your specific workflow and setup.
+% For example, if you want to build fonts this way, you may need to specify which build tool you use and which files contain the code to compile or commands to execute.
+% The remainder of this document explains how to do this\footnote{%^^A
+% Unless you are reading a version which includes the implementation section.
+% In that case, \emph{most} of the document is just code listing and it is the first bit of what remains which explains how to actually use the scripts.%^^A
+% }.
+% You also need to tell the scripts if you want to override the defaults e.g.~if you would like \texttt{fntbuild} to insert subset encoding declarations and/or variable scaling factors\footnote{%
+% \texttt{fontinst} only.
+% As far as I know, this is simply an oversight on \lpack{fontinst}'s part -- fixed scaling factors are supported out-of-the-box -- and I assume other tools have the ability to include variable scaling without \texttt{fntbuild}'s interference.%^^A
+% } into font definition files or to auto-generate tests and/or font tables.
+%
% \section{Lua Script Fragments}\label{sec:lua}
%
-% \file{fontinst.lua} provides two custom \lpack{l3build} targets and five new Lua functions.
+% \changes{v0.2}{2025-01-25}{\texttt{fontinst.lua} renamed to \texttt{fntbuild.lua}.}
+% \file{fntbuild.lua} provides two custom \lpack{l3build} targets and five new Lua functions.
% In addition, it redefines three \lpack{l3build} functions (two of which do nothing by default).
% As well as those provided by \lpack{l3build}, a number of additional variables are used by these functions to determine what, where and how they should operate.
%
% \subsection{\lpack{l3build} Targets}\label{subsec:targs}
%
+% \changes{v0.2}{2025-01-25}{\texttt{fnttarg} may now be ‘sandboxed’.
+% The default build recipes (based on \lpack{fontinst} and \texttt{afm2tfm}) are configured to do this and \texttt{fnt.buildsearch} is disabled by default.
+% At present, isolation only affects \TeX-based build tools.
+% FontForge and \textsc{gnu} \texttt{make} are unaffected, for example.}
% \DescribeTarg{fnttarg}
-% Runs \texttt{fontinst()}.
+% Runs \texttt{fnt.fontinst ()} by default or \verb|fnt.afm2tfm ()| if \texttt{fnt.afmtotfm} is \texttt{true}.
%
% Builds traditional \TeX{} font files for 8-bit engines.
-% The building is done in \texttt{unpackdir}.
-% The results are copied to \texttt{keepdir} and the intermediate results to \texttt{keeptempdir}.
+% The building is done in \texttt{fnt.fntdir}.
+% The results are copied to \texttt{fnt.keepdir} and the intermediate results to \texttt{fnt.keeptempdir}.
% Files in the former are copied back into the \texttt{builddir} when building documentation, running tests etc.
%
+% This target may be redefined if another tool chain is used for font creation\footnote{^^A
+% \verb|fnt.afm2tfm ()| in \file{fntbuild.lua} and \file{build.lua} in \lpack{berenisadf} provide examples.^^A
+% }.
+%
+% If additional setup is required, this may be done by defining \verb|fnt.buildinit_hook ()|, which is empty by default.
+% See \cref{subsubsec:new}.
+%
% \DescribeTarg{uniquifyencs} \meta{encoding tag}\par\noindent
-% Tries to ensure that the names of encoding files and font encodings are unique by editing font definition files and map file fragments in \texttt{keepdir}.
+% Tries to ensure that the names of encoding files and font encodings are unique by editing font definition files and map file fragments in \texttt{fnt.keepdir}.
% \meta{encoding tag} is optional.
% If no argument is given and \texttt{encodingtag} is empty, a suitable tag will be determined automatically\footnote{Hopefully.}.
%
+% Note that it is not necessary to use this target if \textt{l3build fnttarg} is used with a tool for which built-in support is provided.
+%
% \subsection{Lua Functions}\label{subsec:fns}
%
% \subsubsection{New Functions}\label{subsubsec:new}
%
-% \DescribelFn{finst()} \texttt{finst}\plarg{patt,dir,mode}\par\noindent
-% Compile the second \lpack{fontinst} stage.
+% \changes{v0.2}{2025-01-25}{New function: \texttt{fnt.afm2tfm()}.}
+% \DescribelFn{fnt.afm2tfm()} \texttt{fnt.afm2afm}\plarg{dir}\par\noindent
+% A function to generate support files for simple symbolic fonts in \meta{dir} using \texttt{afm2tfm}.
+% The function generates \tfm s, \fd s and a \map.
+% It requires \afm s and, optionally, \enc s.
+% If \meta{dir} is unspecified, \texttt{fnt.fntdir} is used.
%
-% Called by \texttt{fontinst()}.
+% If \texttt{fnt.afmtotfm} is \texttt{true}, a call to \verb|fnt.afm2tfm()| replaces the default call to \texttt{fnt.fontinst()} when the \texttt{fnttarg} target is used.
+%
+% Like \texttt{fnt.fontinst()}, \verb|fnt.afm2tfm()| calls \verb|build_fnt()| and \texttt{fnt.fntkeeper()}, but it does \textbf{not} call \texttt{fnt.uniquify()}.
+%
+% Note this function is designed for only very simple cases.
+% The target \TeX{} fonts must each correspond to a unique \file{.afm} (though it would not be hard to extend the function to support a one-many mapping).
+%
+% \changes{v0.2}{2025-01-26}{New function: \texttt{fnt.buildinit()}.}
+% \DescribelFn{fnt.buildinit()} \texttt{fnt.buildinit}\plarg{}\par\noindent
+% Sets up the build environment in preparation for building by unpacking and copying files, installing dependencies etc.\ in preparation for building.
+% Workflows supported out-of-the-box use this function, so there is no need to invoke it explicitly in these cases\footnote{^^A
+% See \verb|fnt.fontinst()| and \verb|fnt.afm2tfm()| in \file{fntbuild-build.lua}.^^A
+% }.
+% It can be used in the definition of custom functions.
+% See \cref{sec:custom} for an example.
+%
+% \changes{v0.2}{2025-01-25}{New function: \texttt{fnt.buildinit\_hook()}.}
+% \DescribelFn{fnt.buildinit_hook()} \texttt{fnt.buildinit\_hook}\plarg{}\par\noindent
+% A function which does nothing successfully by default, similar to the hooks provided by \lpack{l3build}.
+% May be redefined to perform additional tasks when setting up the environment for \texttt{fnttarg}.
+% The function should return an error level.
+%
+% The hook is executed after unpacking, copying etc.\ at the end of \texttt{fnt.buildinit()} so it can be used to modify those preparations, if necessary.
+%
+% \changes{v0.2}{2025-01-25}{New function: \texttt{fnt.build\_fnt()}.}
+% \DescribelFn{fnt.build_fnt()} \verb|fnt.build_fnt|\plarg{dir,cmd,file}\par\noindent
+% A wrapper around \texttt{runcmd()} which runs \meta{cmd} \meta{file} in \meta{dir}.
+% If \texttt{fnt.buildsearch} is \texttt{false} (the default), the function first sets up a restricted environment designed to avoid contaminating the build with undesirable elements from \TeX{} search paths.
+%
+% Note that the restrictions are designed to avoid contamination resulting from searches using \texttt{kpathsea}.
+% If you use this function with a different tool chain, you may need to take additional steps to isolate the build.
+% For example, the function does nothing to prevent a FontForge script accessing resources in \path{~/.local/share}, \path{/usr/local/fonts}, \path{/etc}, \path{/System/Library} etc\@.
+%
+% \textbf{In general, \lpack{l3build} ‘sandboxing’ uses a black-listing rather than a white-listing model.
+% Since this is inherently less reliable, you should not depend on the effectiveness of isolation.}
+% This means you should check what actually happens e.g.~which paths actually end up in your \texttt{.log} files or test the effectiveness of the isolation.
+%
+% The table \verb|fnt.build_fnt_env| may be used to selectively adapt the default sandboxing, which is sets the \texttt{kpathsea} variables shown in \cref{tab:build-env}.
+% \begin{table}
+% \centering
+% \caption{Default environment for ‘sandboxed’ build.}\label{tab:build-env}
+% \begin{tabular}{>{\ttfamily\arraybackslash}l>{\ttfamily\arraybackslash}l}
+% \toprule
+% kpathsea \textsf{variable} & \textsf{value} \\
+% \midrule
+% TEXINPUTS & . fnt.localtexmf() \\
+% TEXMFAUXTREES & \{\} \\
+% TEXMFHOME & \{\} \\
+% TEXMFLOCAL & \{\} \\
+% TEXMFCONFIG & . \\
+% TEXMFVAR & . \\
+% VFFONTS & \verb|${TEXINPUTS}| \\
+% TFMFONTS & \verb|${TEXINPUTS}| \\
+% TEXFONTMAPS & \verb|${TEXINPUTS}| \\
+% T1FONTS & \verb|${TEXINPUTS}| \\
+% AFMFONTS & \verb|${TEXINPUTS}| \\
+% TTFFONTS & \verb|${TEXINPUTS}| \\
+% OPENTYPEFONTS & \verb|${TEXINPUTS}| \\
+% LIGFONTS & \verb|${TEXINPUTS}| \\
+% ENCFONTS & \verb|${TEXINPUTS}| \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% \changes{v0.2}{2025-02-05}{Renamed function: \texttt{fnt.finst()} (was \texttt{finst()}.}
+% \DescribelFn{fnt.finst()} \texttt{fnt.finst}\plarg{patt,dir,mode}\par\noindent
+% A wrapper around \verb|fnt.build_fnt()| which runs \verb|pdftex --interaction| \meta{mode} in directory \meta{dir} on each file in \meta{dir} matching the pattern \meta{patt}.
+%
+% Called by \texttt{fnt.fontinst()}.
% There is usually no need to call this function directly.
%
-% \DescribelFn{fontinst()} \texttt{fontinst}\plarg{dir,mode}\par\noindent
-% The main function called by \texttt{fnttarg}.
+% \changes{v0.2}{2025-02-05}{Renamed function: \texttt{fnt.fontinst()} (was \texttt{fontinst()}.}
+% \DescribelFn{fnt.fontinst()} \texttt{fnt.fontinst}\plarg{dir,mode}\par\noindent
+% Executes a \lpack{fontinst} workflow to generate \TeX{} fonts and associated files in directory \meta{dir}, executing \texttt{pdftex} with the option \verb|--interaction| \meta{mode}.
+%
+% This is the default build function called by \texttt{fnttarg}.
%
-% The function assumes \lpack{fontinst} is used but can be redefined to build files using alternative tools as appropriate.
-%
-% The default definition calls \texttt{finst()}, \texttt{fntkeeper()} and \texttt{uniquify()} in addition to performing initial compilation.
+% The function calls \texttt{fnt.finst()}, \texttt{fnt.fntkeeper()} and \texttt{fnt.uniquify()} in addition to performing initial compilation.
% The process requires the usual \lpack{fontinst} setup i.e.~a driver to generate the initial files and a second file to create map file fragments.
%
% If a variable scaling factor is used, the font definition files will be edited to ensure this works, since \lpack{fontinst} apparently supports scaling only by a fixed factor.
@@ -275,32 +419,135 @@
% }{}
% \end{verbatim}
% to enable a suitable option in the \texttt{sty} file.
+%
+% If \lpack{fontinst} is setup to produce a shell script for converting \file{.pl} and \file{.vpl} files to \file{.tfm} and \file{.vf}, the function executes the commands contained in this script.
+% In order to maintain compatibility on Windows, the commands are extracted and run by Lua rather than calling the shell to execute the commands directly.
%
-% \DescribelFn{fnt_test()} \texttt{fnt_test}\plarg{fntpkgname,fds,content,maps,fdsdir}\par\noindent
-% Auto-generates \texttt{lvt} files suitable for use with \texttt{l3build check} from a template.
+% \changes{v0.2}{2025-02-05}{New function: \texttt{fnt.fntsubsetter()}.}
+% \DescribelFn{fnt.fntsubsetter ()} \texttt{fnt.fntsubsetter}\plarg{}\par\noindent
+% Inserts a font encoding subset declarations into font definition files.
+% Explicit use is only required for custom build functions, as the standard options for \verb|fnt.build_fnt ()| incorporate this function.
+% Returns an error level, but this may not be accurate.
%
-% \DescribelFn{fntkeeper()} \texttt{fntkeeper}\plarg{}\par\noindent
-% Copies generated files to \texttt{keepdir} and/or \texttt{keeptempdir} to prevent deletion by \texttt{l3build}.
+% Note that, by default, the presence of this function does nothing because subset declarations are disabled by default.
+% To insert declarations, not only must \texttt{fnt.fntsubsetter ()} be executed by the build function.
+% \texttt{fnt.subset} must also be set to a non-\texttt{nil} value other than \texttt{false}.
%
-% This function is called by \texttt{fontinst()} and may be useful if that function is redefined.
+% \changes{v0.2}{2025-02-05}{Renamed function: \texttt{fnt.fntkeeper()} (was \texttt{fntkeeper()}.}
+% \DescribelFn{fnt.fntkeeper()} \texttt{fnt.fntkeeper}\plarg{dir}\par\noindent
+% Copies generated files in \meta{dir} to \texttt{fnt.keepdir} and/or \texttt{fnt.keeptempdir} to prevent deletion by \texttt{l3build}.
+% Returns an error level.
+%
+% This function is called by the function executed by the default functions called by \texttt{fnttarg()} and may be useful if that target is redefined to call a different function.
%
-% \DescribelFn{uniquify()} \texttt{uniquify}\plarg{tag}\par\noindent
+% \changes{v0.2}{2025-01-25}{New function: \texttt{fnt.lsrdir()}.}
+% \DescribelFn{fnt.lsrdir()} \texttt{fnt.lsrdir}\plarg{path,filenames}\par\noindent
+% Adds a recursive list of files in \texttt{path} to the list of files in \texttt{filenames} and returns \texttt{filenames} and returns the resulting table.
+% \texttt{path} should be a string containing the fully-qualified path to a directory.
+% If specified, \texttt{filenames} should be a table.
+% Note that the function appends entries to \texttt{filenames} rather than replacing them.
+%
+% \changes{v0.2}{2025-02-05}{Renamed function: \texttt{fnt.test()} (was \texttt{fnt_test()}.}
+% \DescribelFn{fnt.test()} \verb|fnt.test|\plarg{fntpkgname,fds,content,maps,fdsdir}\par\noindent
+% Auto-generates \texttt{lvt} files suitable for use with \texttt{l3build check} from a template.
+%
+% \DescribelFn{fnt.uniquify()} \texttt{fnt.uniquify}\plarg{tag}\par\noindent
% Tries to ensure the names of font encodings and encoding files are unique by editing font definition files and map file fragments.
%
-% This function is used by \texttt{fontinst()} or may be called directly using the \texttt{uniquifyencs} target.
+% This function is used by \texttt{fnt.fontinst()} and \verb|fnt.afm2tfm ()|, may be utilised in a custom definition of \verb|fnt.build_fnt ()| or may be called directly using the \texttt{uniquifyencs} target.
%
% \subsubsection{Redefined Functions}\label{subsubsec:redef}
%
-% \DescribelFn{checkinit_hook()} \texttt{checkinit_hook}\plarg{}\par\noindent
+% \DescribelFn{checkinit_hook()} \verb|checkinit_hook|\plarg{}\par\noindent
% This is a standard \lpack{l3build} function which does nothing by default.
-% \file{fontinst.lua} redefines it to automatically generate test files suitable for use with \texttt{l3build check} if a test template is available.
+% \file{fntbuild.lua} redefines it to automatically generate test files suitable for use with \texttt{l3build check} if a test template is available.
+% If \texttt{checksearch} is \texttt{false}, the hook also sets up an environment tailored to font-testing.
%
+% \changes{v0.2}{2025-01-25}{Disable \texttt{checksearch} by default.}
+% \textbf{Note that \texttt{checksearch} is disabled by default.}
+% Contrary to \lpack{l3build}, \texttt{fntbuild.lua} enables sandboxing during both building and testing.
+% If you do not want this, reenable \texttt{checksearch} after \file{fntbuild.lua} is read or, better yet, create a custom \file{fntbuild-config.lua}.
+%
+% The default environment for testing does the following:
+% \begin{itemize}
+% \item concatenates all files specified in \verb|fnt.mapfiles_sys| and writes the result to \file{pdftex.map} in \texttt{testdir};
+% \item copies the contents of \texttt{fnt.keepdir} to \texttt{testdir};
+% \item copies either the files specified in \verb|fnt.checksuppfiles_sys| or the contents of the directories listed in \cref{tab:check-suppdirs} to \texttt{testdir};
+% \begin{table}
+% \centering
+% \caption{Default additions to ‘sandbox’ if none are specified.
+% For files, the file is added.
+% For directories, the contents are added.%
+% }\label{tab:check-suppdirs}
+% \begin{tabular}{*{3}T}
+% \toprule
+% \multicolumn{2}{l}{\sffamily Files} & \sffamily Directories \\
+% \midrule
+% /tex/latex/base/ & article.cls & /tex/latex/l3build \\
+% & fontenc.sty & /tex/latex/l3backend \\
+% & omlcmm.fd & /fonts/enc/dvips/base \\
+% & omlcmr.fd & /fonts/enc/dvips/cm-super \\
+% & omscmr.fd & /fonts/type1/public/amsfonts/cm \\
+% & omscmsy.fd & /fonts/type1/public/cm-super \\
+% & ot1cmr.fd & /fonts/tfm/public/cm \\
+% & ot1cmss.fd & /fonts/tfm/jknappen/ec \\
+% & ot1cmtt.fd & \\
+% & size10.clo & \\
+% & size11.clo & \\
+% & size12.clo & \\
+% & t1cmr.fd & \\
+% & t1cmss.fd & \\
+% & t1cmtt.fd & \\
+% & tracefnt.sty & \\
+% & ts1cmr.fd & \\
+% & ts1cmss.fd & \\
+% & ts1cmtt.fd & \\
+% & ucmr.fd & \\
+% & ucmss.fd & \\
+% & ucmtt.fd & \\
+% /tex/latex/fonttable/ & fonttable.sty & \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% \item copies any files specified in \verb|fnt.checksuppfiles_add| to \texttt{testdir};
+% \item copies the file specified by \texttt{fnt.regress} to \texttt{testdir};
+% \item copies the template specified by \texttt{fnt.testtemp} to \texttt{unpackdir} for use in auto-generating tests;
+% \item restricts the environment by setting the variables listed in \cref{tab:check-env}.
+% \end{itemize}
+% \begin{table}
+% \centering
+% \caption{%^^A
+% Default environment for ‘sandboxed’ testing.%^^A
+% Note this configuration is applied \emph{in addition} to the steps taken by \texttt{l3build --check} to ‘isolate’ the test environment when \texttt{checksearch} is \texttt{false}.%^^A
+% }\label{tab:check-env}
+% \begin{tabular}{>{\ttfamily\arraybackslash}l>{\ttfamily\arraybackslash}l}
+% \toprule
+% \sffamily\texttt{kpathsea} variable & value \\
+% \midrule
+% TEXMFAUXTREES & \{\} \\
+% TEXMFHOME & \{\} \\
+% TEXMFLOCAL & \{\} \\
+% TEXMFCONFIG & . \\
+% TEXMFVAR & . \\
+% VFFONTS & . fnt.localtexmf() \\
+% TFMFONTS & . fnt.localtexmf() \\
+% TEXFONTMAPS & . fnt.localtexmf() \\
+% T1FONTS & . fnt.localtexmf() \\
+% AFMFONTS & . fnt.localtexmf() \\
+% TTFFONTS & . fnt.localtexmf() \\
+% OPENTYPEFONTS & . fnt.localtexmf() \\
+% LIGFONTS & . fnt.localtexmf() \\
+% ENCFONTS & . fnt.localtexmf() \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
% \DescribelFn{copyctan()} \texttt{copyctan}\plarg{}\par\noindent
-% This is extended to copy files from \texttt{keepdir} and to impose a single-layer of sub-directories of the kind required by \ctan{} for font distributions.
+% This is extended to copy files from \texttt{fnt.keepdir} and to impose a single-layer of sub-directories of the kind required by \ctan{} for font distributions.
%
-% \DescribelFn{docinit_hook()} \texttt{docinit_hook}\plarg{}\par\noindent
+% \DescribelFn{docinit_hook()} \verb|docinit_hook|\plarg{}\par\noindent
% This is a standard \lpack{l3build} function which does nothing by default.
-% \file{fontinst.lua} redefines it to automatically generate font tables suitable for use with \texttt{l3build doc} from a template.
+% \file{fntbuild.lua} redefines it to automatically generate font tables suitable for use with \texttt{l3build doc} from a template.
%
% \subsection{Variables}\label{subsec:vars}
%
@@ -307,214 +554,342 @@
% \newcolumntype{e}{>{\ttfamily =}c}
% \begin{table}
% \centering
-% \caption{\lpack{fontinst} defaults for \lpack{l3build} variables.}\label{tab:varia}
+% \caption{\lpack{fontscripts} defaults for \lpack{l3build} variables.}\label{tab:varia}
% \begin{tabularx}\linewidth{>{\ttfamily}le>{\ttfamily\raggedright\arraybackslash}X}
% \toprule
% \normalfont\textbf{Variable} & \multicolumn{1}{c}{} & \normalfont\textbf{Value} \\
% \midrule
-% bakext && ''.bkup''\\
-% checkdeps && \{maindir .. ''/nfssext-cfr'', maindir .. ''/fnt-tests''\}\\
+% binaryfiles && \{''*.pdf'', ''*.zip'', ''*.vf'', ''*.tfm'', ''*.pfb'', ''*.pfm'', ''*.ttf'', ''*.otf'', ''*.tar.gz''\}\\
+% checkdeps && \{maindir .. ''/fnt-tests''\}\\
% checkengines && \{''pdftex''\}\\
% checkformat && ''latex''\\
-% cleanfiles && \{keeptempfiles\}\\
-% ctanreadme && ''README.md''\\
-% demofiles && \{''*-example.tex''\}\\
-% flatten && true\\
-% flattentds && false\\
-% installfiles && \{''*.afm'', ''*.cls'', ''*.enc'', ''*.fd'', ''*.map'', ''*.otf'', ''*.pfb'', ''*.sty'', ''*.tfm'', ''*.ttf'', ''*.vf''\}\\
-% manifestfile && ''manifest.txt''\\
-% nifergwall && 0\\
-% ntarg && ''fnttarg''\\
-% packtdszip && true\\
+% checksearch && false \\
+% cleanfiles && \{fnt.keeptempfiles\}\\
+% installfiles && \{''*.afm'', ''*.cls'', ''*.enc'', ''*.fd'', ''*.map'', ''*.otf'', ''*.pfb'', ''*.pfm'', ''*.sty'', ''*.tfm'', ''*.ttf'', ''*.vf''\}\\
% sourcefiledir && sourcefiledir or ''.''\\
-% sourcefiles && \{''*.afm'', ''afm/*.afm'', ''*.pfb'', ''*.dtx'', ''*.ins'', ''opentype/*.otf'', ''*.otf'', ''tfm/*.tfm'', ''truetype/*.ttf'', ''*.ttf'', ''type1/*.pfb''\}\\
-% tagfiles && \{''*.dtx'', ''*.ins'', ''manifest.txt'', ''MANIFEST.txt'', ''README'', ''README.md''\}\\
+% sourcefiles && \{''*.afm'', ''afm/*.afm'', ''*.pfb'', ''*.pfm'', ''*.dtx'', ''*.ins'', ''opentype/*.otf'', ''*.otf'', ''tfm/*.tfm'', ''truetype/*.ttf'', ''*.ttf'', ''type1/*.pfb'', ''type1/*.pfm''\}\\
% tdslocations && \{%
-% ''fonts/afm/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.afm'',
-% ''fonts/enc/dvips/'' .. module .. ''/'' .. ''*.enc'',
-% ''fonts/map/dvips/'' .. module .. ''/'' .. ''*.map'',
-% ''fonts/opentype/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.otf'',
-% ''fonts/tfm/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.tfm'',
-% ''fonts/truetype/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.ttf'',
-% ''fonts/type1/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.pfb'',
-% ''fonts/type1/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.pfm'',
-% ''fonts/vf/'' .. vendor .. ''/'' .. module .. ''/'' .. ''*.vf'',
-% ''source/fonts/'' .. module .. ''/'' .. ''*.etx'',
-% ''source/fonts/'' .. module .. ''/'' .. ''*.mtx'',
-% ''source/fonts/'' .. module .. ''/'' .. ''*-drv.tex'',
-% ''source/fonts/'' .. module .. ''/'' .. ''*-map.tex'',
-% ''tex/latex/'' .. module .. ''/'' .. ''*.fd'',
+% ''fonts/afm/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.afm'',\newline
+% ''fonts/enc/dvips/'' .. module .. ''/'' .. ''*.enc'',\newline
+% ''fonts/map/dvips/'' .. module .. ''/'' .. ''*.map'',\newline
+% ''fonts/opentype/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.otf'',\newline
+% ''fonts/tfm/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.tfm'',\newline
+% ''fonts/truetype/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.ttf'',\newline
+% ''fonts/type1/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.pfb'',\newline
+% ''fonts/type1/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.pfm'',\newline
+% ''fonts/vf/'' .. fnt.vendor .. ''/'' .. module .. ''/'' .. ''*.vf'',\newline
+% ''source/fonts/'' .. module .. ''/'' .. ''*.etx'',\newline
+% ''source/fonts/'' .. module .. ''/'' .. ''*.mtx'',\newline
+% ''source/fonts/'' .. module .. ''/'' .. ''*-drv.tex'',\newline
+% ''source/fonts/'' .. module .. ''/'' .. ''*-map.tex'',\newline
+% ''tex/latex/'' .. module .. ''/'' .. ''*.fd'',\newline
% ''tex/latex/'' .. module .. ''/'' .. ''*.sty''
% \} \\
-% typesetdeps && \{maindir .. ''/nfssext-cfr''\}\\
% typesetexe && ''TEXMFDOTDIR=.:../local: pdflatex''\\
% typesetfiles && typesetfiles or \{''*.dtx'', ''*-tables.tex'', ''*-example.tex''\}\\
-% typesetsourcefiles && \{keepdir .. ''/*'', ''nfssext-cfr*.sty''\}\\
-% unpackexe && ''pdflatex''\\
-% unpackfiles && \{''*.ins''\}\\
-% utarg && ''uniquifyencs''\\
+% typesetsourcefiles && \{fnt.keepdir .. ''/*''\}\\
% \bottomrule
% \end{tabularx}
% \end{table}
% \begin{table}
% \centering
-% \caption{\lpack{fontinst} defaults for \lpack{fontscript} variables.}\label{tab:varia-n}
+% \caption{Default values for \lpack{fontscripts} variables.}\label{tab:varia-n}
% \begin{tabularx}\linewidth{>{\ttfamily}le>{\ttfamily\raggedright\arraybackslash}X}
% \toprule
% \normalfont\textbf{Variable} & \multicolumn{1}{c}{} & \normalfont\textbf{Value} \\
% \midrule
-% autotestfds && autotestfds or \{\}\\
-% binaryfiles && \{''*.pdf'', ''*.zip'', ''*.vf'', ''*.tfm'', ''*.pfb'', ''*.ttf'', ''*.otf'', ''*.tar.gz''\}\\
-% binmakers && \{''*-pltotf.sh''\}\\
-% familymakers && \{''*-drv.tex''\}\\
-% fnttestfds && fnttestfds or \{\}\\
-% keepdir && keepdir or sourcefiledir .. ''/keep''\\
-% keepfiles && keepfiles or \{''*.enc'', ''*.fd'', ''*.map'', ''*.tfm'', ''*.vf''\}\\
-% keeptempdir && keeptempdir or sourcefiledir .. ''/keeptemp''\\
-% keeptempfiles && keeptempfiles or \{''*.mtx'', ''*.pl'', ''*-pltotf.sh'', ''*-rec.tex'', ''*.vpl'', ''*.zz''\}\\
-% mapmakers && \{''*-map.tex''\}\\
-% vendor && vendor or ''public''\\
+% fnt.afmtotfm && nil \\
+% fnt.autotestfds && fnt.autotestfds or \{\}\\
+% fnt.binmakers && fnt.binmakers or \{''*-pltotf.sh''\}\\
+% fnt.builddeps && fnt.builddeps or \{\} \\
+% fnt.buildfiles && fnt.buildfiles or \{ ''*.afm'', ''*.enc'', ''*.etx'', ''*.fd'', ''*.lig'', ''*.make'', ''*.map'', ''*.mtx'', ''*.nam'', ''*.otf'', ''*.pe'', ''*.tex'' , ''*.tfm'' \} \\
+% fnt.buildsearch && false \\
+% fnt.buildsuppfiles\_sys && fnt.buildsuppfiles\_sys or \{\} \\
+% fnt.checksuppfiles\_sys && fnt.checksuppfiles\_sys or \{\} \\
+% fnt.checksuppfiles\_add && fnt.checksuppfiles\_add or \{\} \\
+% fnt.familymakers && fnt.familymakers or \{''*-drv.tex''\}\\
+% fnt.fntdir && fnt.fntdir or builddir .. ''/fnt'' \\
+% fnt.fnttestfds && fnt.fnttestfds or \{\}\\
+% fnt.keepdir && fnt.keepdir or sourcefiledir .. ''/keep''\\
+% fnt.keepfiles && fnt.keepfiles or \{''*.enc'', ''*.fd'', ''*.map'', ''*.tfm'', ''*.vf''\}\\
+% fnt.keeptempdir && fnt.keeptempdir or sourcefiledir .. ''/keeptemp''\\
+% fnt.keeptempfiles && fnt.keeptempfiles or \{''*.mtx'', ''*.pl'', ''*-pltotf.sh'', ''*-rec.tex'', ''*.vpl'', ''*.zz''\}\\
+% fnt.mapmakers && fnt.mapmakers or \{''*-map.tex''\}\\
+% fnt.mapfiles\_sys && fnt.mapfiles\_sys or \{\} \\
+% fnt.mapfiles\_add && fnt.mapfiles\_add or \{\} \\
+% fnt.pkgbase && fnt.pkgbase or '''' \\
+% fnt.regress && fnt.regress or ''fnt-tests.tex'' \\
+% fnt.subset && false \\
+% fnt.subsetdefns && fnt.subsetdefns or \{\} \\
+% fnt.subsetfiles && fnt.subsetfiles or \{\} \\
+% fnt.subsettemplate && fnt.subsettemplate or ''\textbackslash DeclareEncodingSubset\{TS1\}\{\$FONTFAMILY\}\{\$SUBSET\}'' \\
+% fnt.tablestemp && fnt.tablestemp or ''fnt-tables.tex'' \\
+% fnt.testtemp && fnt.testtemp or ''fnt-test.lvt'' \\
+% fnt.vendor && fnt.vendor or ''public''\\
% \bottomrule
% \end{tabularx}
% \end{table}
%
-% Defaults assigned by \file{fontinst.lua} to both \lpack{l3build} and \lpack{fontscripts} variables are listed in \fref{tab:varia} and \fref{tab:varia-n} respectively.
-% At least some of these variables would need adjustment in order to use \lpack{fontscripts} for a different project, let alone in a different environment.
+% Defaults assigned by \file{fntbuild.lua} to both \lpack{l3build} and \lpack{fontscripts} variables are listed in \cref{tab:varia} and \cref{tab:varia-n} respectively.
%
-% \DescribelVar{autotestfds}\texttt{autotestfds} \istable{globs}
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.afmtotfm}.}
+% \DescribelVar{fnt.afmtotfm}\texttt{fnt.afmtotfm}\isbool
+% \texttt{nil} by default.
+% Setting this to anything other than \texttt{false} or \texttt{nil} will use \texttt{afm2tfm} rather than \lpack{fontinst} to build the fonts.
+% This is only designed for \textbf{\em extremely} simple fonts such as those which contain only text symbols.
%
-% See also \texttt{testfds}.
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.autotestfds} (was \texttt{autotestfds}).}
+% \DescribelVar{fnt.autotestfds}\texttt{fnt.autotestfds} \istable{globs}
%
-% \DescribelVar{binmakers}\texttt{binmakers} \istable{globs}
+%^^A See also \texttt{testfds}.
+%
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.binmakers} (was \texttt{binmakers}).}
+% \DescribelVar{fnt.binmakers}\texttt{fnt.binmakers} \istable{globs}
% Scripts to run to convert human-readable \TeX{} font metrics/virtual font metrics into binary \TeX{} font metrics and virtual fonts.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.buildsearch}.}
+% \DescribelVar{fnt.buildsearch}\texttt{fnt.buildsearch}\isbool
+% Whether to search the \texttt{texmf} trees while generating font files.
+%
+% Defaults to \texttt{false}.
+%
+% Note that this is akin to \pkg{l3build}'s \texttt{checksearch} etc.\ but for the additional build step required when preparing fonts.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.builddeps}.}
+% \DescribelVar{fnt.builddeps}\texttt{fnt.builddeps} \istable{}
+% Dependencies to install when building fonts in a sandbox.
+% If empty, some basic dependencies are installed to ensure straightforward cases work out-of-the-box.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.buildfiles}.}
+% \DescribelVar{fnt.buildfiles}\texttt{fnt.buildfiles} \istable{globs}
+% Source files to copy to the build directory when generating font files.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.buildsuppfiles\_sys}.}
+% \DescribelVar{fnt.buildsuppfiles_sys}\texttt{fnt.buildsuppfiles\_sys} \istable{globs}
%
-% \DescribelVar{familymakers}\texttt{familymakers} \istable{globs}
-% Source files \texttt{fontinst()} should compile to generate \TeX{} support files.
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.checksuppfiles\_add}.}
+% \DescribelVar{fnt.checksuppfiles_add}\texttt{fnt.checksuppfiles\_add} \istable{globs}
+% Dependencies to install when checking.
+% Supplements default list.
%
-% For the default definition of \texttt{fontinst()} this variable should specify the driver or drivers to be compiled.
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.checksuppfiles\_sys}.}
+% \DescribelVar{fnt.checksuppfiles_sys}\texttt{fnt.checksuppfiles\_sys} \istable{globs}
+% Dependencies to install when checking.
+% Overrides default list.
%
-% \DescribelVar{fnttestfds}\texttt{fnttestfds} \istable{globs}
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.familymakers} (was \texttt{familymakers}).}
+% \DescribelVar{fnt.familymakers}\texttt{fnt.familymakers} \istable{globs}
+% Source files \texttt{fnt.fontinst()} should compile to generate \TeX{} support files.
+%
+% For the default definition of \texttt{fnt.fontinst()} this variable should specify the driver or drivers to be compiled.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.fntdir}.}
+% \DescribelVar{fnt.fntdir}\texttt{fnt.fntdir}\isstring{directory path}
+% Directory in which to build fonts.
+%
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.fnttestfds} (was \texttt{fnttestfds}).}
+% \DescribelVar{fnt.fnttestfds}\texttt{fnt.fnttestfds} \istable{globs}
% Files to use when generating test files for \texttt{l3build}.
%
-% \DescribelVar{keepdir}\texttt{keepdir} \isstring{dir}
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.keepdir} (was \texttt{keepdir}).}
+% \DescribelVar{fnt.keepdir}\texttt{fnt.keepdir} \isstring{dir}
% Directory to store final products of font creation e.g.~font definitions, map file fragments, \TeX{} font metrics, virtual fonts etc.
%
-% \DescribelVar{keeptempdir}\texttt{keeptempdir} \isstring{dir}
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.keepfiles} (was \texttt{keepfiles}).}
+% \DescribelVar{fnt.keepfiles}\texttt{fnt.keepfiles} \istable{globs}
+% Files to copy to \texttt{fnt.keepdir}.
+%
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.keeptempdir} (was \texttt{keeptempdir}).}
+% \DescribelVar{fnt.keeptempdir}\texttt{fnt.keeptempdir} \isstring{dir}
% Directory to store intermediat products of font creation e.g.~human-readable \TeX{} font metrics, virtual font metrics etc.
%
-% \DescribelVar{keepfiles}\texttt{keepfiles} \istable{globs}
-% Files to copy to \texttt{keepdir}.
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.keeptempfiles} (was \texttt{keeptempfiles}).}
+% \DescribelVar{fnt.keeptempfiles}\texttt{fnt.keeptempfiles} \istable{globs}
+% Files to copy to \texttt{fnt.keeptempdir}.
%
-% \DescribelVar{keeptempfiles}\texttt{keeptempfiles} \istable{globs}
-% Files to copy to \texttt{keeptempdir}.
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.mapfiles\_sys}.}
+% \DescribelVar{fnt.mapfiles_sys}\texttt{fnt.mapfiles\_sys} \istable{globs}
+% Map file fragments to install when checking.
+% If unset, \file{cm.map}, \file{cm-super-t1.map}, \file{cm-super-ts1.map} and \file{lm.map} are used.
%
-% \DescribelVar{mapmakers}\texttt{mapmakers} \istable{globs}
-% Source files \texttt{finst()} should compile to generate map file fragments etc.
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.mapfiles\_add}.}
+% \DescribelVar{fnt.mapfiles_add}\texttt{fnt.mapfiles\_add} \istable{globs}
+% Additional map file fragments to install when checking.
%
-% \DescribelVar{vendor}\texttt{mapmakers} \isstring{vendor}
-% Vendor directory for font installation such as \texttt{public} or \texttt{arkandis}.
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.mapmakers} (was \texttt{mapmakers}).}
+% \DescribelVar{fnt.mapmakers}\texttt{fnt.mapmakers} \istable{globs}
+% Source files \texttt{fnt.finst()} should compile to generate map file fragments etc.
%
-% \section{Templates}\label{sec:templates}
+% \changes{v0.2}{2025-01-28}{Newly documented variable: \texttt{fnt.pkgbase}.}
+% \DescribelVar{fnt.pkgbase}\texttt{fnt.pkgbase} \isstring{identifier}
+% May be used to set a string identifying the package if \texttt{fntbuild} has trouble determining one automatically\footnote{%
+% None of the packages I've prepared with \texttt{fntbuild} have required this.
+% Usually, the script should do a reasonable job of discovering a suitable value automatically.%
+% }.
%
-% By default, \file{fontinst.lua} is able to utilise two kinds of \texttt{tex} template.
-% By default, it is assumed these templates are located in \path{maindir .. ''fnt-tests''}.
-% In order for this to work, this directory must include a \file{build.lua} even though there is nothing to build.
-% Otherwise, \texttt{l3build} cannot recognise the directory's contents as legitimate and fails to copy them correctly into the \texttt{build} directory.
+% \changes{v0.2}{2025-02-04}{New variable: \texttt{fnt.regress}.}
+% \DescribelVar{fnt.regress}\texttt{fnt.regress}\isstring{filename} \par\noindent
+%
+% The file containing regression tests for use in auto-generating tests.
+% \file{fnt-tests.tex} provides a set used by default.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.subset}.}
+% \DescribelVar{fnt.subset}\texttt{fnt.subset}\isbool \par\noindent
+% \texttt{nil} by default.
+% Set to any value other than \texttt{nil} or \texttt{false} to enable subset declarations.
+%
+% \textbf{Note this variable must be given a non-default value if subset encoding declarations should be added.
+% Specifying definitions, files and templates only determines what will be done IF anything is done at all.}
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.subsetdefns}.}
+% \DescribelVar{fnt.subsetdefns}\texttt{fnt.subsetdefns} \istable{}
+% If different families should get different subset values, the various settings should be configured here.
+%
+% For example, the following code sets the subset for \meta{family 1} to \texttt{1} and that for \meta{family 2} to \texttt{3}.
% \iffalse
%<*verb>
% \fi
-% \begin{verbatim}
-% module = "fnt-tests"
-% maindir = ".."
-% sourcefiles = {"*.tex"}
-% installfiles = {"*.tex"}
-% \end{verbatim}
+\begin{verbatim}
+fnt.subsetdefns.<family 1> = "1"
+fnt.subsetdefns.<family 2> = "3"
+\end{verbatim}
% \iffalse
%</verb>
% \fi
%
-% Font packages should then be located in subdirectories or sub-subdirectories of \texttt{maindir} with \file{build.lua} scripts configured appropriately.
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.subsetfiles}.}
+% \DescribelVar{fnt.subsetfiles}\texttt{fnt.subsetfiles} \istable{globs}
+% Font definition files into which encoding subset declarations should be inserted.
+%
+% \changes{v0.2}{2025-01-25}{New variable: \texttt{fnt.subsettemplate}.}
+% \DescribelVar{fnt.subsettemplate}\texttt{fnt.subsettemplate} \isstring{}
+% Template to use when constructing subset declarations.
+%
+% By default, the template simply plugs family and value pairs into a standard declaration as shown in \cref{tab:varia-n}.
+% However, it is also possible to use more complex declarations.
+% For example, \pkg{cfr-lm} does not actually include any \texttt{TS1} fonts at all.
+% Instead, it just says which Latin Modern family should be used for which \pkg{cfr-lm} family.
+% So the only sensible approach is to use whichever subset declarations the relevant Latin Modern font definitions use.
+% Unfortunately, these are provided by the \LaTeXe{} format rather than \pkg{lm}, besides which it is at least theoretically possible the appropriate subsets might change and \pkg{cfr-lm} has no control over this.
+% For this reason, the package simply says ‘for \pkg{cfr-lm} family $x$, use whichever subset is declared for Latin Modern family $y$’ for each pair of families $x$ and $y$.
%
+% This is setup using the following line in the \file{build.lua}:
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbatim}
+fnt.subsettemplate = "\\ExpandArgs {nnc} \\DeclareEncodingSubset {TS1} {$FONTFAMILY} {TS1:$SUBSET}"
+\end{verbatim}
+% \iffalse
+%</verb>
+% \fi
+% Rather than numerical values, therefore, \pkg{cfr-lm} declares subset encodings such as
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbatim}
+fnt.subsetdefns.clms = "lmss"
+\end{verbatim}
+% \iffalse
+%</verb>
+% \fi
+% The result is that \LaTeXe{} will use whichever subset is declared for \texttt{lmss} for \texttt{clms}, which, after all, is no more than a fancy alias for \texttt{lmss} in the \texttt{TS1} encoding.
+%
+% \changes{v0.2}{2025-02-04}{New variable: \texttt{fnt.tablestemp}.}
+% \DescribelVar{fnt.tablestemp}\texttt{fnt.tablestemp}\isstring{filename} \par\noindent
+%
+% The file containing the template to use when auto-generating font tables.
+% \file{fnt-tables.tex} provides the default template.
+%
+% \changes{v0.2}{2025-02-04}{New variable: \texttt{fnt.testtemp}.}
+% \DescribelVar{fnt.testtemp}\texttt{fnt.testtemp}\isstring{filename} \par\noindent
+%
+% The file containing the template to use when auto-generating font tests.
+% \file{fnt-test.lvt} provides the default template.
+%
+% \changes{v0.2}{2025-02-05}{Renamed variable: \texttt{fnt.vendor} (was \texttt{vendor}).}
+% \DescribelVar{fnt.vendor}\texttt{fnt.vendor} \isstring{fnt.vendor}
+% Vendor directory for font installation such as \texttt{public} or \texttt{arkandis}.
+%
+% \section{Configuration}\label{sec:config}
+%
+% \changes{v0.2}{2025-01-25}{Support for configuration files. See \cref{sec:config}.}
+%
+% For simple cases, configuration may be done in \file{build.lua}, along with generic \pkg{l3build} customisation.
+% For more elaborate modifications --- or cases where a subset of configuration options should be shared between modules --- settings may be placed in one or more \file{fntbuild-config.lua} files.
+% \begin{enumerate}
+% \item \file{fntbuild-vars.lua} is loaded.
+% This ensures required variables get default values and modifies a number of \pkg{l3build} defaults.
+% \item A \texttt{kpse}-based search is performed.
+% If \file{fntbuild-config.lua} is found, it is loaded.
+% \item If it exists, \texttt{maindir/fntbuild-config.lua} is loaded.
+% \item If it exists, \texttt{sourcedir/fntbuild-config.lua} is loaded.
+% \end{enumerate}
+% So more specific settings will override more general ones.
+%
+% \section{Templates}\label{sec:templates}
+%
+% \changes{v0.2}{2025-02-05}{Default templates. Simplified template configuration and search.}
+% By default, \file{fntbuild.lua} is able to utilise two kinds of \texttt{tex} template.
+% The names of these files are stored in \texttt{fnt.testtemp} and \texttt{fnt.tablestemp}.
+% If no local alternatives are provided, \texttt{fntbuild.lua} will use \lpack{kpathsea} to locate them, falling back to those included in the package and installed in \path{tex/latex/fontscripts/} under the \texttt{TEXMFDIST} tree by default.
+%
+% The default files may be overridden by either or both of the following methods:
+% \begin{enumerate}
+% \item altering the values of \texttt{fnt.testtemp} and/or \texttt{fnt.tablestemp};
+% \item providing local copies of the files named in \texttt{fnt.testtemp} and/or \texttt{fnt.tablestemp}.
+% \end{enumerate}
+%
+% The default contents are listed in \cref{subsec:temp}.
+%
% \subsection{Font Tables}\label{subsec:tables}
%
% A template for producing font tables as part of package documentation is provided.
-% The template is used in \file{fontinst.lua}'s \texttt{doc\_init()} hook to generate \texttt{tex} files populated with font information from font definition files.
+% The template is used in \file{fntbuild.lua}'s \texttt{doc\_init()} hook to generate \texttt{tex} files populated with font information from font definition files.
% This is then compiled by \texttt{l3build doc} to produce font tables.
%
+% Alternative content may be provided by supplying a local copy of \file{fnt-tables.tex} or specifying an alternative template in \texttt{fnt.tablestemp}.
+% If \texttt{TABLES} occurs in the template, \file{fntbuild.lua} will replace it with a \env{document} environment containing a series of commands of the form \cs{sampletable}\marg{encoding}\marg{family}\marg{series}\marg{shape}, where \meta{encoding}, \meta{family}, \meta{series} and \meta{shape} are derived from the font definition files.
+%
+% The default template is listed in \cref{subsubsec:tablestemp}.
+%
% \subsection{Font Tests}\label{subsec:tests}
%
-% If a template is found in the font test directory, it will be used in \file{fontinst.lua}'s \texttt{check\_init()} hook to generate \texttt{lvt} files populated with font information from font definition files.
+% If a template is found in the font test directory, it will be used in \file{fntbuild.lua}'s \texttt{check\_init()} hook to generate \texttt{lvt} files populated with font information from font definition files.
% These tests are then compiled by \texttt{l3build check} as part of the test suite.
% Certain file patterns are excluded from testing.
% In particular, separate tests are not generated for \texttt{ts1} \texttt{fd} files because these families are typically better tested along with their \texttt{t1} counterparts.
%
+% Alternative content may be provided by supplying a local copy of \file{fnt-test.lvt} or specifying an alternative template in \texttt{fnt.testtemp}.
+% If \texttt{SAMP} occurs in the template, \file{fntbuild.lua} will replace it with a series of tests derived from the font definition files.
+% These tests should typically use commands provided explicitly or implicitly by the file specified in \texttt{fnt.regress}.
+% By default, tests utilise a macro \cs{sampler} defined to absorb four arguments of the form \marg{encoding}\marg{family}\marg{series}\marg{shape}.
+% The result is a document containing various pieces supplied by \lpack{fonttable}.
%
+% A custom test suite may be specified by supplying a local copy of \file{fnt-tests.tex}, giving an alternative in \texttt{fnt.regress} or defining a different set of tests in the template specified by \texttt{fnt.testtemp}.
+%
+% \textbf{Note that you MUST supply a custom template if you change \texttt{fnt.regress}.}
+% It is, however, fine to supply a customised \file{fnt-tests.tex} for use with the default template.
+% Only if you want to use a different filename for the test suite is a custom template required.
+%
+% The default template is listed in \cref{subsubsec:testtemp}.
+% The default test suite is listed in \cref{subsec:regress}.
+%
% \section{Customisation}\label{sec:custom}
%
% As in the case of \lpack{l3build}, you can replace functions and targets at will, albeit on a much more limited scale.
-% Although it would be better to just not use \file{fontinst.lua} at all if you want to redefine everything, it can make sense to redefine \texttt{fontinst()} if, say, you want to use different font creation tools but make use of the functions for stashing generated files, generating font tables, testing etc.
+% Although it would be better to just not use \file{fntbuild.lua} at all if you want to redefine everything, it can make sense to replace \texttt{fnt.fontinst()} if, say, you want to use different font creation tools but make use of the functions for stashing generated files, generating font tables, testing etc.
%
% For example, \lpack{berenisadf} was built using a \file{build.lua} containing
-% \begin{verbatim}
-% autotcfds ={ "ts1ybd2j.fd", "ts1ybd2.fd", "ts1ybdj.fd", "ts1ybd.fd" }
-% dofile(maindir .. "/fontinst.lua")
-% function fntmake (dir,mode)
-% dir = dir or unpackdir
-% mode = mode or "errorstopmode --halt-on-error"
-% print("Unpacking ...\n")
-% local errorlevel = unpack()
-% print("Running make. Please be patient ...\n")
-% errorlevel = run(dir, "chmod +x ff-ybd.pe")
-% if errorlevel ~=0 then
-% gwall("Attempt to make fontforge script executable ", unpackdir, errorlevel)
-% else
-% errorlevel = run(dir, "make -f Makefile.make all")
-% if errorlevel ~= 0 then
-% gwall("make ", unpackdir, errorlevel)
-% end
-% -- make ts1 swash families so tc commands pick up the characters in ly1
-% for i, j in ipairs(autotcfds) do
-% local jfam = string.gsub(j, "^ts1(.*)%.fd$", "%1")
-% local jnewfam = jfam .. "w"
-% local jnew = string.gsub(j, "(%.fd)$", "w%1")
-% local f = assert(io.open(unpackdir .. "/" .. j,"rb"))
-% local content = f:read("*all")
-% f:close()
-% -- copied from l3build
-% -- but I don't understand why the first subs is needed
-% -- is it a problem if the file doesn't end with a newline?
-% content = string.gsub(content .. (string.match(content,"\n$") and "" or "\n"), "\r\n", "\n")
-% local new_content = string.gsub(content, "{" .. jfam .. "}", "{" .. jnewfam .. "}")
-% new_content = string.gsub(new_content, "(ts1[^%.]*)(%.fd)", "%1w%2")
-% new_content = string.gsub(new_content, "(TS1/ybd[a-z0-9]*)", "%1w")
-% f = assert(io.open(unpackdir .. "/" .. jnew,"w"))
-% -- this somehow removes the second value returned by string.gsub??
-% f:write((string.gsub(new_content,"\n",os_newline_cp)))
-% f:close()
-% end
-% errorlevel = fntkeeper()
-% if errorlevel ~= 0 then
-% gwall("FONT KEEPER FAILED! DO NOT MAKE STANDARD TARGETS WITHOUT RESOLVING!! ", unpackdir, errorlevel)
-% end
-% end
-% return nifergwall
-% end
-% target_list[ntarg] = {
-% func = fntmake,
-% desc = "Creates TeX font files",
-% pre = function(names)
-% if names then
-% print("fntmake does not need names\n")
-% help()
-% exit(1)
-% end
-% return 0
-% end
-% }
-% \end{verbatim}
-% That is, \lpack{berenisadf} doesn't use \texttt{fontinst()} at all, but \texttt{fntmake()}, which simply invokes \texttt{gnu} \texttt{make} and calls \texttt{fntkeeper()}\footnote{%
-% It does not ensure encoding names are unique, but it should.%
+% \newcommand*\FancyVerbStopString{-- STOP doc eg}
+% \newcommand*\FancyVerbStartString{-- START doc eg}
+% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true]{berenis-build.lua}
+% \let\FancyVerbStopString\relax
+% \let\FancyVerbStartString\relax
+% That is, \lpack{berenisadf} doesn't use any built-in build function at all, but \texttt{fnt.fntmake()}, which simply invokes \texttt{gnu} \texttt{make} and calls \texttt{fnt.fntkeeper()}\footnote{%
+% It does not ensure encoding names are unique because it uses no custom encodings of its own.%
% }.
+% Note the use of \texttt{fnt.buildinit()} to setup the build environment.
%
% \subsection{Examples}\label{subsec:eeiau}
%
@@ -538,14 +913,12 @@
% \end{itemize}
% \end{itemize}
%
+% \subsection{Templates}\label{subsec:temp}
%
-% \MaybeStop{%
-% \PrintChanges
-% \PrintIndex
-% }
-%
-% \section{Implementation}
+% Templates for auto-generating font tables and regression tests.
%
+% \subsubsection{Font Tables Template}\label{subsubsec:tablestemp}
+%
% \iffalse
%<*tables>
% \fi
@@ -553,7 +926,7 @@
% \begin{macrocode}
\pdftracingfonts=1
\RequirePackage{svn-prov}
-\ProvidesFileSVN{$Id: fontscripts.dtx 10412 2024-09-27 15:10:34Z cfrees $}[v0.1 \revinfo][\outFileName]
+\ProvidesFileSVN[fnt-tables.tex]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.2 \revinfo][\filebase: font table template]
\DefineFileInfoSVN
% \end{macrocode}
% \iffalse
@@ -568,188 +941,351 @@
\xfonttable{#1}{#2}{#3}{#4}%
\clearpage
}
-% vim: ts=2:sw=2:tw=80:nospell
+
+TABLES
+
% \end{macrocode}
% \end{template}
% \iffalse
%</tables>
% \fi
+%
+% \subsubsection{Test Template}\label{subsubsec:testtemp}
%
+% \iffalse
+%<*lvt>
+% \fi
+% \begin{template}{fnt-test.lvt}
+% \begin{macrocode}
+\RequirePackage{svn-prov}
+\ProvidesFileSVN[fnt-test.lvt]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo][fontscripts: l3build test template]
+\listfiles
+\input regression-test.tex\relax
+\input fnt-tests.tex\relax
+\setlength{\parindent}{0pt}
+\textheight=250mm
+\textwidth=160mm
+\oddsidemargin=0mm
+\evensidemargin=0mm
+\headheight=0pt
+\headsep=0pt
+\topmargin=-10mm
+\marginparwidth=0pt
+\marginparsep=0pt
+
+SAMP
+
+% \end{macrocode}
+% \end{template}
+% \iffalse
+%</lvt>
+% \fi
+%
+% \subsection{Regression Tests}\label{subsec:regress}
+%
+% Simple regression test suite for fonts focused on T1 and TS1 encodings.
+%
+% \iffalse
+%<*tests>
+% \fi
+% \begin{template}{fnt-tests.tex}
+% \begin{macrocode}
+\pdftracingfonts=1
+\RequirePackage{svn-prov}
+\ProvidesFileSVN[fnt-tests.tex]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo][fontscripts: l3build tests]
+\documentclass[10pt,a4paper]{article}
+\usepackage{fonttable}
+\usepackage{tracefnt}% infoshow is default; debugshow traces maths fonts, too
+\PassOptionsToPackage{nfssext-cfr}{debug}
+\newcounter{tccharcnt}
+\NewDocumentCommand \tcfnttest { o m }
+{%
+ \iftctest
+ \stepcounter{tccharcnt}{\normalfont\thetccharcnt:~}%
+ % \texttt{\textbackslash #2}:
+ \IfValueTF{#1}{%
+ \csname #2\endcsname {#1}%
+ }{%
+ \csname #2\endcsname
+ }%
+ \fi
+}
+\newif\iftctest
+\tctesttrue
+\makeatletter
+\newcommand\sampler{}
+\def\sampler#1#2#3#4{%
+ \setcounter{tccharcnt}{0}%
+ % \tracingoutput=1
+ #1 / #2 / #3 / #4 :
+
+ \tracinglostchars\thr@@
+ % \tracingonline\thr@@
+ \showoutput
+ \pikfont{#1}{#2}{#3}{#4}%
+ \aztext
+
+ \AZtext
+
+ \digitstext
+
+ \punctext
+
+ \knutext
+
+ Ææ Ŵŵ Ŷŷ Šš €
+
+ percent: \%
+
+ \begin{tabular}{llllllllll}
+ \tcfnttest{S} &
+ \tcfnttest[I]{capitalacute} &
+ \tcfnttest[I]{capitalbreve} &
+ \tcfnttest[I]{capitalcaron} &
+ \tcfnttest[I]{capitalcedilla} &
+ \tcfnttest[I]{capitalcircumflex} &
+ \tcfnttest[I]{capitaldieresis} &
+ \tcfnttest[I]{capitaldotaccent} &
+ \tcfnttest[I]{capitalgrave} &
+ \tcfnttest[I]{capitalhungarumlaut} \\
+ \tcfnttest[I]{capitalnewtie} &
+ \tcfnttest[I]{capitalogonek} &
+ \tcfnttest[I]{capitalring} &
+ \tcfnttest[I]{capitaltie} &
+ \tcfnttest[I]{capitaltilde} &
+ \tcfnttest{textacutedbl} &
+ \tcfnttest{textasciiacute} &
+ \tcfnttest{textasciibreve} &
+ \tcfnttest{textasciicaron} &
+ \tcfnttest{textasciicircum} \\
+ \tcfnttest{textasciidieresis} &
+ \tcfnttest{textasciigrave} &
+ \tcfnttest{textasciimacron} &
+ \tcfnttest{textasciitilde} &
+ \tcfnttest{textasteriskcentered} &
+ \tcfnttest{textbackslash} &
+ \tcfnttest{textbaht} &
+ \tcfnttest{textbar} &
+ \tcfnttest{textbardbl} &
+ \tcfnttest{textbigcircle} \\
+ \tcfnttest{textblank} &
+ \tcfnttest{textborn} &
+ \tcfnttest{textbraceleft} &
+ \tcfnttest{textbraceright} &
+ \tcfnttest{textbrokenbar} &
+ \tcfnttest{textbullet} &
+ \tcfnttest{textcelsius} &
+ \tcfnttest{textcent} &
+ \tcfnttest{textcentoldstyle} &
+ \tcfnttest{textcircledP} \\
+ \tcfnttest{textcolonmonetary} &
+ \tcfnttest{textcompwordmark} &
+ \tcfnttest{textcopyleft} &
+ \tcfnttest{textcopyright} &
+ \tcfnttest{textcurrency} &
+ \tcfnttest{textdagger} &
+ \tcfnttest{textdaggerdbl} &
+ \tcfnttest{textdblhyphen} &
+ \tcfnttest{textdblhyphenchar} &
+ \tcfnttest{textdegree} \\
+ \tcfnttest{textdied} &
+ \tcfnttest{textdiscount} &
+ \tcfnttest{textdiv} &
+ \tcfnttest{textdivorced} &
+ \tcfnttest{textdollar} &
+ \tcfnttest{textdollaroldstyle} &
+ \tcfnttest{textdong} &
+ \tcfnttest{textdownarrow} &
+ \tcfnttest{texteightoldstyle} &
+ \tcfnttest{textestimated} \\
+ \tcfnttest{texteuro} &
+ \tcfnttest{textfiveoldstyle} &
+ \tcfnttest{textflorin} &
+ \tcfnttest{textfouroldstyle} &
+ \tcfnttest{textfractionsolidus} &
+ \tcfnttest{textgravedbl} &
+ \tcfnttest{textguarani} &
+ \tcfnttest{textinterrobang} &
+ \tcfnttest{textinterrobangdown} &
+ \tcfnttest{textlangle} \\
+ \tcfnttest{textlbrackdbl} &
+ \tcfnttest{textleaf} &
+ \tcfnttest{textleftarrow} &
+ \tcfnttest{textlira} &
+ \tcfnttest{textlnot} &
+ \tcfnttest{textlquill} &
+ \tcfnttest{textmarried} &
+ \tcfnttest{textmho} &
+ \tcfnttest{textminus} &
+ \tcfnttest{textmu} \\
+ \tcfnttest{textmusicalnote} &
+ \tcfnttest{textnaira} &
+ \tcfnttest{textnaira} &
+ \tcfnttest{textnineoldstyle} &
+ \tcfnttest{textnumero} &
+ \tcfnttest{textohm} &
+ \tcfnttest{textonehalf} &
+ \tcfnttest{textoneoldstyle} &
+ \tcfnttest{textonequarter} &
+ \tcfnttest{textonesuperior} \\
+ \tcfnttest{textopenbullet} &
+ \tcfnttest{textordfeminine} &
+ \tcfnttest{textordmasculine} &
+ \tcfnttest{textparagraph} &
+ \tcfnttest{textperiodcentered} &
+ \tcfnttest{textpertenthousand} &
+ \tcfnttest{textperthousand} &
+ \tcfnttest{textpeso} &
+ \tcfnttest{textpilcrow} &
+ \tcfnttest{textpm} \\
+ \tcfnttest{textquotedblleft} &
+ \tcfnttest{textquotedblright} &
+ \tcfnttest{textquoteleft} &
+ \tcfnttest{textquoteright} &
+ \tcfnttest{textquotesingle} &
+ \tcfnttest{textquotestraightbase} &
+ \tcfnttest{textquotestraightdblbase} &
+ \tcfnttest{textrangle} &
+ \tcfnttest{textrbrackdbl} &
+ \tcfnttest{textrecipe} \\
+ \tcfnttest{textreferencemark} &
+ \tcfnttest{textregistered} &
+ \tcfnttest{textrightarrow} &
+ \tcfnttest{textrquill} &
+ \tcfnttest{textsection} &
+ \tcfnttest{textservicemark} &
+ \tcfnttest{textsevenoldstyle} &
+ \tcfnttest{textsixoldstyle} &
+ \tcfnttest{textsterling} &
+ \tcfnttest{textsurd} \\
+ \tcfnttest{textthreeoldstyle} &
+ \tcfnttest{textthreequarters} &
+ \tcfnttest{textthreequartersemdash} &
+ \tcfnttest{textthreesuperior} &
+ \tcfnttest{texttildelow} &
+ \tcfnttest{texttimes} &
+ \tcfnttest{texttrademark} &
+ \tcfnttest{texttwelveudash} &
+ \tcfnttest{texttwooldstyle} &
+ \tcfnttest{texttwosuperior} \\
+ \tcfnttest{textuparrow} &
+ \tcfnttest{textwon} &
+ \tcfnttest{textyen} &
+ \tcfnttest{textzerooldstyle} &
+ &
+ &
+ &
+ &
+ &
+ \\
+ \end{tabular}
+
+ \vfil\break
+}
+
+\makeatother
+% \end{macrocode}
+% \end{template}
+% \iffalse
+%</tests>
+% \fi
+%
+%
+%
+% \MaybeStop{%
+% \PrintChanges
+% \PrintIndex
+% }
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*doc>
+\RequirePackage{svn-prov}
+\def\GetFileBaseName#1-#2\nil{#1}
+\edef\MyFileBaseName{\expandafter\GetFileBaseName\jobname\nil}
+\ProvidesFileSVN[\MyFileBaseName doc]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo]
+\DefineFileInfoSVN
+\AddToHook{begindocument}{\OnlyDescription}
+\input{\MyFileBaseName.dtx}
+%</doc>
+% \fi
+% \iffalse
+%<*doc-code>
+\RequirePackage{svn-prov}
+\def\GetFileBaseName#1-#2\nil{#1}
+\edef\MyFileBaseName{\expandafter\GetFileBaseName\jobname\nil}
+\ProvidesFileSVN[\MyFileBaseName code]{$Id: fontscripts.dtx 10771 2025-02-05 22:55:06Z cfrees $}[v0.0 \revinfo]
+\DefineFileInfoSVN
+\input{\MyFileBaseName.dtx}
+%</doc-code>
+% \fi
+%
+%
% \subsection{Script Fragments}\label{subsec:lua}
%
% These are not standalone scripts, but files to be read by \texttt{l3build} to provide additional and/or divergent functions.
% Note that several are based on LPPL files not on \ctan{}, as the \LaTeX{} Project does not package their build scripts.
%
-% \textbf{These script fragments were not written for general use and will \MakeUppercase{certainly fail} if not adapted to your build environment.}
%
-% \subsubsection{fontinst.lua}\label{subsubsec:fontinst-lua}
+% \subsubsection{fntbuild.lua}\label{subsubsec:fntbuild-lua}
%
-% \begin{luafrag}{fontinst.lua}
+% \begin{luafrag}{fntbuild.lua}
% Use \texttt{dofile()} in \file{build.lua} to add to \lpack{l3build}.
-% \newcommand*\FancyVerbStopString{ntarg = "fnttarg"}
-% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true,firstline=12]{fontinst.lua}
-% \newcommand*\FancyVerbStartString{nifergwall = 0}
-% \begin{target}{fnttarg}
-% Create fonts.
-% Default assumes \lpack{fontinst}.
-% Redefine element in target list for alternative tools.
-% For example, \lpack{berenisadf}'s \texttt{build.lua} redefines it to use \textsc{gnu} \texttt{make}, \textsc{FontForge} etc.
-% \renewcommand*\FancyVerbStopString{utarg = "uniquifyencs"}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{target}
-% \begin{target}{uniquifyencs}
-% To ensure unique encodings without rebuilding fonts.
-% \renewcommand*\FancyVerbStartString{ntarg = "fnttarg"}
-% \renewcommand*\FancyVerbStopString{function gwall (msg,file,rtn)}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{target}
-% \renewcommand*\FancyVerbStartString{utarg = "uniquifyencs"}
-% \renewcommand*\FancyVerbStopString{function finst (patt,dir,mode)}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \begin{luafunction}{finst()}
-% Is to \texttt{finst} what \texttt{fontinst} is to \texttt{fontinst}.
-% \renewcommand*\FancyVerbStartString{utarg = "uniquifyencs"}
-% \renewcommand*\FancyVerbStopString{function fntkeeper ()}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=38]{fontinst.lua}
-% \end{luafunction}
-% \begin{luafunction}{fntkeeper()}
-% Keep fonts between \texttt{l3build} runs unless \texttt{fnttarg} explicitly called.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=52,lastline=102]{fontinst.lua}
-% \end{luafunction}
-% \begin{luafunction}{uniquify()}
-% Ensure encoding names are unique.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=105,lastline=222]{fontinst.lua}
-% \end{luafunction}
-% \begin{luafunction}{fontinst()}
-% Configured for \lpack{fontinst}.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=223,lastline=321]{fontinst.lua}
-% \end{luafunction}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=322,lastline=323]{fontinst.lua}
-% \begin{luafunction}{fnt_test()}
-% Assumes a suitable template is available for testing.
-% \renewcommand*\FancyVerbStartString{-- fnt_test}
-% \renewcommand*\FancyVerbStopString{-- checkinit_hook}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{luafunction}
-% \begin{luafunction}{checkinit_hook()}
-% Redefinition of standard \lpack{l3build} function.
-% \renewcommand*\FancyVerbStartString{-- checkinit_hook}
-% \renewcommand*\FancyVerbStopString{-- doc_init}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{luafunction}
-% \begin{luafunction}{docinit_hook()}
-% Redefinition of standard \lpack{l3build} function.
-% \renewcommand*\FancyVerbStartString{-- doc_init}
-% \renewcommand*\FancyVerbStopString{-- fontinst must be specified first}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{luafunction}
-% \begin{target}{fnttarg}
-% Main target definition.
-% \renewcommand*\FancyVerbStartString{-- ntarg}
-% \renewcommand*\FancyVerbStopString{-- utarg}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,]{fontinst.lua}
-% \end{target}
-% \begin{target}{uniquifyencs}
-% Secondary target.
-% It is not normally necessary to invoke this target separately if using the default definition of \texttt{fnttarg}.
-% \renewcommand*\FancyVerbStartString{-- utarg}
-% \renewcommand*\FancyVerbStopString{-- diwedd targets}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true]{fontinst.lua}
-% \end{target}
-% \begin{luavariable}{autotestfds}
-% \texttt{fd} files to use when auto-generating build tests.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=631,lastline=631]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=633,lastline=634]{fontinst.lua}
-% \begin{luavariable}{binmakers}
-% Scripts to create binary \texttt{tfm} and/or \texttt{vf} from \texttt{pl} and/or \texttt{vpl}.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=635,lastline=635]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=638,lastline=644]{fontinst.lua}
-% \begin{luavariable}{familymakers}
-% Files to compile to generate font definition files, human-readable metrics etc.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=645,lastline=645]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,lastline=646,firstline=647]{fontinst.lua}
-% \begin{luavariable}{fnttestfds}
-% Font definition files to use when auto-generating tests.
-% May be either a table of globs or a table of tables of package names and lists of globs.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,lastline=648,firstline=648]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,lastline=652,firstline=650]{fontinst.lua}
-% \begin{luavariable}{keepdir,keeptempdir}
-% Directories to stash generated font files and intermediate build products.
-% These should \textbf{not} be subdirectories of \texttt{builddir}.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=653,lastline=654]{fontinst.lua}
-% \end{luavariable}
-% \begin{luavariable}{keepfiles,keeptempfiles}
-% Globs for generated font files and intermediate build products to stash in \path{keepdir} and \path{keeptempdir} respectively.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=655,lastline=656]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=657,lastline=657]{fontinst.lua}
-% \begin{luavariable}{mapmakers}
-% Files to compile to generate map file fragments.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=658,lastline=658]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=659,lastline=662]{fontinst.lua}
-% \begin{luavariable}{vendor}
-% Vendor directory when installing.
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=663,lastline=664]{fontinst.lua}
-% \end{luavariable}
-% \VerbatimInput[gobble=0,numbers=left,firstnumber=last,numberblanklines=true,firstline=665]{fontinst.lua}
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild.lua}
% \end{luafrag}
%
-% \subsubsection{fnt-ctan.lua}\label{subsubsec:fnt-ctan-lua}
+% \changes{v0.2}{2025-01-25}{Split most of \texttt{fntbuild.lua} into other files, similar to the existing \texttt{fntbuild-ctan.lua}.}
+% \subsubsection{fntbuild-build.lua}\label{subsubsec:fntbuild-build-lua}
%
-% \begin{luafrag}{fnt-ctan.lua}
-% Included by \file{fontinst.lua} if it exists in \texttt{maindir}.
+% \begin{luafrag}{fntbuild-build.lua}
+% Included by \file{fntbuild.lua}.
+% Functions used when building fonts for \texttt{fnttarg}.
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-build.lua}
+% \end{luafrag}
+%
+% \subsubsection{fntbuild-check.lua}\label{subsubsec:fntbuild-check-lua}
+%
+% \begin{luafrag}{fntbuild-check.lua}
+% Included by \file{fntbuild.lua}.
+% Configures \pkg{l3build} hook to auto-generate (additional) test files if templates are provided.
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-check.lua}
+% \end{luafrag}
+%
+% \subsubsection{fntbuild-ctan.lua}\label{subsubsec:fntbuild-ctan-lua}
+%
+% \begin{luafrag}{fntbuild-ctan.lua}
+% Included by \file{fntbuild.lua}.
% Changes the way the \texttt{ctan} target builds the archive to match \ctan{} requirements for font distributions.
-% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true,firstline=2,lastline=8,firstnumber=last]{fnt-ctan.lua}
-% \begin{luafunction}{extname()}
-% Get extension from filename.
-% \newcommand*\FancyVerbStartString{-- extname(filename)}
-% \newcommand*\FancyVerbStopString{-- copysubctan(files,srcdir,targdir)}
-% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true,firstnumber=last]{fnt-ctan.lua}
-% \end{luafunction}
-% \begin{luafunction}{copysubctan()}
-% Sub-directories for \ctan.
-% \newcommand*\FancyVerbStartString{-- copysubctan(files,srcdir,targdir)}
-% \newcommand*\FancyVerbStopString{-- copyctan()}
-% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true,firstnumber=last]{fnt-ctan.lua}
-% \end{luafunction}
-% \begin{luafunction}{copyctan()}
-% Redefine function used by \texttt{ctan}.
-% \newcommand*\FancyVerbStartString{-- copyctan()}
-% \newcommand*\FancyVerbStopString{-- end copyctan()}
-% \VerbatimInput[gobble=0,numbers=left,numberblanklines=true,firstnumber=last]{fnt-ctan.lua}
-% \end{luafunction}
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-ctan.lua}
% \end{luafrag}
%
-% \subsubsection{tag.lua}\label{subsubsec:tag-lua}
+% \subsubsection{fntbuild-doc.lua}\label{subsubsec:fntbuild-doc-lua}
%
-% This is just a copy of the function from \file{l3build-tagging.lua}.
-% It is here because \file{fontinst.lua} calls a file containing a custom \file{tag.lua} file locally\footnote{%
-% This file is on \github{} for the morbidly curious, along with at least three attempts to create a \file{manifest.txt}.%
-% }.
-% For an example of how to do this, see the \file{build-config.lua} file for \LaTeXe{}.
-%
-% \iffalse
-%<*tag>
-% \fi
-% \begin{luafrag}{tag.lua}
-% \begin{macrocode}
-function update_tag(filename,content,tagname,tagdate)
- return content
-end
-% \end{macrocode}
-% \end{luafrag}
-% \iffalse
-%</tag>
-% \fi
+% \begin{luafrag}{fntbuild-doc.lua}
+% Included by \file{fntbuild.lua}.
+% Configures \pkg{l3build}'s documentation hook to produce template-based documentation supplement e.g.~for auto-generating font tables.
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-doc.lua}
+% \end{luafrag}
%
+% \subsubsection{fntbuild-utils.lua}\label{subsubsec:fntbuild-utils-lua}
%
+% \begin{luafrag}{fntbuild-utils.lua}
+% Included by \file{fntbuild.lua}.
+% Internal functions used in various places.
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-utils.lua}
+% \end{luafrag}
%
+% \subsubsection{fntbuild-vars.lua}\label{subsubsec:fntbuild-vars-lua}
%
+% \begin{luafrag}{fntbuild-vars.lua}
+% Included by \file{fntbuild.lua}.
+% Additional variables and changes to default values of existing \pkg{l3build} variables.
+% These may be overridden in \file{fntbuild-config.lua} and/or \file{build.lua}.
+% \VerbatimInput[gobble=0,numbers=left]{fntbuild-vars.lua}
+% \end{luafrag}
+%
+%
% \subsection{Metrics}\label{subsec:mtx}
%
% These files influence the characters which end up in the \TeX{} fonts.
@@ -943,6 +1479,7 @@
% \fi
% \begin{metrics}{newlatin-dotsc.mtx}
% based on \file{newlatin.mtx} - because I couldn't figure out how to pass options...
+% \changes{v0.2}{2025-01-25}{Re-remove load of \file{lsfake}.}
% \begin{macrocode}
\relax
@@ -959,7 +1496,6 @@
\ifoption{nosc}\then \Else
\usemtxpackage{dotscbuild}
-% \usemtxpackage{lsfake}
\usemtxpackage{dotscmisc}
\Fi
@@ -1020,6 +1556,7 @@
%<*dotscmisc>
% \fi
% \begin{metrics}{dotscmisc.mtx}
+% \changes{v0.2}{2025-01-25}{Re-remove spurious kerning adjustments for triple ligatures.}
% \begin{macrocode}
\relax
@@ -1066,7 +1603,6 @@
\glyph{i.sc}{1000}
\endsetglyph
-% \setleftkerning{fi.sc}{f.sc}{1000}
\setrightkerning{fi.sc}{i.sc}{1000}
\setglyph{f_i.sc}
@@ -1085,7 +1621,6 @@
\endsetglyph
\setrightkerning{f_f_i.sc}{ffi.sc}{1000}
-% \setleftkerning{ffi.sc}{f.sc}{1000}
\setrightkerning{ffi.sc}{i.sc}{1000}
\fi
@@ -1096,7 +1631,6 @@
\glyph{l.sc}{1000}
\endsetglyph
-% \setleftkerning{fl.sc}{f.sc}{1000}
\setrightkerning{fl.sc}{l.sc}{1000}
\setglyph{f_l.sc}
@@ -1110,7 +1644,6 @@
\glyph{l.sc}{1000}
\endsetglyph
-% \setleftkerning{ffl.sc}{f.sc}{1000}
\setrightkerning{ffl.sc}{l.sc}{1000}
\setglyph{f_f_l.sc}
@@ -1128,7 +1661,6 @@
\movert{\add{\kerning{i.sc}{j.sc}}{\int{smallcapsspacing}}}
\glyph{j.sc}{1000}
\endsetglyph
-% \setleftkerning{ij.sc}{i.sc}{1000}
\setrightkerning{ij.sc}{j.sc}{1000}
\fi
@@ -1155,6 +1687,36 @@
%</dotscmisc>
% \fi
%
+% \subsubsection{unfakable.mtx}\label{subsubsec:unfakable}
+%
+% This metrics file prevents \pkg{fontinst} from inserting ‘gravestones’ into virtual fonts when a glyph is missing.
+% \textbf{It should be used only for the \texttt{TS1}.
+% It should NOT be used when using the \texttt{T1} encoding.}
+%
+% \iffalse
+%<*unfakable>
+% \fi
+% \begin{metrics}{unfakable.mtx}
+% \begin{macrocode}
+\relax
+\metrics
+
+\ProvidesMtxPackage{unfakable}
+
+\setcommand\unfakableaccent#1{%
+ \message{Missing glyph `#1'}%
+}
+\setcommand\unfakable#1{%
+ \message{Missing glyph `#1'}%
+}
+
+\endmetrics
+% \end{macrocode}
+% \end{metrics}
+% \iffalse
+%</unfakable>
+% \fi
+%
%
% \subsection{Encodings}\label{subsec:etx}
%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.ins
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.ins 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/fontscripts.ins 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,7 +1,7 @@
-% $Id: fontscripts.ins 10383 2024-09-25 15:45:11Z cfrees $
+% $Id: fontscripts.ins 10763 2025-02-04 20:28:32Z cfrees $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% fontscripts.ins
-%% Additions and changes Copyright (C) -2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
%% Code from skeleton.ins Copyright (C) 2015-2024 Scott Pakin (see below).
%%
%% This work may be distributed and/or modified under the
@@ -114,10 +114,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
\endgroup
-\def\targDates{2024}
+\def\targDates{2024-2025}
\expandafter\declarepreamble\expandafter\safonol\mkpreamble
\endpreamble
-\def\targDates{2008-2024}
+\expandafter\declarepreamble\expandafter\safonolmtx\mkpreamble
+\endpreamble
+\def\targDates{2008-2025}
\expandafter\declarepreamble\expandafter\safonolenc\mkpreamble
\endpreamble
\def\targType{The encoding }
@@ -127,13 +129,13 @@
\def\baseDates{2002}
\expandafter\declarepreamble\expandafter\derpreamblefi\mkderpreamble
\endpreamble
-\def\targDates{2024}
+\def\targDates{2024-2025}
\expandafter\declarepreamble\expandafter\derpreamblefin\mkderpreamble
\endpreamble
\def\baseFileName{ts1.etx}
\expandafter\declarepreamble\expandafter\derpreamblefintc\mkderpreamble
\endpreamble
-\def\targDates{2008-2024}
+\def\targDates{2008-2025}
\expandafter\declarepreamble\expandafter\derpreamblefitc\mkderpreamble
\endpreamble
\def\targType{The metrics file }
@@ -152,7 +154,13 @@
\usepreamble\safonol
\generate{%
+ \file{fontscripts-doc.tex}{\from{fontscripts.dtx}{doc}}
+ \file{fontscripts-code.tex}{\from{fontscripts.dtx}{doc-code}}
\file{fnt-tables.tex}{\from{fontscripts.dtx}{tables}}
+ \file{fnt-tests.tex}{\from{fontscripts.dtx}{tests}}
+ \file{fnt-test.lvt}{\from{fontscripts.dtx}{lvt}}
+ \usepreamble\safonolmtx
+ \file{unfakable.mtx}{\from{fontscripts.dtx}{unfakable}}
\usepreamble\safonolenc
\file{dotoldstyle.etx}{\from{fontscripts.dtx}{dotoldstyle}}
\file{dotsc2.etx}{\from{fontscripts.dtx}{dotsc2}}
@@ -195,7 +203,7 @@
\def \baseFileName{}
\def \basePkgName{l3build}
\def \baseDates{2014-2024}
-\def \targDates{2024}
+\def \targDates{2024-2025}
\def \basePkgAu{The LaTeX Project Team}
\def \targType{The file }
\def \preChanges{- almost all content is deleted.}
@@ -202,7 +210,7 @@
\declarepreamble\safonol
-------------------------------------------------
-Copyright (C) 2024 Clea F. Rees.
+Copyright (C) 2024-2025 Clea F. Rees.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
@@ -224,43 +232,43 @@
-------------------------------------------------
\endpreamble
-\declarepreamble\tagpreamble
--------------------------------------------------
-Additions and changes Copyright (C) 2024 Clea F. Rees.
-Code from \basePkgName Copyright (C) \baseDates \basePkgAu (see below)
+% \declarepreamble\tagpreamble
+% -------------------------------------------------
+% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
+% Code from \basePkgName Copyright (C) \baseDates \basePkgAu (see below)
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3c
-of this license or (at your option) any later version.
-The latest version of this license is in
- https://www.latex-project.org/lppl.txt
-and version 1.3c or later is part of all distributions of LaTeX
-version 2008-05-04 or later.
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
-This work has the LPPL maintenance status `maintained'.
+% This work has the LPPL maintenance status `maintained'.
-The Current Maintainer of this work is Clea F. Rees.
+% The Current Maintainer of this work is Clea F. Rees.
-This work consists of all files listed in manifest.txt.
+% This work consists of all files listed in manifest.txt.
-\targType\outFileName is a derived work under the terms of the
-LPPL. The original file, \baseFileName, is supplied with \basePkgName. A copy
-of \basePkgName including an unmodified copy of \baseFileName is available from
-https://www.ctan.org/pkg/\basePkgName.
-The main modifications made to this file are as follows:
-\preChanges
--------------------------------------------------
-\endpreamble
+% \targType\outFileName is a derived work under the terms of the
+% LPPL. The original file, \baseFileName, is supplied with \basePkgName. A copy
+% of \basePkgName including an unmodified copy of \baseFileName is available from
+% https://www.ctan.org/pkg/\basePkgName.
+% The main modifications made to this file are as follows:
+% \preChanges
+% -------------------------------------------------
+% \endpreamble
-\generate{%
+% \generate{%
% \usepreamble\safonol
% \nopostamble
- % \file{fontinst.lua}{\from{fontscripts.dtx}{fontinst}}
- \askforoverwritetrue
- \usepreamble\tagpreamble
+ % \file{fntbuild.lua}{\from{fontscripts.dtx}{fontinst}}
+ % \askforoverwritetrue
+ % \usepreamble\tagpreamble
% I really seriously doubt this should have a copyright notice at all
- \file{tag.lua}{\from{fontscripts.dtx}{tag}}
-}
+ % \file{tag.lua}{\from{fontscripts.dtx}{tag}}
+% }
\endbatchfile
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/lining.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/lining.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/lining.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `lining')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/newlatin-dotsc.mtx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/newlatin-dotsc.mtx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/newlatin-dotsc.mtx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `newlatin-dotsc')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/oldstyle.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/oldstyle.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/oldstyle.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `oldstyle')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-cfr.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-cfr.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-cfr.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-cfr')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotalt-f_f.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotalt-f_f.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotalt-f_f.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-dotalt-f-f')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinf.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinf.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinf.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-dotinf')
%%
-%% Additions and changes Copyright (C) 2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinferior.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinferior.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotinferior.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-dotinferior')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsup.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsup.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsup.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-dotsup')
%%
-%% Additions and changes Copyright (C) 2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsuperior.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsuperior.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-dotsuperior.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-dotsuperior')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1-f_f.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1-f_f.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1-f_f.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1-f-f')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/t1j-f_f.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/t1j-f_f.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/t1j-f_f.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `t1j-f-f')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Deleted: trunk/Master/texmf-dist/source/fonts/fontscripts/tag.lua
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/tag.lua 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/tag.lua 2025-02-06 20:43:49 UTC (rev 73751)
@@ -1,40 +0,0 @@
---
--- This is file `tag.lua',
--- generated with the docstrip utility.
---
--- The original source files were:
---
--- fontscripts.dtx (with options: `tag')
--- -------------------------------------------------
--- Additions and changes Copyright (C) 2024 Clea F. Rees.
--- Code from l3build Copyright (C) 2014-2024 The LaTeX Project Team (see below)
---
--- This work may be distributed and/or modified under the
--- conditions of the LaTeX Project Public License, either version 1.3c
--- of this license or (at your option) any later version.
--- The latest version of this license is in
--- https://www.latex-project.org/lppl.txt
--- and version 1.3c or later is part of all distributions of LaTeX
--- version 2008-05-04 or later.
---
--- This work has the LPPL maintenance status `maintained'.
---
--- The Current Maintainer of this work is Clea F. Rees.
---
--- This work consists of all files listed in manifest.txt.
---
--- The file tag.lua is a derived work under the terms of the
--- LPPL. The original file, , is supplied with l3build. A copy
--- of l3build including an unmodified copy of is available from
--- https://www.ctan.org/pkg/l3build.
--- The main modifications made to this file are as follows:
--- - almost all content is deleted.
--- -------------------------------------------------
---%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
---%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-function update_tag(filename,content,tagname,tagdate)
- return content
-end
-\endinput
-%%
-%% End of file `tag.lua'.
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotinf.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotinf.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotinf.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `ts1-dotinf')
%%
-%% Additions and changes Copyright (C) 2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotsup.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotsup.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-dotsup.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `ts1-dotsup')
%%
-%% Additions and changes Copyright (C) 2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2024-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-euro.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-euro.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/ts1-euro.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `ts1-euro')
%%
-%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees.
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below)
%%
Modified: trunk/Master/texmf-dist/source/fonts/fontscripts/ucdotalt.etx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/ucdotalt.etx 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/ucdotalt.etx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -6,7 +6,7 @@
%%
%% fontscripts.dtx (with options: `ucdotalt')
%%
-%% Copyright (C) 2008-2024 Clea F. Rees.
+%% Copyright (C) 2008-2025 Clea F. Rees.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Added: trunk/Master/texmf-dist/source/fonts/fontscripts/unfakable.mtx
===================================================================
--- trunk/Master/texmf-dist/source/fonts/fontscripts/unfakable.mtx (rev 0)
+++ trunk/Master/texmf-dist/source/fonts/fontscripts/unfakable.mtx 2025-02-06 20:43:49 UTC (rev 73751)
@@ -0,0 +1,46 @@
+%%
+%% This is file `unfakable.mtx',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontscripts.dtx (with options: `unfakable')
+%%
+%% Copyright (C) 2024-2025 Clea F. Rees.
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This file may only be distributed together with a copy of the package
+%% fontscripts. You may however distribute the package fontscripts without
+%% such generated files.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\relax
+\metrics
+
+\ProvidesMtxPackage{unfakable}
+
+\setcommand\unfakableaccent#1{%
+ \message{Missing glyph `#1'}%
+}
+\setcommand\unfakable#1{%
+ \message{Missing glyph `#1'}%
+}
+
+\endmetrics
+\endinput
+%%
+%% End of file `unfakable.mtx'.
Property changes on: trunk/Master/texmf-dist/source/fonts/fontscripts/unfakable.mtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2025-02-06 20:42:26 UTC (rev 73750)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2025-02-06 20:43:49 UTC (rev 73751)
@@ -3131,7 +3131,7 @@
'feynmf', 'feynmf\.pl|' . $standardsource,
'findhyph', 'NULL', # leave makefile
'fmtcount', 'fmtcount.perl|' . $standardsource,
- 'fontscripts', '\.(lua|tex)$|' . $standardsource, # pdf/README in doc
+ 'fontscripts', '\.(lua|tex|lvt)$|' . $standardsource, # pdf/README in doc
'fpl', 'Add|\.p[es]|' . $standardsource,
'fullblck', '\.asc|' . $standardsource,
'grverb', '\.vpl|' . $standardsource,
More information about the tex-live-commits
mailing list.