Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Texlive2011 #2

Merged
merged 16 commits into from
Apr 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -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

Expand Down
22 changes: 14 additions & 8 deletions luaotfload.dtx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
% Copyright (C) 2009-2010 by Elie Roux <[email protected]>
% Copyright (C) 2009-2013 by Elie Roux <[email protected]>
% and Khaled Hosny <[email protected]>
% (Support: <[email protected]>.)
%
Expand Down Expand Up @@ -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
Expand All @@ -47,7 +47,7 @@
\preamble
This is a generated file.

Copyright (C) 2009-2010 by by Elie Roux <[email protected]>
Copyright (C) 2009-2013 by by Elie Roux <[email protected]>
and Khaled Hosny <[email protected]>
(Support: <[email protected]>.)

Expand Down Expand Up @@ -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[
Expand Down Expand Up @@ -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{[email protected]}}
%
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions mkluatexfontdb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 17 additions & 11 deletions otfl-font-nms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion otfl-font-otf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion otfl-luat-dum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/color.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion tests/math.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

$$
\Umathaccent "0 "4 "23DE {a+b}
+ \Umathbotaccent "0 "4 "23DF {a+b} = C
$$

$$
Expand Down
42 changes: 38 additions & 4 deletions tests/microtypography.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 36 additions & 2 deletions tests/opbd.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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