end
do
- local cache_ver = 21
+ local cache_ver = 22
local nameonly, lower = file.nameonly, string.lower
local lfs = require"lfs"
local file_attributes = lfs.attributes
)
-- if the cache is not found or outdated, save the cache
if dest then
- font_extra_basename[bname] = dest[1] or {}
+ font_extra_basename[bname] = dest[1] or {}
+ local vheight, vorigin = dest[1].vheight, dest[1].vorigin
+ local vhd, vod = vheight.default, vorigin.default
+ setmetatable(vheight, {__index = function () return vhd end } )
+ setmetatable(vorigin, {__index = function () return vod end } )
else
local dest = ltju.get_vmet_table(tfmdata, nil)
dest = list_rotate_glyphs(tfmdata, dest)
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 vdd end } )
dest = dest or {}
dest.ind_to_uni = t_ind_to_uni
dest.vorigin = t_vorigin -- designed size = 1.0
return capsule_glyph_tate_rot(p, met, char_data, head, dir,
0.5*(get_ascender(pf)-get_descender(pf)))
end
- end
- pwidth, ascender = feir.vheight[pc]*met.size, feir.vorigin[pc]*met.size
+ end
+ pwidth, ascender = feir.vheight[pc]*met.size, feir.vorigin[pc]*met.size
end
fwidth = fwidth or pwidth
if pwidth>fwidth and char_data.round_threshold then