local nulltable = {}
local function get_cidinfo(id) -- table
local t = getfont(id)
- local a = t and (t.cidinfo or (t.resources and t.resources and t.resources.cidinfo)) or nulltable
- return a
+ return (t and (t.resources and t.resources.cidinfo or t.cidinfo)) or nulltable
end
aux.get_cidinfo = get_cidinfo
end
setmetatable(dummy_vht, {__index = function () return 1 end } )
setmetatable(dummy_vorg, {__index = function () return 0.88 end } )
local function get_vmet_table(tfmdata, dest)
- if (not tfmdata) or (not tfmdata.shared) then
+ if (not tfmdata) or (not tfmdata.shared) or (not tfmdata.shared.rawdata) then
dest = dest or {}
dest.vorigin, dest.vheight = dummy_vorg, dummy_vht
+ dest.ind_to_uni = {}
return dest
end
local rawdata = tfmdata.shared.rawdata
if v.vheight~=default_vheight then t_vheight[i] = v.vheight / units end
end
end
- setmetatable(t_vheight, {__index = function () return default_vheight / units end } )
- setmetatable(t_vorigin, {__index = function () return ascender / units end } )
+ local vhd, vod = default_vheight / units, ascender/units
+ t_vheight.default = vhd
+ t_vorigin.default = vod
+ setmetatable(t_vheight, {__index = function () return vhd end } )
+ setmetatable(t_vorigin, {__index = function () return vod end } )
dest = dest or {}
dest.ind_to_uni = t_ind_to_uni
dest.vorigin = t_vorigin -- designed size = 1.0