From 55ba70c6d8f76706f083818e7dd38006e88dcfb7 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 31 Aug 2013 20:06:40 +0200 Subject: =?UTF-8?q?[db]=20introduce=20=E2=80=9Clocal=E2=80=9D=20as=20third?= =?UTF-8?q?=20location=20category?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luaotfload-database.lua | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index dedcd01..5d662e0 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -238,14 +238,15 @@ end This is a sketch of the luaotfload db: type dbobj = { - mappings : fontentry list; - index : filestatus; - families : familytable; - names : namedata; // TODO: check for relevance after db is finalized - meta : metadata; - filenames : filemap; + families : familytable; + filenames : filemap; + index : filestatus; + mappings : fontentry list; + meta : metadata; + names : namedata; // TODO: check for relevance after db is finalized } and familytable = { + local : (format, familyentry) hash; // specified with include dir texmf : (format, familyentry) hash; system : (format, familyentry) hash; } @@ -256,8 +257,8 @@ This is a sketch of the luaotfload db: bolditalic : sizes; } and sizes = { - default = int; // points into mappings or names - other = (int, int) list; // design size -> index entry + default : int; // points into mappings or names + optical : (int, int) list; // design size -> index entry } and metadata = { formats : string list; // { "otf", "ttf", "ttc", "dfont" } @@ -266,12 +267,14 @@ This is a sketch of the luaotfload db: } and filemap = { base : { - texmf : (string, int) hash; // basename -> idx + local : (string, int) hash; // basename -> idx system : (string, int) hash; + texmf : (string, int) hash; }; bare : { - texmf : (string, (string, int) hash) hash; // format -> (barename -> idx) + local : (string, (string, int) hash) hash; // format -> (barename -> idx) system : (string, (string, int) hash) hash; + texmf : (string, (string, int) hash) hash; }; full : (int, string) hash; // idx -> full path } @@ -295,7 +298,7 @@ This is a sketch of the luaotfload db: size : int list; slant : int; subfont : int; - texmf : bool; + location : local | system | texmf; weight : int; width : int; units_per_em : int; // mainly 1000, but also 2048 or 256 @@ -343,8 +346,9 @@ mtx-fonts has in names.tma: local fontnames_init = function (formats) --- returns dbobj return { families = { - texmf = { }, - system = { }, + ["local"] = { }, + system = { }, + texmf = { }, }, index = { }, -- was: status; map abspath -> mapping mappings = { }, -- TODO: check if still necessary after rewrite -- cgit v1.2.3