diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-31 20:06:40 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-31 20:06:40 +0200 |
commit | 55ba70c6d8f76706f083818e7dd38006e88dcfb7 (patch) | |
tree | f3aa35653da592762b16ba71caec5ac0b4f3dd63 | |
parent | d66597559f15ce654845a958e2f905bd502a1ed8 (diff) | |
download | luaotfload-55ba70c6d8f76706f083818e7dd38006e88dcfb7.tar.gz |
[db] introduce “local” as third location category
-rw-r--r-- | luaotfload-database.lua | 30 |
1 files 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 |