From f56b879cebfc6e9d1c67a8da6013777e7379c185 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 29 Mar 2015 12:46:24 +0200 Subject: [*] bump version and date --- src/luaotfload-main.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/luaotfload-main.lua') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index ee8966c..e6bb782 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -1,10 +1,10 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-main.lua -- DESCRIPTION: Luatex fontloader initialization --- REQUIREMENTS: luatex v.0.79 or later; packages lualibs, luatexbase +-- REQUIREMENTS: luatex v.0.80 or later; packages lualibs, luatexbase -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang -- VERSION: same as Luaotfload --- MODIFIED: 2015-03-11 07:49:20+0100 +-- MODIFIED: 2015-03-29 12:41:09+0200 ----------------------------------------------------------------------- -- --- Note: @@ -14,7 +14,7 @@ --- markup. if not modules then modules = { } end modules ["luaotfload-main"] = { - version = "2.5", + version = "2.6", comment = "fontloader initialization", author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang", copyright = "PRAGMA ADE / ConTeXt Development Team", @@ -48,12 +48,12 @@ local initial_log_level = 0 luaotfload = luaotfload or { } local luaotfload = luaotfload luaotfload.log = luaotfload.log or { } -luaotfload.version = "2.5-2" -- FIXME version belongs in common init +luaotfload.version = "2.6" -- FIXME version belongs in common init luaotfload.module = { name = "luaotfload-main", - version = 2.50001, - date = "2014/07/16", + version = 2.60000, + date = "2015/03/29", description = "OpenType layout system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", -- cgit v1.2.3 From 0a03da95e41ed2e4e1082ebde9f20461aa6b1842 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 26 May 2015 08:12:01 +0200 Subject: [init] prepare fontloader initialization component --- src/luaotfload-main.lua | 62 ++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 26 deletions(-) (limited to 'src/luaotfload-main.lua') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index e6bb782..b12e3b7 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -1,10 +1,10 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-main.lua --- DESCRIPTION: Luatex fontloader initialization +-- DESCRIPTION: Luaotfload initialization -- REQUIREMENTS: luatex v.0.80 or later; packages lualibs, luatexbase -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang -- VERSION: same as Luaotfload --- MODIFIED: 2015-03-29 12:41:09+0200 +-- MODIFIED: 2015-05-26 07:51:29+0200 ----------------------------------------------------------------------- -- --- Note: @@ -13,15 +13,35 @@ --- version 2.4 to 2.5. Thus, the comments are still in TeX (Latex) --- markup. -if not modules then modules = { } end modules ["luaotfload-main"] = { - version = "2.6", - comment = "fontloader initialization", - author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "GNU General Public License v. 2.0" -} +local initial_log_level = 0 + +luaotfload = luaotfload or { } +local luaotfload = luaotfload +luaotfload.log = luaotfload.log or { } +luaotfload.version = "2.6" +luaotfload.loaders = { } + +local authors = "\z + Hans Hagen,\z + Khaled Hosny,\z + Elie Roux,\z + Will Robertson,\z + Philipp Gesang,\z + Dohyun Kim,\z + Reuben Thomas\z +" +luaotfload.module = { + name = "luaotfload-main", + version = 2.60001, + date = "2015/05/26", + description = "OpenType layout system.", + author = authors, + copyright = authors, + license = "GPL v2.0" +} + --[[doc-- This file initializes the system and loads the font loader. To @@ -43,23 +63,6 @@ if not modules then modules = { } end modules ["luaotfload-main"] = { --doc]]-- -local initial_log_level = 0 - -luaotfload = luaotfload or { } -local luaotfload = luaotfload -luaotfload.log = luaotfload.log or { } -luaotfload.version = "2.6" -- FIXME version belongs in common init - -luaotfload.module = { - name = "luaotfload-main", - version = 2.60000, - date = "2015/03/29", - description = "OpenType layout system.", - author = "Elie Roux & Hans Hagen", - copyright = "Elie Roux", - license = "GPL v2.0" -} - local luatexbase = luatexbase local setmetatable = setmetatable @@ -89,6 +92,8 @@ luaotfload.log.tex = { --[[doc-- + XXX remove + We set the minimum version requirement for \LUATEX to v0.76, because the font loader requires recent features like direct attribute indexing and \luafunction{node.end_of_math()} that aren’t @@ -140,6 +145,9 @@ local load_luaotfload_module = make_loader "luaotfload" ----- load_luaotfload_module = make_loader "luatex" --=> for Luatex-Plain local load_fontloader_module = make_loader "fontloader" +luaotfload.loaders.luaotfload = load_luaotfload_module +luaotfload.loaders.fontloader = load_fontloader_module + load_luaotfload_module "log" --- log messages local log = luaotfload.log @@ -149,6 +157,8 @@ log.set_loglevel (default_log_level) --[[doc-- + XXX remove + Before \TeX Live 2013 version, \LUATEX had a bug that made ofm fonts fail when called with their extension. There was a side-effect making ofm totally unloadable when luaotfload was present. The following -- cgit v1.2.3 From 892ebebdc0fb6d59e1748e7d81e976d41f8fd85f Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 26 May 2015 08:15:51 +0200 Subject: [main] remove obsolete workarounds --- src/luaotfload-main.lua | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/luaotfload-main.lua') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index b12e3b7..d09ea7b 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -92,8 +92,6 @@ luaotfload.log.tex = { --[[doc-- - XXX remove - We set the minimum version requirement for \LUATEX to v0.76, because the font loader requires recent features like direct attribute indexing and \luafunction{node.end_of_math()} that aren’t @@ -116,15 +114,6 @@ if tex.luatexversion < min_luatex_version then warning ("using fallback fontloader -- newer functionality not available") fontloader_package = "tl2014" --- TODO fallback should be configurable too --- we install a fallback for older versions as a safety - if not node.end_of_math then - local math_t = node.id "math" - local traverse_nodes = node.traverse_id - node.end_of_math = function (n) - for n in traverse_nodes (math_t, n.next) do - return n - end - end - end end --[[doc-- @@ -155,38 +144,6 @@ local logreport = log.report log.set_loglevel (default_log_level) ---[[doc-- - - XXX remove - - Before \TeX Live 2013 version, \LUATEX had a bug that made ofm fonts - fail when called with their extension. There was a side-effect making - ofm totally unloadable when luaotfload was present. The following - lines are a patch for this bug. The utility of these lines is - questionable as they are not necessary since \TeX Live 2013. They - should be removed in the next version. - ---doc]]-- - -local Cs, P, lpegmatch = lpeg.Cs, lpeg.P, lpeg.match - -local p_dot, p_slash = P".", P"/" -local p_suffix = (p_dot * (1 - p_dot - p_slash)^1 * P(-1)) / "" -local p_removesuffix = Cs((p_suffix + 1)^1) - -local find_vf_file = function (name) - local fullname = kpsefind_file(name, "ovf") - if not fullname then - --fullname = kpsefind_file(file.removesuffix(name), "ovf") - fullname = kpsefind_file(lpegmatch(p_removesuffix, name), "ovf") - end - if fullname then - logreport ("log", 0, "main", - "loading virtual font file %s.", fullname) - end - return fullname -end - --[[doc-- \subsection{Preparing the Font Loader} @@ -428,8 +385,6 @@ add_to_callback("hpack_filter", nodes.simple_font_handler, "luaotfload.node_processor", 1) -add_to_callback("find_vf_file", - find_vf_file, "luaotfload.find_vf_file") load_luaotfload_module "override" --- load glyphlist on demand -- cgit v1.2.3 From 431c25a1200c7d0e8b7fe55173357d29f7247975 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 9 Jun 2015 23:36:37 +0200 Subject: [main,init] separate loading of fontloader and lualibs packages --- src/luaotfload-main.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/luaotfload-main.lua') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index d09ea7b..a676685 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -4,7 +4,7 @@ -- REQUIREMENTS: luatex v.0.80 or later; packages lualibs, luatexbase -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang -- VERSION: same as Luaotfload --- MODIFIED: 2015-05-26 07:51:29+0200 +-- MODIFIED: 2015-06-09 23:08:18+0200 ----------------------------------------------------------------------- -- --- Note: @@ -13,8 +13,7 @@ --- version 2.4 to 2.5. Thus, the comments are still in TeX (Latex) --- markup. -local initial_log_level = 0 - +local initial_log_level = 0 luaotfload = luaotfload or { } local luaotfload = luaotfload luaotfload.log = luaotfload.log or { } @@ -65,6 +64,7 @@ luaotfload.module = { local luatexbase = luatexbase +local require = require local setmetatable = setmetatable local type, next = type, next local stringlower = string.lower @@ -78,7 +78,7 @@ local create_callback = luatexbase.create_callback local reset_callback = luatexbase.reset_callback local call_callback = luatexbase.call_callback -local dummy_function = function () end --- XXX this will be moved to the luaotfload namespace when we have the init module +local dummy_function = function () end --- XXX this will be moved to the luaotfload namespace when we have the init module local error, warning, info, log = luatexbase.provides_module(luaotfload.module) @@ -105,7 +105,8 @@ luaotfload.log.tex = { --doc]]-- local min_luatex_version = 79 --- i. e. 0.79 -local fontloader_package = "fontloader" --- default: from current Context +--local fontloader_package = "fontloader" --- default: from current Context +local fontloader_package = "slim" if tex.luatexversion < min_luatex_version then warning ("LuaTeX v%.2f is old, v%.2f or later is recommended.", @@ -137,7 +138,7 @@ local load_fontloader_module = make_loader "fontloader" luaotfload.loaders.luaotfload = load_luaotfload_module luaotfload.loaders.fontloader = load_fontloader_module -load_luaotfload_module "log" --- log messages +load_luaotfload_module "init" --- fontloader initialization local log = luaotfload.log local logreport = log.report -- cgit v1.2.3 From 6a327a9389ab16599a19de67c0511b3b291ef880 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 13 Jun 2015 00:09:44 +0200 Subject: [main] strip file name suffix for fonts loaded as type1 --- src/luaotfload-main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/luaotfload-main.lua') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index a676685..a825dc3 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -506,8 +506,10 @@ request_resolvers.anon = function (specification) local name = specification.name for i=1, #type1_formats do local format = type1_formats[i] + local suffix = filesuffix (name) if resolvers.findfile(name, format) then - specification.forcedname = file.addsuffix(name, format) + local usename = suffix == format and file.removesuffix (name) or name + specification.forcedname = file.addsuffix (usename, format) specification.forced = format return end -- cgit v1.2.3