Closed darknoon closed 2 years ago
ah, good find: yeah that should absolutely be p.unt16
, not a bare uint6
!
Created a testcase in testing/manual/custom/issue-127. with code
import { Font } from "../../../lib-font.js";
const font = new Font("SVG testing");
font.src = `./fonts/issue-127/Abelone-FREE.otf`;
font.onerror = (evt) => console.error(evt);
font.onload = (evt) => {
const font = evt.detail.font;
const { tables } = font.opentype;
const SVGTable = tables["SVG"];
console.log(SVGTable);
};
and result
SVG {
version: 0,
offsetToSVGDocumentList: 10,
documentList: SVGDocumentList {
numEntries: 96,
documentRecords: [
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord],
[SVGDocumentRecord], [SVGDocumentRecord], [SVGDocumentRecord]
]
}
}
v2.3.6 published
https://github.com/Pomax/lib-font/issues/128 filed to follow up on the testing issue.
Thanks for the speedy turnaround!
Context
Compiling a figma plugin (ui code) with esbuild Trying to read the "SVG" table in an opentype font (Abelone)
Failing code
eg:
It looks like this line is meant to say
p.uint16
perhaps?As an aside, when I tried to add a failing test to
testing/browser/tests/test.otf.js
, throwing an exception seems to just hang the test host until timeout instead of failing the test.