summaryrefslogtreecommitdiff
path: root/luaotfload-database.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:45:14 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:45:14 +0200
commit69f51727fba1c348d78348d9f163cf884e7ab558 (patch)
treede33ed7ca323e1065b23c6431147dd8016020535 /luaotfload-database.lua
parent4921643624581f05c0f0bb17d7960b599872238c (diff)
downloadluaotfload-69f51727fba1c348d78348d9f163cf884e7ab558.tar.gz
add querying of font metadata to luaotfload-tool
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r--luaotfload-database.lua26
1 files changed, 15 insertions, 11 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 576341f..96db195 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -146,10 +146,11 @@ This is a sketch of the luaotfload db:
psname : string;
subfamily : string;
}
- size : int list;
- slant : int;
- weight : int;
- width : int;
+ size : int list;
+ slant : int;
+ weight : int;
+ width : int;
+ units_per_em : int; // mainly 1000, but also 2048 or 256
}
and filestatus = (fullname, { index : int list; timestamp : int }) dict
@@ -836,13 +837,16 @@ font_fullinfo = function (filename, subfont)
report("log", 1, "db", "broken font rejected", "%s", basefile)
return
end
- tfmdata.fontname = metadata.fontname
- tfmdata.fullname = metadata.fullname
- tfmdata.familyname = metadata.familyname
- tfmdata.filename = { filename, subfont } -- always store full path
- tfmdata.weight = metadata.pfminfo.weight
- tfmdata.width = metadata.pfminfo.width
- tfmdata.slant = metadata.italicangle
+ tfmdata.fontname = metadata.fontname
+ tfmdata.fullname = metadata.fullname
+ tfmdata.familyname = metadata.familyname
+ tfmdata.filename = { filename, subfont } -- always store full path
+ tfmdata.weight = metadata.pfminfo.weight
+ tfmdata.width = metadata.pfminfo.width
+ tfmdata.slant = metadata.italicangle
+ --- this is for querying
+ tfmdata.units_per_em = metadata.units_per_em
+ tfmdata.version = metadata.version
-- don't waste the space with zero values
tfmdata.size = {
metadata.design_size ~= 0 and metadata.design_size or nil,