Skip to content

change(common): remove drafted font metadata from KMX+ format 🔱#15788

Open
mcdurdin wants to merge 1 commit intofeat/developer/embed-osk/convert-touch-layout-into-kmx-plusfrom
change/developer/embed-osk/remove-font-data-from-osk
Open

change(common): remove drafted font metadata from KMX+ format 🔱#15788
mcdurdin wants to merge 1 commit intofeat/developer/embed-osk/convert-touch-layout-into-kmx-plusfrom
change/developer/embed-osk/remove-font-data-from-osk

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

This comes out of a design philosophy review on what we include when we embed OSK data into KMX.

We will now avoid embedding font name into the OSK (and hence .kmx) altogether, and leave that metadata to the packaging data. Reasons:

  1. The font information is specified in the .kps, so we have to do a patchup on the .kmx during packaging if we want to embed the info into the OSK.

  2. The referenced font must be supplied separately anyway (via .kmp, @font-face, or system supplied, etc), so including the font facename in the keyboard is not really all that helpful.

  3. Philosophically, the font is really a presentation level factor (aside from displaymap considerations). Keeping it together with future theming and styling choices, rather than the key layout data, seems appropriate.

  4. This makes fewer places where font data is referenced -- in fact, to just one place: in the .kps/.kmp for LDML keyboards, which is great.

This also simplifies some aspects of the embed-osk-in-kmx work, removing the need to patch the .kmx after the build, and eliminates the smelly kmx-plus-osk-token.ts file.

A corresponding change has been made to the design document referenced in #14857.

Test-bot: skip

@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Mar 26, 2026

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Android
    • Keyman for Android apk - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Android apk - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Android apk (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • KeyboardHarness apk - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for Android apk (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample1 apk - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample2 apk - build : all tests passed (no artifacts on BuildLevel "build")
  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman Developer (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • iOS
    • Keyman for iOS (simulator image) - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for iOS (simulator image) - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for iOS (simulator image) (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for iOS (simulator image) (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")
  • macOS
    • Keyman for macOS - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for macOS (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")
  • Windows
    • Keyman for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (ARM64) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (x64) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (x86) - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot changed the title change(common): remove drafted font metadata from KMX+ format change(common): remove drafted font metadata from KMX+ format 🔱 Mar 26, 2026
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S25 milestone Mar 26, 2026
@github-actions github-actions bot added developer/ common/ developer/compilers/ core/ Keyman Core common/web/ change Minor change in functionality, but not new labels Mar 26, 2026
This comes out of a design philosophy review on what we include when we
embed OSK data into KMX.

We will now avoid embedding font name into the OSK (and hence .kmx)
altogether, and leave that metadata to the packaging data. Reasons:

1. The font information is specified in the .kps, so we have to do a
   patchup on the .kmx during packaging if we want to embed the info
   into the OSK.

2. The referenced font must be supplied separately anyway (via .kmp,
   @font-face, or system supplied, etc), so including the font facename
   in the keyboard is not really all that helpful.

3. Philosophically, the font is really a presentation level factor
   (aside from displaymap considerations). Keeping it together with
   future theming and styling choices, rather than the key layout data,
   seems appropriate.

4. This makes fewer places where font data is referenced -- in fact, to
   just one place: in the .kps/.kmp for LDML keyboards, which is great.

This also simplifies some aspects of the embed-osk-in-kmx work, removing
the need to patch the .kmx after the build, and eliminates the smelly
kmx-plus-osk-token.ts file.

A corresponding change has been made to the design document referenced
in #14857.

Test-bot: skip
@mcdurdin mcdurdin force-pushed the change/developer/embed-osk/remove-font-data-from-osk branch from 6e9e351 to 79d4bdd Compare March 26, 2026 16:15
@mcdurdin mcdurdin marked this pull request as ready for review March 27, 2026 07:14
@keyman-server keyman-server modified the milestones: A19S25, A19S26 Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants