spiegel-keyman/developer
Marc Durdin f9fa1a685e fix(developer): support Windows and Unicode names in .ttf
The ttfmeta library is extremely rudimentary. It does next to no error
checking, and supports only a small part of the TTF spec. It did not
support NAME platforms 0 or 3 (the most common platform, Windows), and
these are encoded in UTF-16BE. This patch adds support for those
platforms and throws if an unsupported platform/encoding is encountered.

Now, the ttfmeta library is unsupported and gone (#11630). It is based
on another library, ttfinfo, last updated 11 years ago. This is not
great. But the other Node libraries that I located introduce further
dependencies or complex builds (e.g. WASM) and that's not great either,
for a function used only in one place in our build environment.

https://learn.microsoft.com/en-us/typography/opentype/spec/name

The test-font-family.ts runs a basic test against Lateef font, and has
a skipped test that can be run (with minor edits) against all fonts in
the keyboard repository. I have done this to verify that there are no
fonts that return errors, but have disabled this test for deployment for
now.

Fixes: #11625
2024-05-31 15:24:47 +07:00
..
config feat(developer): add api-extractor and api-documenter and config 2024-02-26 11:37:32 +07:00
docs/api/etc docs(developer): kmc-package api documentation 2024-03-04 19:15:37 +07:00
src fix(developer): support Windows and Unicode names in .ttf 2024-05-31 15:24:47 +07:00
.gitignore chore(developer): move server with no changes 2022-05-23 12:15:34 +10:00
build.sh chore(developer): use builder.inc.sh instead of build-utils.sh in build scripts 2024-05-20 06:34:46 +07:00