From c22e7fa7a129c4f3496753657d36b651ba6d1b39 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 25 Apr 2013 04:25:53 +0200 Subject: accommodate weird subfamily type of Libertine Mono --- luaotfload-database.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'luaotfload-database.lua') diff --git a/luaotfload-database.lua b/luaotfload-database.lua index d731038..666172a 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -398,6 +398,7 @@ resolve = function (_,_,specification) -- the 1st two parameters are used by Con maxsize = optsize[2] and optsize[2] / 10 or dsnsize minsize = optsize[3] and optsize[3] / 10 or dsnsize end + if name == family then if subfamily == style then if optsize then @@ -413,7 +414,8 @@ resolve = function (_,_,specification) -- the 1st two parameters are used by Con break end elseif synonym_set[style] and - synonym_set[style][subfamily] then + synonym_set[style][subfamily] + then if optsize then if dsnsize == size or (size > minsize and size <= maxsize) then @@ -427,9 +429,11 @@ resolve = function (_,_,specification) -- the 1st two parameters are used by Con break end elseif subfamily == "regular" or + subfamily == "mono" or --> Libertine Mono O synonym_set.regular[subfamily] then found.fallback = face end + else if name == fullname or name == pfullname -- cgit v1.2.3 From 4d0d2c19ab36d4918a72041a087fbcb451ac8c52 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 25 Apr 2013 10:35:05 +0200 Subject: more reliable guard for Libertine Mono --- luaotfload-database.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'luaotfload-database.lua') diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 666172a..4044e8e 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -429,9 +429,13 @@ resolve = function (_,_,specification) -- the 1st two parameters are used by Con break end elseif subfamily == "regular" or - subfamily == "mono" or --> Libertine Mono O synonym_set.regular[subfamily] then found.fallback = face + elseif name == fullname then + --- happens with Libertine Mono which has + --- “mono” as subfamily + found[1] = face + break end else -- cgit v1.2.3 From 7bf46ad63839d6e38a9c1e11ec7d4fba27d1bc51 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 25 Apr 2013 11:25:18 +0200 Subject: add ``--alias`` option to fontdbutil --- luaotfload-database.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'luaotfload-database.lua') diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 4044e8e..e8f3d1d 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -201,10 +201,10 @@ load_names = function ( ) if data then report("info", 1, "db", "Font names database loaded", "%s", foundname) - report("info", 1, "db", "Loading took %0.f ms", + report("info", 3, "db", "Loading took %0.f ms", 1000*(os.gettimeofday()-starttime)) else - report("info", 0, "db", + report("info", 1, "db", [[Font names database not found, generating new one. This can take several minutes; please be patient.]]) data = update_names(fontnames_init()) @@ -938,9 +938,9 @@ local function scan_texmf_fonts(fontnames, newfontnames) variables OPENTYPEFONTS and TTFONTS of texmf.cnf ]] if stringis_empty(kpseexpand_path("$OSFONTDIR")) then - report("info", 1, "db", "Scanning TEXMF fonts...") + report("info", 2, "db", "Scanning TEXMF fonts...") else - report("info", 1, "db", "Scanning TEXMF and OS fonts...") + report("info", 2, "db", "Scanning TEXMF and OS fonts...") end local fontdirs = stringgsub(kpseexpand_path("$OPENTYPEFONTS"), "^%.", "") fontdirs = fontdirs .. stringgsub(kpseexpand_path("$TTFONTS"), "^%.", "") @@ -1091,8 +1091,8 @@ local function scan_os_fonts(fontnames, newfontnames) - fontcache for Unix (reads the fonts.conf file and scans the directories) - a static set of directories for Windows and MacOSX ]] - report("info", 1, "db", "Scanning OS fonts...") - report("info", 2, "db", "Searching in static system directories...") + report("info", 2, "db", "Scanning OS fonts...") + report("info", 3, "db", "Searching in static system directories...") for _,d in next, get_os_dirs() do local found, new = scan_dir(d, fontnames, newfontnames, false) n_scanned = n_scanned + found @@ -1110,7 +1110,7 @@ update_names = function (fontnames, force) - “newfontnames” is the final table to return - force is whether we rebuild it from scratch or not ]] - report("info", 1, "db", "Updating the font names database" + report("info", 2, "db", "Updating the font names database" .. (force and " forcefully" or "")) if force then @@ -1144,9 +1144,9 @@ update_names = function (fontnames, force) --- before rewrite | after rewrite --- partial: 804 ms | 701 ms --- forced: 45384 ms | 44714 ms - report("info", 1, "db", + report("info", 3, "db", "Scanned %d font files; %d new entries.", n_scanned, n_new) - report("info", 1, "db", + report("info", 3, "db", "Rebuilt in %0.f ms", 1000*(os.gettimeofday()-starttime)) return newfontnames end -- cgit v1.2.3