diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-02-14 07:07:53 +0100 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-02-14 07:07:53 +0100 |
commit | c026306b593d7308767f585028b17340fc6b6895 (patch) | |
tree | ae234cfa30819a64592d2940ebf4a20749499094 | |
parent | be8583e2762df3f132f07d61c574688f2c1fdbf0 (diff) | |
parent | abffcf7c6f9cb45ac0ceb4380a1b8a05c0327c84 (diff) | |
download | luaotfload-c026306b593d7308767f585028b17340fc6b6895.tar.gz |
Merge pull request #197 from phi-gamma/texlive2014
source tree structure
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 48 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | misc/luaotfload-blacklist.cnf (renamed from luaotfload-blacklist.cnf) | 0 | ||||
-rwxr-xr-x | scripts/mkglyphlist | 2 | ||||
-rwxr-xr-x | scripts/mkstatus | 52 | ||||
-rw-r--r-- | src/luaotfload-auxiliary.lua (renamed from luaotfload-auxiliary.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-basics-gen.lua (renamed from luaotfload-basics-gen.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-basics-nod.lua (renamed from luaotfload-basics-nod.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-colors.lua (renamed from luaotfload-colors.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-database.lua (renamed from luaotfload-database.lua) | 28 | ||||
-rw-r--r-- | src/luaotfload-diagnostics.lua (renamed from luaotfload-diagnostics.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-features.lua (renamed from luaotfload-features.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fontloader.lua (renamed from luaotfload-fontloader.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-cbk.lua (renamed from luaotfload-fonts-cbk.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-def.lua (renamed from luaotfload-fonts-def.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-enc.lua (renamed from luaotfload-fonts-enc.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-ext.lua (renamed from luaotfload-fonts-ext.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-inj.lua (renamed from luaotfload-fonts-inj.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-lua.lua (renamed from luaotfload-fonts-lua.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-otn.lua (renamed from luaotfload-fonts-otn.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-fonts-tfm.lua (renamed from luaotfload-fonts-tfm.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-letterspace.lua (renamed from luaotfload-letterspace.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-loaders.lua (renamed from luaotfload-loaders.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-log.lua (renamed from luaotfload-log.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-main.lua (renamed from luaotfload-main.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-override.lua (renamed from luaotfload-override.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload-parsers.lua (renamed from luaotfload-parsers.lua) | 0 | ||||
-rwxr-xr-x | src/luaotfload-tool.lua (renamed from luaotfload-tool.lua) | 0 | ||||
-rw-r--r-- | src/luaotfload.sty (renamed from luaotfload.sty) | 0 |
30 files changed, 68 insertions, 66 deletions
@@ -39,3 +39,5 @@ tests/*.ovf tests/*.sty tests/luaotfload* +# temporary directory +tmp/* @@ -1,11 +1,15 @@ # Makefile for luaotfload NAME = luaotfload -LUAOTFLOAD = $(wildcard luaotfload-*.lua) luaotfload-blacklist.cnf DOCSRCDIR = ./doc SCRIPTSRCDIR = ./scripts +SRCSRCDIR = ./src BUILDDIR = ./build +MISCDIR = ./misc + +SRC = $(wildcard $(SRCSRCDIR)/luaotfload-*.lua) +SRC = $(MISCDIR)/luaotfload-blacklist.cnf GLYPHSCRIPT = $(SCRIPTSRCDIR)/mkglyphlist CHARSCRIPT = $(SCRIPTSRCDIR)/mkcharacters @@ -15,17 +19,17 @@ GLYPHSOURCE = $(BUILDDIR)/glyphlist.txt RESOURCESCRIPTS = $(GLYPHSCRIPT) $(CHARSCRIPT) $(STATUSSCRIPT) -SCRIPTNAME = luaotfload-tool -SCRIPT = $(SCRIPTNAME).lua +TOOLNAME = luaotfload-tool +TOOL = $(SRCSRCDIR)/$(TOOLNAME).lua GRAPH = filegraph DOCSRC = $(DOCSRCDIR)/$(NAME).dtx GRAPHSRC = $(DOCSRCDIR)/$(GRAPH).dot -MANSRC = $(DOCSRCDIR)/$(SCRIPTNAME).rst +MANSRC = $(DOCSRCDIR)/$(TOOLNAME).rst DOCPDF = $(DOCSRCDIR)/$(NAME).pdf DOTPDF = $(DOCSRCDIR)/$(GRAPH).pdf -MANPAGE = $(DOCSRCDIR)/$(SCRIPTNAME).1 +MANPAGE = $(DOCSRCDIR)/$(TOOLNAME).1 DOCS = $(DOCPDF) $(DOTPDF) $(MANPAGE) @@ -34,21 +38,21 @@ GLYPHS = $(BUILDDIR)/$(NAME)-glyphlist.lua CHARS = $(BUILDDIR)/$(NAME)-characters.lua STATUS = $(BUILDDIR)/$(NAME)-status.lua RESOURCES = $(GLYPHS) $(CHARS) $(STATUS) -SOURCE = $(DOCSRC) $(MANSRC) $(LUAOTFLOAD) README Makefile NEWS $(RESOURCESCRIPTS) +SOURCE = $(DOCSRC) $(MANSRC) $(SRC) README Makefile NEWS $(RESOURCESCRIPTS) # Files grouped by installation location -SCRIPTSTATUS = $(SCRIPT) $(OLDSCRIPT) $(RESOURCESCRIPTS) -RUNSTATUS = $(filter-out $(SCRIPTSTATUS),$(LUAOTFLOAD)) +SCRIPTSTATUS = $(TOOL) $(RESOURCESCRIPTS) +RUNSTATUS = $(filter-out $(SCRIPTSTATUS),$(SRC)) DOCSTATUS = $(DOCPDF) $(DOTPDF) README NEWS MANSTATUS = $(MANPAGE) SRCSTATUS = $(DOCSRC) $(MANSRC) $(GRAPHSRC) Makefile # The following definitions should be equivalent # ALL_STATUS = $(RUNSTATUS) $(DOCSTATUS) $(SRCSTATUS) -ALL_STATUS = $(RESOURCES) $(SOURCE) +ALL_STATUS = $(RESOURCES) $(SOURCE) # Installation locations -FORMAT = luatex +FORMAT = luatex SCRIPTDIR = $(TEXMFROOT)/scripts/$(NAME) RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME) DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME) @@ -57,10 +61,10 @@ SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME) TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME) # CTAN-friendly subdirectory for packaging -DISTDIR = ./$(NAME) +DISTDIR = $(BUILDDIR)/$(NAME) -CTAN_ZIP = $(NAME).zip -TDS_ZIP = $(NAME).tds.zip +CTAN_ZIP = $(BUILDDIR)/$(NAME).zip +TDS_ZIP = $(BUILDDIR)/$(NAME).tds.zip ZIPS = $(CTAN_ZIP) $(TDS_ZIP) LUA = texlua @@ -74,9 +78,9 @@ DO_STATUS = $(LUA) $(STATUSSCRIPT) > /dev/null all: $(GENERATED) builddir: $(BUILDDIR) -resources: builddir $(RESOURCES) -chars: builddir $(CHARS) -status: builddir $(STATUS) +resources: $(RESOURCES) +chars: $(CHARS) +status: $(STATUS) ctan: $(CTAN_ZIP) tds: $(TDS_ZIP) world: all ctan @@ -95,13 +99,13 @@ $(DOCPDF): $(MANPAGE): @$(MAKE) -C $(DOCSRCDIR) manual -$(GLYPHS): /dev/null +$(GLYPHS): builddir $(DO_GLYPHS) -$(CHARS): /dev/null +$(CHARS): builddir $(DO_CHARS) -$(STATUS): /dev/null +$(STATUS): builddir $(DO_STATUS) $(BUILDDIR): /dev/null @@ -126,7 +130,7 @@ endef define run-install @mkdir -p $(SCRIPTDIR) && cp -- $(SCRIPTSTATUS) $(SCRIPTDIR) -@mkdir -p $(RUNDIR) && cp -- $(RUNSTATUS) $(RUNDIR) +@mkdir -p $(RUNDIR) && cp -- $(RUNSTATUS) $(RUNDIR) endef $(TDS_ZIP): TEXMFROOT=./tmp-texmf @@ -163,6 +167,6 @@ clean: mrproper: clean $(MAKE) -C $(DOCSRCDIR) $@ @$(RM) -- $(GENERATED) $(ZIPS) $(GLYPHSOURCE) - @$(RM) -r -- $(DISTDIR) $(BUILDDIR) + @$(RM) -r -- $(BUILDDIR) -# vim:set noexpandtab:tabstop=8:shiftwidth=2 +# vim:noexpandtab:tabstop=8:shiftwidth=2 @@ -8,6 +8,8 @@ Change History instead. * Remove luaotfload.lua from luaotfload.dtx; it is now a separate file luaotfload-main.lua. + * Standard source tree structure: the code is now located in the ./doc, + ./scripts, ./src, ./build, and ./misc directories. * Move the heavier LPEG parsers from luaotfload-features (syntax) and luaotfload-database (fontconfig) into the new file luaotfload-parsers.lua. diff --git a/luaotfload-blacklist.cnf b/misc/luaotfload-blacklist.cnf index e82669b..e82669b 100644 --- a/luaotfload-blacklist.cnf +++ b/misc/luaotfload-blacklist.cnf diff --git a/scripts/mkglyphlist b/scripts/mkglyphlist index e660a57..8fde098 100755 --- a/scripts/mkglyphlist +++ b/scripts/mkglyphlist @@ -146,7 +146,7 @@ local get_raw get_raw = function (retry) if glyphdata then local fh = io.open(glyphfile, "wb") if not fh then - print"error: glyph file not writable" + print (string.format ("error: glyph file (%s) not writable", glyphfile)) os.exit(-1) end fh:write(glyphdata) diff --git a/scripts/mkstatus b/scripts/mkstatus index fcf8b24..15cb97c 100755 --- a/scripts/mkstatus +++ b/scripts/mkstatus @@ -36,32 +36,32 @@ local filelist = "./build/luaotfload-status.lua" --- result local names = { --- only the runtime files and scripts - "luaotfload-auxiliary.lua", - "luaotfload-basics-gen.lua", - "luaotfload-basics-nod.lua", - { "build", "luaotfload-characters.lua", }, - "luaotfload-colors.lua", - "luaotfload-database.lua", - "luaotfload-diagnostics.lua", - "luaotfload-features.lua", - "luaotfload-fonts-cbk.lua", - "luaotfload-fonts-def.lua", - "luaotfload-fonts-enc.lua", - "luaotfload-fonts-ext.lua", - "luaotfload-fonts-lua.lua", - "luaotfload-fonts-tfm.lua", - { "build", "luaotfload-glyphlist.lua", }, - "luaotfload-letterspace.lua", - "luaotfload-loaders.lua", - "luaotfload-log.lua", - "luaotfload-main.lua", - "luaotfload-fontloader.lua", - "luaotfload-override.lua", - "luaotfload-parsers.lua", - "luaotfload-tool.lua", - { "scripts", "mkcharacters", }, - { "scripts", "mkglyphlist", }, - { "scripts", "mkstatus", }, + { "src", "luaotfload-auxiliary.lua", }, + { "src", "luaotfload-basics-gen.lua", }, + { "src", "luaotfload-basics-nod.lua", }, + { "build", "luaotfload-characters.lua", }, + { "src", "luaotfload-colors.lua", }, + { "src", "luaotfload-database.lua", }, + { "src", "luaotfload-diagnostics.lua", }, + { "src", "luaotfload-features.lua", }, + { "src", "luaotfload-fonts-cbk.lua", }, + { "src", "luaotfload-fonts-def.lua", }, + { "src", "luaotfload-fonts-enc.lua", }, + { "src", "luaotfload-fonts-ext.lua", }, + { "src", "luaotfload-fonts-lua.lua", }, + { "src", "luaotfload-fonts-tfm.lua", }, + { "build", "luaotfload-glyphlist.lua", }, + { "src", "luaotfload-letterspace.lua", }, + { "src", "luaotfload-loaders.lua", }, + { "src", "luaotfload-log.lua", }, + { "src", "luaotfload-main.lua", }, + { "src", "luaotfload-fontloader.lua", }, + { "src", "luaotfload-override.lua", }, + { "src", "luaotfload-parsers.lua", }, + { "src", "luaotfload-tool.lua", }, + { "scripts", "mkcharacters", }, + { "scripts", "mkglyphlist", }, + { "scripts", "mkstatus", }, } ----------------------------------------------------------------------- diff --git a/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua index 716af98..716af98 100644 --- a/luaotfload-auxiliary.lua +++ b/src/luaotfload-auxiliary.lua diff --git a/luaotfload-basics-gen.lua b/src/luaotfload-basics-gen.lua index 9cf5b93..9cf5b93 100644 --- a/luaotfload-basics-gen.lua +++ b/src/luaotfload-basics-gen.lua diff --git a/luaotfload-basics-nod.lua b/src/luaotfload-basics-nod.lua index 50a1e86..50a1e86 100644 --- a/luaotfload-basics-nod.lua +++ b/src/luaotfload-basics-nod.lua diff --git a/luaotfload-colors.lua b/src/luaotfload-colors.lua index d999df6..d999df6 100644 --- a/luaotfload-colors.lua +++ b/src/luaotfload-colors.lua diff --git a/luaotfload-database.lua b/src/luaotfload-database.lua index a3f3718..4b2d201 100644 --- a/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -76,6 +76,7 @@ local lfscurrentdir = lfs.currentdir local lfsdir = lfs.dir local mathabs = math.abs local mathmin = math.min +local osgetenv = os.getenv local osgettimeofday = os.gettimeofday local osremove = os.remove local stringfind = string.find @@ -164,7 +165,7 @@ end if not luaotfloadconfig.termwidth then local tw = 79 if not ( os.type == "windows" --- Assume broken terminal. - or os.getenv "TERM" == "dumb") + or osgetenv "TERM" == "dumb") then local p = iopopen "tput cols" if p then @@ -802,29 +803,20 @@ We’ll just store successful name: lookups in a separate cache file. type lookup_cache = (string, (string * num)) dict -Complete, needs testing: - × 1) add cache to dbobj - × 2) wrap lookups in cached versions - × 3) make caching optional (via the config table) for debugging - × 4) make names_update() cache aware (nil if “force”) - × 5) add logging - × 6) add cache control to luaotfload-tool - × 7) incr db version (now 2.203) - × 8) save cache only at the end of a run - -The spec is modified in place (ugh), so we’ll have to catalogue what -fields actually influence its behavior. +The spec is expected to be modified in place (ugh), so we’ll have to +catalogue what fields actually influence its behavior. Idk what the “spec” resolver is for. lookup inspects modifies + ---------- ----------------- --------------------------- file: name forced, name - name:* name, style, sub, resolved, sub, name, forced + name:[*] name, style, sub, resolved, sub, name, forced optsize, size spec: name, sub resolved, sub, name, forced -* name: contains both the name resolver from luatex-fonts and - resolve_name() below +[*] name: contains both the name resolver from luatex-fonts and + resolve_name() below From my reading of font-def.lua, what a resolver does is basically rewrite the “name” field of the specification record @@ -2278,10 +2270,12 @@ end local path_separator = ostype == "windows" and ";" or ":" --[[doc-- + scan_texmf_fonts() scans all fonts in the texmf tree through the kpathsea variables OPENTYPEFONTS and TTFONTS of texmf.cnf. The current working directory comes as “.” (texlive) or absolute path (miktex) and will always be filtered out. + --doc]]-- --- dbobj -> dbobj -> bool? -> (int * int) @@ -2337,7 +2331,7 @@ local function get_os_dirs () "/Network/Library/Fonts", } elseif os.type == "windows" or os.type == "msdos" then - local windir = os.getenv("WINDIR") + local windir = osgetenv("WINDIR") return { filejoin(windir, 'Fonts') } else local fonts_conves = { --- plural, much? diff --git a/luaotfload-diagnostics.lua b/src/luaotfload-diagnostics.lua index 67119de..67119de 100644 --- a/luaotfload-diagnostics.lua +++ b/src/luaotfload-diagnostics.lua diff --git a/luaotfload-features.lua b/src/luaotfload-features.lua index 4237d71..4237d71 100644 --- a/luaotfload-features.lua +++ b/src/luaotfload-features.lua diff --git a/luaotfload-fontloader.lua b/src/luaotfload-fontloader.lua index 8c31750..8c31750 100644 --- a/luaotfload-fontloader.lua +++ b/src/luaotfload-fontloader.lua diff --git a/luaotfload-fonts-cbk.lua b/src/luaotfload-fonts-cbk.lua index 9db94f6..9db94f6 100644 --- a/luaotfload-fonts-cbk.lua +++ b/src/luaotfload-fonts-cbk.lua diff --git a/luaotfload-fonts-def.lua b/src/luaotfload-fonts-def.lua index 0c2f0db..0c2f0db 100644 --- a/luaotfload-fonts-def.lua +++ b/src/luaotfload-fonts-def.lua diff --git a/luaotfload-fonts-enc.lua b/src/luaotfload-fonts-enc.lua index e20c3a0..e20c3a0 100644 --- a/luaotfload-fonts-enc.lua +++ b/src/luaotfload-fonts-enc.lua diff --git a/luaotfload-fonts-ext.lua b/src/luaotfload-fonts-ext.lua index b60d045..b60d045 100644 --- a/luaotfload-fonts-ext.lua +++ b/src/luaotfload-fonts-ext.lua diff --git a/luaotfload-fonts-inj.lua b/src/luaotfload-fonts-inj.lua index ae48150..ae48150 100644 --- a/luaotfload-fonts-inj.lua +++ b/src/luaotfload-fonts-inj.lua diff --git a/luaotfload-fonts-lua.lua b/src/luaotfload-fonts-lua.lua index ec3fe38..ec3fe38 100644 --- a/luaotfload-fonts-lua.lua +++ b/src/luaotfload-fonts-lua.lua diff --git a/luaotfload-fonts-otn.lua b/src/luaotfload-fonts-otn.lua index c57be5f..c57be5f 100644 --- a/luaotfload-fonts-otn.lua +++ b/src/luaotfload-fonts-otn.lua diff --git a/luaotfload-fonts-tfm.lua b/src/luaotfload-fonts-tfm.lua index b9bb1bd..b9bb1bd 100644 --- a/luaotfload-fonts-tfm.lua +++ b/src/luaotfload-fonts-tfm.lua diff --git a/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua index 20f29f5..20f29f5 100644 --- a/luaotfload-letterspace.lua +++ b/src/luaotfload-letterspace.lua diff --git a/luaotfload-loaders.lua b/src/luaotfload-loaders.lua index 2aa8c7c..2aa8c7c 100644 --- a/luaotfload-loaders.lua +++ b/src/luaotfload-loaders.lua diff --git a/luaotfload-log.lua b/src/luaotfload-log.lua index 5698c84..5698c84 100644 --- a/luaotfload-log.lua +++ b/src/luaotfload-log.lua diff --git a/luaotfload-main.lua b/src/luaotfload-main.lua index f5f012d..f5f012d 100644 --- a/luaotfload-main.lua +++ b/src/luaotfload-main.lua diff --git a/luaotfload-override.lua b/src/luaotfload-override.lua index b75530b..b75530b 100644 --- a/luaotfload-override.lua +++ b/src/luaotfload-override.lua diff --git a/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index 1048e1d..1048e1d 100644 --- a/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua diff --git a/luaotfload-tool.lua b/src/luaotfload-tool.lua index 35765b5..35765b5 100755 --- a/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua diff --git a/luaotfload.sty b/src/luaotfload.sty index a235d6b..a235d6b 100644 --- a/luaotfload.sty +++ b/src/luaotfload.sty |