From cf7d6eceb827fc8d7c0c0afc2255155552f030af Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Tue, 16 Apr 2013 12:13:46 +0200
Subject: =?UTF-8?q?add=20fixes=20courtesy=20of=20=C3=89lie=20Roux=20to=20t?=
 =?UTF-8?q?he=20database=20code?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 otfl-font-nms.lua | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 0942eda..8869bef 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -88,9 +88,16 @@ end
 
 local synonyms = {
     regular    = { "normal", "roman", "plain", "book", "medium" },
-    bold       = { "boldregular", "demi", "demibold" },
+    --- TODO note from Élie Roux
+    --- 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
@@ -585,7 +592,7 @@ 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
+                    if lfs.isfile(include) and kpse.readable_file(include) then
                         -- maybe we should prevent loops here?
                         -- we exclude path with texmf in them, as they should
                         -- be found otherwise
-- 
cgit v1.2.3