From f901a9b78f970f5674b2a0437f239789b6e12f36 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 5 Feb 2014 20:43:45 +0100 Subject: [db] backport c29e7f302f6ab05b6e0975daeaa60240b530885d Part of the 2.4 backport of this issue: https://github.com/lualatex/luaotfload/pull/188 --- luaotfload-database.lua | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 7e5f8cb..cb3ec33 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -132,7 +132,7 @@ luaotfloadconfig.compress = luaotfloadconfig.compress ~= false local names = fonts.names local name_index = nil --> upvalue for names.data local lookup_cache = nil --> for names.lookups -names.version = 2.4 +names.version = 2.41 names.data = nil --- contains the loaded database names.lookups = nil --- contains the lookup cache @@ -1395,16 +1395,26 @@ local get_english_names = function (names, basename) report("log", 1, "db", "Broken font %s rejected due to missing names table.", basename) - return nil end - return english_names + return english_names or { } end local organize_namedata = function (metadata, english_names, basename, info) + local default_name = english_names.compatfull + or english_names.fullname + or english_names.postscriptname + or metadata.fullname + or metadata.fontname + or info.fullname --- TODO check if fontloader.info() is ready for prime + or info.fontname + local default_family = english_names.preffamily + or english_names.family + or metadata.familyname + or info.familyname local fontnames = { --- see --- https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html @@ -1420,14 +1430,15 @@ local organize_namedata = function (metadata, --- However, in some fonts (e.g. CMU) all three fields are --- identical. fullname = --[[ 18 ]] english_names.compatfull - or --[[ 4 ]] english_names.fullname, + or --[[ 4 ]] english_names.fullname + or default_name, --- we keep both the “preferred family” and the “family” --- values around since both are valid but can turn out --- quite differently, e.g. with Latin Modern: --- preffamily: “Latin Modern Sans”, --- family: “LM Sans 10” preffamily = --[[ 16 ]] english_names.preffamilyname, - family = --[[ 1 ]] english_names.family, + family = --[[ 1 ]] english_names.family or default_family, prefmodifiers = --[[ 17 ]] english_names.prefmodifiers, subfamily = --[[ 2 ]] english_names.subfamily, psname = --[[ 6 ]] english_names.postscriptname, @@ -2803,6 +2814,9 @@ local pull_values = function (entry) end local add_family = function (name, subtable, modifier, entry) + if not name then + return + end local familytable = subtable [name] if not familytable then familytable = { } -- cgit v1.2.3 From 5a7c2daf47c7e7a3d8c948b7d2e0420c1623c112 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 5 Feb 2014 19:01:26 +0100 Subject: [tool] add brief package info to output of --version --- luaotfload-tool.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index fd84fa4..341d197 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -191,12 +191,13 @@ local help_messages = { Usage: %s [OPTIONS...] -Operations on the Luaotfload font names database. + Luaotfload font management and diagnostic utility. + This program is part of the Luaotfload package. -This tool is part of the luaotfload package. Valid options are: + Valid options are: ------------------------------------------------------------------------------- - VERBOSITY AND LOGGING + VERBOSITY AND DIAGNOSTICS -q --quiet don't output anything -v --verbose=LEVEL be more verbose (print the searched directories) @@ -302,8 +303,16 @@ local help_msg = function (version) luaotfloadconfig.cache_dir))) end +local about = [[ +%s: + Luaotfload font management and diagnostic utility. + License: GNU GPL v2.0. + Report problems to +]] + local version_msg = function ( ) local out = function (...) texiowrite_nl (stringformat (...)) end + out (about, luaotfloadconfig.self) out ("%s version %q", luaotfloadconfig.self, version) out ("revision %q", luaotfloadstatus.notes.revision) out ("database version %q", names.version) -- cgit v1.2.3 From bd307a8fe8047d322317037c1a832720c236fb48 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 5 Feb 2014 21:06:28 +0100 Subject: [*] bump version, update copyright date --- NEWS | 5 +++++ luaotfload-tool.lua | 6 +++--- luaotfload-tool.rst | 6 +++--- luaotfload.dtx | 16 ++++++++-------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index b8f380d..0195835 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ Change History -------------- +2014/02/05, luaotfload v2.4-3 + * Add contact info to --version output of luaotfload-tool (backport from + 2.5). + * Fix bug with broken font names (backport from 2.5). + 2013/12/31, luaotfload v2.4 * Additional self-tests, now in separate file (luaotfload-diagnostics.lua) * Better path and directory handling, especially on Windows diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 341d197..67ab2e7 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -2,14 +2,14 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-tool.lua -- DESCRIPTION: database functionality --- REQUIREMENTS: luaotfload 2.2 +-- REQUIREMENTS: luaotfload 2.4 -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang --- VERSION: 2.4 +-- VERSION: 2.4-3 -- LICENSE: GPL v2 -- MODIFIED: 2013-07-28 13:12:04+0200 ----------------------------------------------------------------------- -local version = "2.4" --- . +local version = "2.4-3" --- . --[[doc-- diff --git a/luaotfload-tool.rst b/luaotfload-tool.rst index 957ec85..b5629b7 100644 --- a/luaotfload-tool.rst +++ b/luaotfload-tool.rst @@ -6,9 +6,9 @@ generate and query the Luaotfload font names database ----------------------------------------------------------------------- -:Date: 2013-07-31 +:Date: 2014-02-05 :Copyright: GPL v2.0 -:Version: 2.4 +:Version: 2.4-3 :Manual section: 1 :Manual group: text processing @@ -197,7 +197,7 @@ miscellaneous directory (the name will be chosen automatically (**experimental!**). ---version, -V Show version number and exit. +--version, -V Show version info of components and exit. --help, -h Show help message and exit. --diagnose=CHECK Run the diagnostic procedure *CHECK*. Available diff --git a/luaotfload.dtx b/luaotfload.dtx index f27b5e0..40b5df9 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2009-2013 +% Copyright (C) 2009-2014 % by Elie Roux % and Khaled Hosny % and Philipp Gesang @@ -40,7 +40,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: luaotfload v2.4 OpenType layout system} +\Msg{* Package: luaotfload v2.4-3 OpenType layout system} \Msg{************************************************************************} \keepsilent @@ -51,7 +51,7 @@ \preamble This is a generated file. -Copyright (C) 2009-2013 +Copyright (C) 2009-2014 by Elie Roux and Khaled Hosny and Philipp Gesang @@ -111,7 +111,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luaotfload.drv}% - [2013/12/28 v2.4 OpenType layout system]% + [2014/02/05 v2.4-3 OpenType layout system]% \documentclass{ltxdoc} \usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace} \usepackage[x11names]{xcolor} @@ -231,7 +231,7 @@ and the derived files % \GetFileInfo{luaotfload.drv} % % \title{The \identifier{luaotfload} package} -% \date{2013/12/28 v2.4} +% \date{2014/02/05 v2.4-3} % \author{Elie Roux · Khaled Hosny · Philipp Gesang\\ % Home: \url{https://github.com/lualatex/luaotfload}\\ % Support: \email{lualatex-dev@tug.org}} @@ -1608,8 +1608,8 @@ end luaotfload.module = { name = "luaotfload", - version = 2.40003, - date = "2013/12/28", + version = 2.40004, --- 2.4-3 + date = "2014/02/05", description = "OpenType layout system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", @@ -2233,7 +2233,7 @@ luaotfload.aux.start_rewrite_fontname () --- to be migrated to fontspec \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% - [2013/12/28 v2.4 OpenType layout system] + [2014/02/05 v2.4-3 OpenType layout system] \RequirePackage{luatexbase} \fi \ifnum\luatexversion<76 -- cgit v1.2.3 From 828a69efb1f899f8707270f4515db20d485ccc34 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 18 May 2014 21:35:56 +0200 Subject: [main] backport 0e06af55b50b2314c5d99db4843c1881dd89a88b (lowercase forced format) --- luaotfload.dtx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 40b5df9..b8fd11d 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -1995,7 +1995,7 @@ local file_resolver = function (specification) local name = resolve_file (specification.name) local suffix = filesuffix(name) if formats[suffix] then - specification.forced = suffix + specification.forced = string.lower (suffix) specification.forcedname = file.removesuffix(name) else specification.name = name @@ -2080,7 +2080,7 @@ request_resolvers.path = function (specification) else local suffix = filesuffix (name) if formats[suffix] then - specification.forced = suffix + specification.forced = string.lower (suffix) specification.name = file.removesuffix(name) specification.forcedname = name else @@ -2102,7 +2102,7 @@ request_resolvers.kpse = function (specification) if suffix and formats[suffix] then name = file.removesuffix(name) if resolvers.findfile(name, suffix) then - specification.forced = suffix + specification.forced = string.lower (suffix) specification.forcedname = name return end @@ -2130,7 +2130,7 @@ request_resolvers.name = function (specification) if resolved then specification.resolved = resolved specification.sub = subfont - specification.forced = filesuffix (resolved) + specification.forced = string.lower (filesuffix (resolved) or "") specification.forcedname = resolved specification.name = fileremovesuffix (resolved) else -- cgit v1.2.3 From 0277f8139e591bb57a0e7227a6d7b16b33353293 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 18 May 2014 21:52:38 +0200 Subject: [*] uppdate news, bump version --- NEWS | 4 ++++ luaotfload-tool.lua | 4 ++-- luaotfload-tool.rst | 4 ++-- luaotfload.dtx | 12 ++++++------ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 0195835..a87417f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ Change History -------------- +2014/05/18, luaotfload v2.4-4 + * Fix incorrect handling of font file formats (backport of commit + 828a69ef... to the 2.5 branch). + 2014/02/05, luaotfload v2.4-3 * Add contact info to --version output of luaotfload-tool (backport from 2.5). diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 67ab2e7..5607c04 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -4,12 +4,12 @@ -- DESCRIPTION: database functionality -- REQUIREMENTS: luaotfload 2.4 -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang --- VERSION: 2.4-3 +-- VERSION: 2.4-4 -- LICENSE: GPL v2 -- MODIFIED: 2013-07-28 13:12:04+0200 ----------------------------------------------------------------------- -local version = "2.4-3" --- . +local version = "2.4-4" --- . --[[doc-- diff --git a/luaotfload-tool.rst b/luaotfload-tool.rst index b5629b7..08acb6c 100644 --- a/luaotfload-tool.rst +++ b/luaotfload-tool.rst @@ -6,9 +6,9 @@ generate and query the Luaotfload font names database ----------------------------------------------------------------------- -:Date: 2014-02-05 +:Date: 2014-05-18 :Copyright: GPL v2.0 -:Version: 2.4-3 +:Version: 2.4-4 :Manual section: 1 :Manual group: text processing diff --git a/luaotfload.dtx b/luaotfload.dtx index b8fd11d..3615fa8 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -40,7 +40,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: luaotfload v2.4-3 OpenType layout system} +\Msg{* Package: luaotfload v2.4-4 OpenType layout system} \Msg{************************************************************************} \keepsilent @@ -111,7 +111,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luaotfload.drv}% - [2014/02/05 v2.4-3 OpenType layout system]% + [2014/05/18 v2.4-4 OpenType layout system]% \documentclass{ltxdoc} \usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace} \usepackage[x11names]{xcolor} @@ -231,7 +231,7 @@ and the derived files % \GetFileInfo{luaotfload.drv} % % \title{The \identifier{luaotfload} package} -% \date{2014/02/05 v2.4-3} +% \date{2014/05/18 v2.4-4} % \author{Elie Roux · Khaled Hosny · Philipp Gesang\\ % Home: \url{https://github.com/lualatex/luaotfload}\\ % Support: \email{lualatex-dev@tug.org}} @@ -1608,8 +1608,8 @@ end luaotfload.module = { name = "luaotfload", - version = 2.40004, --- 2.4-3 - date = "2014/02/05", + version = 2.40005, --- 2.4-4 + date = "2014/05/18", description = "OpenType layout system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", @@ -2233,7 +2233,7 @@ luaotfload.aux.start_rewrite_fontname () --- to be migrated to fontspec \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% - [2014/02/05 v2.4-3 OpenType layout system] + [2014/05/18 v2.4-4 OpenType layout system] \RequirePackage{luatexbase} \fi \ifnum\luatexversion<76 -- cgit v1.2.3