ws-arch2: pcf type annotations
This commit is contained in:
1 parent
87cbc62fb6
commit
1b0bc158e8
1 file changed
+2
-2
@@ -123,7 +123,7 @@ function Pcf.decode(r: Bytes.Reader, opts: DecodeOptions?): (any, Err.Err?)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- accelerators: ascent / descent
|
-- accelerators: ascent / descent
|
||||||
local ascent, descent = nil, nil
|
local ascent: number?, descent: number? = nil, nil
|
||||||
local at = open(r, tables[BDF_ACCELERATORS] or tables[ACCELERATORS])
|
local at = open(r, tables[BDF_ACCELERATORS] or tables[ACCELERATORS])
|
||||||
if at then
|
if at then
|
||||||
at.r:skip(8)
|
at.r:skip(8)
|
||||||
@@ -191,7 +191,7 @@ function Pcf.decode(r: Bytes.Reader, opts: DecodeOptions?): (any, Err.Err?)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local glyphs: { Types.BitmapGlyph } = table.create(nm)
|
local glyphs: { Types.BitmapGlyph } = {}
|
||||||
for k = 1, nm do
|
for k = 1, nm do
|
||||||
local m = metrics[k]
|
local m = metrics[k]
|
||||||
local w, h = m[2] - m[1], m[4] + m[5]
|
local w, h = m[2] - m[1], m[4] + m[5]
|
||||||
|
|||||||
Reference in new issue
Block a user