From 8631d1c4944f2cde0ba2dea1e1f0ac92e2538382 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 18 Apr 2016 21:02:06 +0200 Subject: [db,fontloader] fix subfont table handling (by Dohyun Kim) TTC subfonts must be considered if there is at least one subfont. Discovered and fixed by @dohyunkim; the fix for ``font-otr.lua`` goes upstream. --- src/fontloader/misc/fontloader-font-otr.lua | 2 +- src/luaotfload-database.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fontloader/misc/fontloader-font-otr.lua b/src/fontloader/misc/fontloader-font-otr.lua index 7226907..e6e7fa2 100644 --- a/src/fontloader/misc/fontloader-font-otr.lua +++ b/src/fontloader/misc/fontloader-font-otr.lua @@ -2167,7 +2167,7 @@ function readers.getinfo(filename,specification) -- string, nil|number|table info[i] = getinfo(fontdata,i,platformnames,rawfamilynames) end return info - elseif subfont > 1 and subfont <= #subfonts then + elseif subfont >= 1 and subfont <= #subfonts then return getinfo(fontdata,subfont,platformnames,rawfamilynames) else return { diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 4944de1..0f8e56b 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -1842,7 +1842,7 @@ local read_font_names = function (fullname, --- 5) check for subfonts and process each of them - if type (info) == "table" and #info > 1 then --- ttc + if type (info) == "table" and #info >= 1 then --- ttc local success = false --- true if at least one subfont got read -- cgit v1.2.3