summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-23 07:26:22 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-23 07:26:22 -0700
commit2c756cd0059c3f2a9fc976fc5a87bac989dcca82 (patch)
tree4616afdd6e40f23b99c0ef98f7cec8a56a8df470
parenta34ba70ee4bf463c2ef499710bc319169c4d766b (diff)
parent6859514d34678f900d0806777aaf59e8055afcbe (diff)
downloadluaotfload-2c756cd0059c3f2a9fc976fc5a87bac989dcca82.tar.gz
Merge pull request #2 from eroux/texlive2011
Texlive2011
-rw-r--r--NEWS8
-rw-r--r--luaotfload.dtx22
-rwxr-xr-xmkluatexfontdb.lua4
-rw-r--r--otfl-font-nms.lua28
-rw-r--r--otfl-font-otf.lua2
-rw-r--r--otfl-luat-dum.lua2
-rw-r--r--tests/color.tex6
-rw-r--r--tests/math.tex1
-rw-r--r--tests/microtypography.tex42
-rw-r--r--tests/opbd.tex38
10 files changed, 120 insertions, 33 deletions
diff --git a/NEWS b/NEWS
index ceff36a..0f7184a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,14 @@
Change History
--------------
+2013/04/11, luaotfload v1.28:
+ * Adapting to LuaTeX 0.75
+ * Fix small documentation issues in mkluatexfontdb
+ * Fix possibility of infite loop fontconfig config files references
+ * Adding semibold synonym for bold
+ * file:xxx syntax now uses the same search function as name: which
+ make more fonts recognized
+
2012/05/28, luaotfload v1.27:
* Fix "endless loop in charlist" with some OpenType math fonts
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 4521590..fa6d709 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009-2010 by Elie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright (C) 2009-2013 by Elie Roux <elie.roux@telecom-bretagne.eu>
% and Khaled Hosny <khaledhosny@eglug.org>
% (Support: <lualatex-dev@tug.org>.)
%
@@ -36,7 +36,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luaotfload v1.27 OpenType layout system}
+\Msg{* Package: luaotfload v1.28 OpenType layout system}
\Msg{************************************************************************}
\keepsilent
@@ -47,7 +47,7 @@
\preamble
This is a generated file.
-Copyright (C) 2009-2010 by by Elie Roux <elie.roux@telecom-bretagne.eu>
+Copyright (C) 2009-2013 by by Elie Roux <elie.roux@telecom-bretagne.eu>
and Khaled Hosny <khaledhosny@eglug.org>
(Support: <lualatex-dev@tug.org>.)
@@ -104,7 +104,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luaotfload.drv}%
- [2012/05/28 v1.27 OpenType layout system]%
+ [2013/04/11 v1.28 OpenType layout system]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb,xcolor,xspace}
\usepackage[
@@ -166,7 +166,7 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \textsf{luaotfload} package}
-% \date{2012/05/28 v1.27}
+% \date{2013/04/11 v1.28}
% \author{Elie Roux and Khaled Hosny\\
% Support: \email{lualatex-dev@tug.org}}
%
@@ -453,8 +453,8 @@ module("luaotfload", package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.27,
- date = "2012/05/28",
+ version = 1.28,
+ date = "2013/04/11",
description = "OpenType layout system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
@@ -636,7 +636,13 @@ end
%
% \subsection{\context override}
%
-% Here we override some defaults set in \context code.
+% We have a unified function for both file and name resolver.
+%
+% \begin{macrocode}
+fonts.define.resolvers.file = fonts.define.resolvers.name
+% \end{macrocode}
+%
+% Overriding some defaults set in \context code.
%
% \begin{macrocode}
fonts.mode = "node"
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 553332d..62e15f3 100755
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -33,9 +33,9 @@ Valid options:
-V --version print version and exit
-h --help print this message
-The output database file is named otfl-fonts.lua and is placed under:
+The output database file is named otfl-names.lua and is placed under:
- %s"
+ %s
]], name, names.path.localdir))
end
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index a8b3100..50febab 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -76,9 +76,12 @@ end
local synonyms = {
regular = { "normal", "roman", "plain", "book", "medium" },
- bold = { "boldregular", "demi", "demibold" },
+ -- boldregular was for old versions of Linux Libertine, is it still useful?
+ -- semibold is in new versions of Linux Libertine, but there is also a bold,
+ -- not sure it's useful here...
+ bold = { "demi", "demibold", "semibold", "boldregular" },
italic = { "regularitalic", "normalitalic", "oblique", "slanted" },
- bolditalic = { "boldoblique", "boldslanted", "demiitalic", "demioblique", "demislanted", "demibolditalic" },
+ bolditalic = { "boldoblique", "boldslanted", "demiitalic", "demioblique", "demislanted", "demibolditalic", "semibolditalic" },
}
local loaded = false
@@ -493,8 +496,8 @@ local function scan_texmf_fonts(fontnames, newfontnames)
else
logs.info("Scanning TEXMF and OS fonts...")
end
- local fontdirs = expandpath("$OPENTYPEFONTS"):gsub("^\.", "")
- fontdirs = fontdirs .. expandpath("$TTFONTS"):gsub("^\.", "")
+ local fontdirs = expandpath("$OPENTYPEFONTS"):gsub("^%.", "")
+ fontdirs = fontdirs .. expandpath("$TTFONTS"):gsub("^%.", "")
if not fontdirs:is_empty() then
for _,d in next, splitpath(fontdirs) do
scan_dir(d, fontnames, newfontnames, true)
@@ -515,14 +518,16 @@ end
in OSFONTDIR.
]]
-local function read_fonts_conf(path, results)
+local function read_fonts_conf(path, results, passed_paths)
--[[
This function parses /etc/fonts/fonts.conf and returns all the dir it finds.
The code is minimal, please report any error it may generate.
]]
local f = io.open(path)
+ table.insert(passed_paths, path)
if not f then
- error("Cannot open the file "..path)
+ logs.info("Warning: unable to read "..path.. ", skipping...")
+ return results
end
local incomments = false
for line in f:lines() do
@@ -571,14 +576,15 @@ local function read_fonts_conf(path, results)
elseif not lfs.isfile(include) and not lfs.isdir(include) then
include = file.join(file.dirname(path), include)
end
- if lfs.isfile(include) then
- -- maybe we should prevent loops here?
+ if lfs.isfile(include) and kpse.readable_file(include) and not table.contains(passed_paths, include) then
-- we exclude path with texmf in them, as they should
-- be found otherwise
- read_fonts_conf(include, results)
+ read_fonts_conf(include, results, passed_paths)
elseif lfs.isdir(include) then
for _,f in next, glob(file.join(include, "*.conf")) do
- read_fonts_conf(f, results)
+ if not table.contains(passed_paths, f) then
+ read_fonts_conf(f, results, passed_paths)
+ end
end
end
end
@@ -604,7 +610,7 @@ local function get_os_dirs()
local windir = os.getenv("WINDIR")
return { file.join(windir, 'Fonts') }
else
- return read_fonts_conf("/etc/fonts/fonts.conf", {})
+ return read_fonts_conf("/etc/fonts/fonts.conf", {}, {})
end
end
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua
index b46bc91..ce54086 100644
--- a/otfl-font-otf.lua
+++ b/otfl-font-otf.lua
@@ -1100,7 +1100,7 @@ otf.enhancers["reorganize kerns"] = function(data,filename)
if type(lookups) ~= "table" then
lookups = { lookups }
end
- local maxfirsts, maxseconds = getn(firsts), getn(seconds)
+ local maxfirsts, maxseconds = #firsts, #seconds
-- here we could convert split into a list of unicodes which is a bit
-- faster but as this is only done when caching it does not save us much
for _, s in next, firsts do
diff --git a/otfl-luat-dum.lua b/otfl-luat-dum.lua
index 2f6627f..13b73b1 100644
--- a/otfl-luat-dum.lua
+++ b/otfl-luat-dum.lua
@@ -62,7 +62,7 @@ local remapper = {
}
function resolvers.find_file(name,kind)
- name = string.gsub(name,"\\","\/")
+ name = string.gsub(name,"\\","/")
kind = string.lower(kind)
return kpse.find_file(name,(kind and kind ~= "" and (remapper[kind] or kind)) or file.extname(name,"tex"))
end
diff --git a/tests/color.tex b/tests/color.tex
index 1be8896..d410bf0 100644
--- a/tests/color.tex
+++ b/tests/color.tex
@@ -4,7 +4,7 @@
\font\testb=file:lmroman10-regular.otf:color=FFFF0099;+trep at 10pt
\font\testc=file:lmroman10-regular.otf:color=559922;+trep at 12pt
-\testa \input knuth \par
-\testb \input knuth \par
-\testc \input knuth \par
+\testa test \par
+\testb test \par
+\testc test \par
\bye
diff --git a/tests/math.tex b/tests/math.tex
index 0e07b2c..b216c30 100644
--- a/tests/math.tex
+++ b/tests/math.tex
@@ -19,7 +19,6 @@ $$
$$
\Umathaccent "0 "4 "23DE {a+b}
-+ \Umathbotaccent "0 "4 "23DF {a+b} = C
$$
$$
diff --git a/tests/microtypography.tex b/tests/microtypography.tex
index 7d032e3..001d0a1 100644
--- a/tests/microtypography.tex
+++ b/tests/microtypography.tex
@@ -2,8 +2,42 @@
\pdfprotrudechars2 \pdfadjustspacing2
-\font\testa=file:texgyretermes-regular:script=latn at 12pt
-\font\testb=file:texgyretermes-regular:script=latn;protrusion=default at 12pt
-\testa \input tufte \par
-\testb \input tufte \par
+\font\testa ={tex gyre termes:script=latn} at 10pt
+\font\testb ={tex gyre termes:+liga;protrusion=default} at 10pt
+
+% a long file should be input here...
+\testa
+
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats.
+
+\par
+\testb
+
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats.
+
+\par
\bye
diff --git a/tests/opbd.tex b/tests/opbd.tex
index 50c4dfd..a934902 100644
--- a/tests/opbd.tex
+++ b/tests/opbd.tex
@@ -4,6 +4,40 @@
\font\testa=file:texgyrepagella-regular:script=latn at 12pt
\font\testb=file:texgyrepagella-regular:mode=node;script=latn;protrusion=yes;featurefile=opbd.fea;+opbd at 12pt
-\testa \input tufte \par
-\testb \input tufte \par
+\testa
+
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats.
+
+\par
+
+
+\testb
+
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats.
+
+\par
\bye