Skip to content

feat(platform): hand the console's own CJK fonts to the console UI - #17

Merged
enricobuehler merged 3 commits into
mainfrom
feat/cjk-language-font
Nov 12, 2026
Merged

enricobuehler merged 3 commits into
mainfrom
feat/cjk-language-font

Conversation

@enricobuehler

Copy link
Copy Markdown
Member

Pins punktfunk 7a4b0442a (monorepo #2388), which lets the console UI draw a character Geist lacks from faces the host hands in, and hands it the console's own Japanese, Chinese and Korean fonts. Nothing is bundled.

What changes

  • Pin. Cargo.toml, scripts/pins.env, docs/pins.md. Drift from the screen pick: host rows carry screens: None and ConsoleCmd::SetScreen is a no-op, since this client fetches no screens.
  • Fonts. The SDK has no font library. A title's sandbox mounts /preinst/common/font at /<word>/common/font; pf-ps5-sys binds sceKernelGetFsSandboxRandomWord (libkernel) for the word. pf-ps5-platform::fonts names SSTJpPro-Regular.otf (kana, JIS kanji), DFHEI5-SONY.ttf (Chinese, GB Hei) and SCEPS4Yoongd-Medium.otf (Hangul), the system language's own first, so Han takes that region's shape. DeviceInfo::fonts carries the paths; the app reads them when it builds the menu and the stream overlay, drops a file that is missing or not a face, and logs count, size and time.
  • Probe. New check fonts lists the directory with sizes, and fails when none can be listed.
  • Language. Already read from SCE_SYSTEM_SERVICE_PARAM_ID_LANG (feat(l10n): word the title from the shared messages #15). The 0-29 table matches the public enum and maps ja, ko, zh-Hant, zh-Hans; this adds tests for those four.

Checked

  • macOS: cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace (incl. the fake-platform menu run).
  • Toolchain image (amd64): scripts/cargo-ps5.sh clippy -- -D warnings, title and --probe. Not linked: task package is CI's.
  • Monorepo writing gate over the three commits.

Not checked

Nothing ran on a console. The font names come from a PS5 4.03 sandbox listing and shadPS4's PS4 font table, not from 13.x.

On the console

  1. Probe: fonts lists /<word>/common/font with the three files above. If a name differs, the fix is crates/pf-ps5-platform/src/fonts.rs.
  2. Klog at start: punktfunk-ps5: fonts: /<word>/common/font.
  3. Title log: fonts: 3 of 3 system faces, … KiB, in … ms on each menu and stream start. Is the time noticeable?
  4. A host or game named in Japanese, Chinese and Korean draws in the library, not as boxes.
  5. Console language Japanese / Chinese (Traditional, Simplified) / Korean: the klog language: line shows ja, zh-Hant, zh-Hans, ko. The UI stays English until those languages ship.
  6. Menu memory after entering and leaving a stream a few times.

param.json lists en-US only. The title name is the product name in every language, and the shell falls back to defaultLanguage, so no entries were added.

The kit now draws a character Geist lacks from faces the host hands in, which the console needs for Han, kana and Hangul. The pin also brings the screen pick; this client fetches no screens, so its rows carry none and the command is a no-op.
Skia here has no font manager, so a Japanese, Chinese or Korean game title or host name drew as boxes. The sandbox mounts the system's fonts under its random word; the title reads the Japanese, Chinese and Korean faces from there, the system language's own first so Han takes that region's shape. Nothing is bundled.
The font file names come from a 4.03 sandbox listing and the PS4's table, not from this console. One probe run shows what the title can read, so a renamed face is a one-line fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant