spiegel-keyman/common/core/web/keyboard-processor
Marc Durdin 9da4ffa77a fix(web): font size was not consistently set
Fixes #5779.
Fixes #5731 (I believe mitigation is sufficient to close this issue).

A variety of interrelated font and font size display issues resolved:
1. KVK font was not applied early enough for size calculations, which
   meant that we were calculating font scaling per key based on a
   default font when transforming from the KVK data for desktop devices
   (defaultLayout.ts)
2. Font scaling for non-default layers was calculated when elements were
   not visible and had no size information, giving incorrect values. To
   resolve this, font scaling is now calculated when a layer is made
   visible, which had performance impacts; resolved by reducing
   unnecessary `layer.refreshLayout()` calls; see performance point 1
   below (oskView.ts:layerChangeHandler())
3. `getViewportScale()` would return an incorrect scaled value when
   emulating touch devices on a desktop browser (kmwutils.ts)
4. After switching keyboards, the device-specific scaling factor was not
   maintained (oskView.ts:refreshLayout())

Related performance improvements:
1. Multiple calls to `layer.refreshLayout()` in `refreshLayout()` have
   been eliminated, and only the currently visible layer is now
   refreshed. This dramatically reduces the number of calls to
   `getIdealFontSize()` which was the primary concern of #5731.
   (visualKeyboards.ts)
2. Unnecessary use of `innerHTML` replaced with `innerText`
   (oskBaseKey.ts)

Minor Keyman Developer performance improvement:
1. The web debugger no longer recalculates the OSK twice (test.js)
2021-11-15 10:08:18 +11:00
..
src fix(web): font size was not consistently set 2021-11-15 10:08:18 +11:00
tests/cases chore(common/core/web): tweaks name of a unit test 2021-08-06 10:34:13 +07:00
.gitignore change(web/engine): addresses most of PR review 2020-04-29 14:28:30 +07:00
package-lock.json auto: increment master version to 15.0.147 2021-11-14 13:01:30 -05:00
package.json auto: increment master version to 15.0.147 2021-11-14 13:01:30 -05:00
README.md docs(web/engine): cleans readme.md for keyboard-processor 2020-04-24 13:45:16 +07:00
test.sh fix(common): build script help param 2021-05-28 09:50:40 +10:00

Keyman: Keyboard Processor Module

The Original Code is (C) 2017-2020 SIL International

The Keyboard Processor module is an internal component of KeymanWeb, seen within this repo at /web/.

Minimum Compilation Requirements

  • A local installation of Node.js v8.9+.
    • Builds will call npm install to automatically install further necessary build dependencies.

    • Linux users can run the following to update to LTS version of nodejs

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs

The build script may be found at src/build.sh.