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
Remove ttfmeta from package.json, and copy only the relevant files into
ttfmeta/ under kmc-keyboard-info. This is a stopgap measure as we will
probably attempt to identify an alternate library in the future.
See also #11625 which is the driver for making this change now.
Fixes: #11630
There were two problems here:
* An undeclared variable `source`
* The `flick` parameter is an array, not an object, so indexing by
direction is invalid
Fixes: #11581
Fixes: KEYMAN-DEVELOPER-1YW
Key selection was left in a corrupted state in `builder.loadState()`, on
first load of the touch layout editor, because the selection was not
restored after calling `prepareLayer()`.
This only happens on first load because after first load, the selection
will have been saved to the state (which is kept in the backend,
associated with the instance of the editor), so pressing F5 to reload
the page will not reproduce the issue.
Fixes: #11573
Fixes: KEYMAN-DEVELOPER-1Z8
Handles when `<Version/>`, `<Name/>`, or `<ID/>` elements are missing
from `<Keyboard>` elements in the .kps file in kmc-package. Adds a unit
test.
Fixes: #11562
Fixes: KEYMAN-DEVELOPER-1YY
Also updates the only other place where a project file is loaded like
this, in the project renderer, and handles it too (this scenario is
less likely to happen because the project file must already have been
loaded in order to be presented in the UI).
Fixes: #11557
Fixes: KEYMAN-DEVELOPER-1Z2
If a relative or otherwise invalid path is given for `default project
path` in .keymandeveloper/options.json, then this will reset the path
to the default of `%Documents%/Keyman Developer/Projects`.
Fixes: #11554
Fixes: KEYMAN-DEVELOPER-1ZB
This arises if `%AppData%/Keyman/Keyman Developer` folder is missing.
It is sporadic because most times, Keyman Developer Server wins a
startup race and creates the folder before this code is ever reached.
Fixes: #11551
Fixes: KEYMAN-DEVELOPER-1MY
The `return` statement is unsupported in the web compiler. This is
documented, but the problem here was that the `nomatch` and `match`
metarules have no corresponding `fkp` structure, so that caused a fatal
error in the compiler if these were used in combination, e.g.
nomatch > return
Fixes: #11545
Fixes the scenario where the `%AppData%\Keyman\Keyman Developer\Server\bin`
folder exists, but ngrok.exe is not in the folder, which caused Keyman
Developer Server to crash.
Fixes: #11542
Fixes: KEYMAN-DEVELOPER-1JE
The output from Keyman Core changed in #11172 to emit a
`KM_CORE_IT_INVALIDATE_CONTEXT` action when a frame key is pressed, but
the debugger was not catering for this scenario, causing an assertion
failure.
Fixes: #11486
Fixes: KEYMAN-DEVELOPER-1Y4