ws-arch2: font/psf (PSF 1 / 2 read + write, Unicode tables kept on round trip, .psfu.gz via the api); Types.BitmapStrike.map (extra code points per glyph, additive)

This commit is contained in:
4DBug committed 2026-10-31 15:03:35 -05:00
1 parent 1b0bc158e8
commit 19f486031d
9 files changed
+545 -8

No files matched your search

+3 -2
View File
@@ -240,7 +240,7 @@ end
-- .tar.gz) load as that inner archive, with meta.compression = the outer format. opts.unwrap = false keeps the outer
-- one; an explicit opts.format also does. Package archives name their payload entry in meta.payload (a .deb's
-- data.tar.xz): they load as that inner archive too, with meta.container = the outer format and meta.outer = the
-- outer archive (its control data). A single-stream archive holding a .pcf / .psf / .bdf font loads as the font.
-- outer archive (its control data). A single-stream archive holding a .pcf / .psf(u) / .bdf font loads as the font.
local function unwrap(value: any, formatName: string, o: Options): any
if o.unwrap == false or o.format ~= nil or (o._depth or 0) >= 3 then
return value
@@ -263,7 +263,8 @@ local function unwrap(value: any, formatName: string, o: Options): any
end
local category = "archive"
local e = detect(inner, nil, "archive", nil)
if not e and value.meta.stream and ((Input.extension(entryName) or "") == "pcf" or (Input.extension(entryName) or "") == "psf" or (Input.extension(entryName) or "") == "bdf") then
local innerExt = Input.extension(entryName) or ""
if not e and value.meta.stream and (innerExt == "pcf" or innerExt == "psf" or innerExt == "psfu" or innerExt == "bdf") then
-- compressed bitmap fonts (.pcf.gz, .psf.gz, .bdf.gz: X11 and console font directories) load as the font
e = detect(inner, entryName, "font", nil)
category = "font"