summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-31 19:59:24 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-31 19:59:24 +0200
commit4f04f33f36933aaec7626154e055687b2abe903c (patch)
tree9345334fa94f8e9a553ad64451910de291b4663b
parent08135c42930576980e9bdae7a82208cb9dcf42f9 (diff)
downloadluaotfload-4f04f33f36933aaec7626154e055687b2abe903c.tar.gz
[db] document new db layout for rewrite
-rw-r--r--luaotfload-database.lua38
1 files changed, 31 insertions, 7 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 067b48c..6e49556 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -238,17 +238,41 @@ end
This is a sketch of the luaotfload db:
type dbobj = {
- formats : string list; // { "otf", "ttf", "ttc", "dfont" }
mappings : fontentry list;
- status : filestatus;
- version : float;
- // new in v2.3; these supersede the basenames / barenames
- // hashes from v2.2
+ index : filestatus;
+ families : familytable;
+ names : namedata; // TODO: check for relevance after db is finalized
+ meta : metadata;
filenames : filemap;
}
+ and familytable = {
+ texmf : (format, familyentry) hash;
+ system : (format, familyentry) hash;
+ }
+ and familyentry = {
+ regular : sizes;
+ italic : sizes;
+ bold : sizes;
+ bolditalic : sizes;
+ }
+ and sizes = {
+ default = int; // points into mappings or names
+ other = (int, int) list; // design size -> index entry
+ }
+ and metadata = {
+ formats : string list; // { "otf", "ttf", "ttc", "dfont" }
+ statistics : TODO;
+ version : float;
+ }
and filemap = {
- base : (string, int) hash; // basename -> idx
- bare : (string, int) hash; // barename -> idx
+ base : {
+ texmf : (string, int) hash; // basename -> idx
+ system : (string, int) hash;
+ };
+ bare : {
+ texmf : (string, (string, int) hash) hash; // format -> (barename -> idx)
+ system : (string, (string, int) hash) hash;
+ };
full : (int, string) hash; // idx -> full path
}
and fontentry = {