Skip to content

Share the current look's fonts with other apps #89

Done

Description

@BrianJr03

Report

Jarn FE wants to use the current Command Panel look's fonts, including fonts the user imported. The shared theme link only sends colors today.

Verified

Confirmed. ThemeProvider / SharedThemeContract serve a frozen VERSION 1 /palette row with colors only, and docs/SHARED_THEME.md says fonts stay in Command Panel. Bundled fonts are the 12 res/font/tcc_*.ttf files (TccFonts.kt). Imported fonts live in private filesDir/fonts/<id>.ttf (UserFontStore), so other apps can't read them.

Fix

  • Keep /palette VERSION 1 exactly as it is.
  • Add a /fonts row (VERSION 2): look id, display font and label font, each bundled:<key> or user:<id> plus sha256.
  • Add read-only openFile("fonts/<id>") for imported fonts. It checks the calling app's signing cert against an allowlist (same pins as Jarn's CommandPanelTrust).
  • Notify on look or font change.
  • Update SHARED_THEME.md and drop the "never exported" note in UserFontStore.
  • Tests for the row, an unknown id, and an untrusted caller.

Pairs with the Jarngreipr font match tickets. Owner: Franklin.

Activity

  1. added
    enhancement
    area:theme
    on Nov 25, 2026
  2. BrianJr03 commented on Nov 25, 2026

    @BrianJr03
    OwnerAuthor

    Problem: Jarn FE couldn't match Command Panel's fonts, because the shared theme only sent colors.

    Fix: a new /fonts row (contract version 2) next to the unchanged /palette version 1. It has the look id and name, and the display and label fonts as bundled:<key> or user:<id> plus sha256. Imported font files are served read-only, only to Jarngreipr signed with its release key.

    Commits: 56b0707, 73199bd (PR #90, merged as 78d96c7).

    Verified: 715 unit tests. verify-shared-fonts.sh passed 19 checks on the Thor. Untrusted callers and traversal paths were refused. On a release build, Jarn read an imported font and fonts switched live.

    Ships in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:themeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions